The liquidationGracePeriod
check in LendingPool::closeLiquidation
can lead to borrower still be liquidated even if his debt is fully repaid.
Liquidation process in LendingPool
consists in 2 steps: initiateLiquidation
where a liquidationStartTime
counter is started and, after liquidationGracePeriod
has expired, finalizeLiquidation
can be called to settle the liquidation.
The borrower who is under liquidation can repay
his debt and close the liquidation process by calling closeLiquidation
There is a problem not allowing a borrower to close the liquidation after liquidationGracePeriod
has passed.
Consider the following example:
Alice deposit her RAACNft and borrow against it.
her collateral value drops and liquidation process is started;
liquidationGracePeriod
has passed
Alice fully repay her debt or her friend Bob repayOnBehalf of Alice. None of these functions are gated by a non-expired grace period. Debt can be rapid at any time;
Alice calls closeLiquidation
and the transaction reverts due to expired grace period.
finalizeLiquidation
and Alice is liquidated even if she fully repaid her debt.
Borrowers can be liquidated unfairly.
Remove liquidationGracePeriod
check from closeLiquidation
to allow borrowers to close the liquidation when the debt is repaid. At most request a late close liquidation fee payment,
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.