During liquidation, the protocol calculates token_amount_from_debt_covered + bonus_collateral and attempts to redeem this total amount from the user.
When the user's collateral is less than this total (debt + 10% bonus), the subtraction in _redeem_collateral will underflow and revert.
This can prevent liquidations of positions that have fallen deeply underwater, leaving bad debt in the system.
Likelihood: Medium
Reason 1 // Occurs when positions fall deeply underwater
Reason 2 // Flash crashes can cause this scenario
Impact: High
Impact 1 // Bad positions cannot be liquidated
Impact 2 // Protocol accumulates bad debt
Impact 3 // Remaining users bear the losses
The following demonstrates how a deeply underwater position becomes unliquidatable. When the required collateral (debt + bonus) exceeds the user's actual balance, the liquidation reverts, leaving the bad debt in the system.
Add a check to ensure the user has sufficient collateral before attempting the redemption. When collateral is insufficient, either cap the liquidation amount or allow partial liquidations that take all available collateral.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.