The finalizeLiquidation
function assumes that collateral will always be sufficient to cover the outstanding debt when liquidating a borrower. However, if the collateral's value drops suddenly due to market volatility or price manipulation, the protocol may fail to recover the full loan amount, leading to bad debt.
The function determines the amount of debt to burn based on the user's scaled debt balance. It then transfers the collateral (NFTs) to the Stability Pool, assuming that the collateral is sufficient to cover the debt. However, it does not check whether the current market value of the collateral is still sufficient to cover the outstanding debt.
If the collateral price drops significantly before liquidation, the Stability Pool may not receive enough value, causing protocol losses.
The protocol will not be able to recover the full debt from liquidated users, leading to a loss of funds.
Step 1: Deposit Collateral & Borrow Funds
User deposits an NFT worth $10,000 and borrows $5,000 worth of stablecoins.
Step 2: Price Manipulation
The NFT price crashes to $3,000 .
Step 3: Liquidation Attempt
The protocol triggers liquidation since the user's health factor is below 1.0.
However, the collateral is now worth less than the outstanding debt.
The protocol attempts to liquidate the user, but cannot fully recover the debt.
Step 4: Protocol Loss
The Stability Pool absorbs the loss or the protocol accumulates bad debt.
Manual Review
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.