The liquidation process does not properly verify whether a user still has debt before proceeding with finalizeLiquidation()
. If a user repays their debt during the grace period but does not call closeLiquidation()
, the contract will still treat them as under liquidation, resulting in the loss of all their NFTs when liquidation is finalized.
The finalizeLiquidation()
function checks only if the grace period has expired, but does not verify whether the user still has outstanding debt before proceeding with liquidation.
If a user repays their entire debt during the grace period but does not explicitly call closeLiquidation()
, the system still considers them under liquidation.
As a result, all their NFTs will be transferred to the Stability Pool, even though they have no debt.
Users who repaid their debt will still lose all their NFTs when liquidated.
Users with no debt left should not be liquidated, yet they are.
Step 1: User Takes a Loan
User deposits NFTs as collateral.
User borrows stablecoins against their NFTs.
Step 2: Liquidation is Initiated
The health factor drops below the threshold, triggering initiateLiquidation()
.
The user is marked as isUnderLiquidation = true
, and the grace period begins.
Step 3: User Repays Debt
The user repays all their outstanding debt during the grace period.
However, the user does not call closeLiquidation()
.
Step 4: Liquidation is Finalized
After the grace period expires, finalizeLiquidation()
is called.
The function does not check if the user’s debt is now zero.
The NFTs are transferred to the Stability Pool even though the user no longer owes any debt.
Manual Review
Verify Debt Before Liquidation
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.