The issue in the LendingPool
contract is that users must fully repay their debt in order to exit liquidation. Partial repayments are not allowed, which means that even if a user repays 90% of their debt, their position will still be liquidated if they cannot cover the full amount.
A user enters liquidation with a debt of 1e18 (1 token).
The user repays 9e17 (90% of the debt), leaving only 1e17 remaining.
When calling closeLiquidation()
, the protocol checks if the debt is completely paid off.
Since there is still some remaining debt (1e17), the user cannot exit liquidation and risks losing their position.
This is problematic because:
The protocol forces users to repay 100% instead of allowing partial repayments.
Even if a user repays most of their debt, they could still lose their position due to a small remaining balance.
Unnecessary Liquidations – Users who repay most of their debt still lose their collateral due to a small outstanding balance.
Manual review
Modify the condition to allow users to **exit liquidation if their remaining debt is below a reasonable threshold.
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.