The liquidate() function calculates the collateral to seize from a borrower based on:
The debt being repaid
The liquidation bonus
However, there is no validation ensuring that:
If the calculated collateral_to_seize (including liquidation bonus) exceeds the borrower’s actual deposited collateral, the liquidation attempt will revert.
This creates a scenario where undercollateralized positions become unliquidatable, breaking a core stability mechanism of the protocol.
Likelihood: High
Reason 1 Happens during sharp market volatility.
Reason 2 Common in oracle-based liquidation systems.
Reason 3 Especially possible with high liquidation bonuses.
Impact: High
Impact 1 Prevents liquidation.
Impact 2 Allows toxic debt to remain.
Impact 3 Can cause systemic insolvency.
Impact 4 Breaks protocol core invariant.
Expected behavior:
Liquidation should succeed and seize up to available collateral.
Actual behavior:
Liquidation reverts entirely.
1. Cap Seizable Collateral
Modify liquidation logic:
This ensures:
*Liquidation always executes
*No revert due to over-seizure
*Protocol captures maximum available value
If full debt cannot be covered due to insufficient collateral:
Burn only proportional debt
Or track remaining bad debt explicitly.
At the external boundary:
And internally:
Liquidation must:
Never revert for arithmetic reasons
Never assume sufficient collateral
Always preserve solvency over strict bonus rules
Liquidation logic must prioritize protocol survival.
This issue allows unhealthy positions to become permanently unliquidatable when liquidation bonus pushes seized collateral above user balance.
That:
Breaks protocol core invariant
Threatens stablecoin backing
Introduces systemic insolvency risk
Fixing this requires capping collateral seizure to available balance and adjusting debt settlement accordingly.
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.