Normal Behavior:
The liquidate function is intended to improve a borrower's health factor by repaying part of their debt in exchange for collateral plus a 10% liquidation bonus.
Specific Issue:
The function requires that the health factor strictly improves after liquidation (dsc_engine.vy:131). Given the 10% liquidation bonus (dsc_engine.vy:121), a liquidation can only improve the health factor if the collateral value C exceeds 1.1 * D. For positions where C is between 1.0 * D and 1.1 * D (already unhealthy but not deeply underwater), any liquidation either worsens the health factor or reverts due to insufficient collateral. These positions cannot be liquidated and accumulate as bad debt as the market continues to fall.
Likelihood:
This condition occurs naturally whenever a position's collateral value falls into the 100%-110% range of its debt.
No attacker action is required — it is a structural flaw in the liquidation logic.
Impact:
Positions with 100%-110% collateralization cannot be liquidated.
As prices fall, these positions become permanently insolvent, creating bad debt for the protocol.
The protocol (and its stablecoin holders) absorb the losses.
The test sets up a position with 1 WETH collateral ($105,000 after price drop) and 100,000 DSC debt. The health factor is 1.05, which is below 1.0 — the position is unhealthy. However, because the collateral value (105,000) is less than 1.1 * debt (110,000), any liquidation with a 10% bonus would either worsen the health factor or revert due to insufficient collateral. The test confirms that liquidate reverts, leaving the position unliquidatable. As ETH price continues to fall, this position becomes bad debt for the protocol.
Option 1: Allow liquidation when the health factor does not worsen.
Option 2: Adjust the liquidation bonus based on the position's health factor.
Option 3: Allow partial liquidation with a dynamic bonus.
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.