The protocol currently does not account for the liquidation fee when determining if a trading account is liquidatable. It is stated in the official documentation that this fee should be accounted during the check does a position is liquidatable.
When checking if a trading account should be liquidated, the protocol doesn't take in consideration the liquidation fee. This oversight can lead to scenarios where an account is considered non-liquidatable, even though, after accounting for the liquidation fee, it should be liquidated.
If the margin goes below the required threshold without considering the liquidation fee, the fee may not be covered during liquidation. This could result in the protocol failing to collect the necessary fees.
Manual review
To fix this issue, update the isLiquidatable function to include the liquidation fee in its calculations:
This adjustment ensures that the liquidation process properly accounts for the liquidation fee, maintaining the protocol's financial integrity and preventing potential shortfalls.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.