src/dsc_engine.vy
The liquidate() function is expected to allow any liquidator to clear an unhealthy position (health factor < 1) by paying off the user's DSC debt and receiving their collateral plus a 10% bonus as incentive. This mechanism is the primary defense against the protocol accumulating bad debt.
When a position becomes severely undercollateralized — where the collateral's USD value is less than the outstanding DSC debt — the 10% liquidation bonus calculation produces a total collateral demand that exceeds the user's actual deposited balance. Vyper 0.4.0's built-in arithmetic overflow protection causes the subtraction in _redeem_collateral() to revert, making it impossible to liquidate the most dangerous positions in the system. Bad debt accumulates without any mechanism for resolution.
Likelihood: Medium
Occurs whenever ETH or BTC price drops more than approximately 9% below the liquidation threshold without the position being partially cleared first.
Fast market crashes (flash crashes, black swan events) routinely produce such conditions for overleveraged CDP positions.
The 10% bonus threshold is breached whenever collateral_value / debt < 1.1, which is the zone of maximum insolvency risk.
Impact: High
The protocol accumulates irrecoverable bad debt — DSC is backed by less collateral than its total supply.
The DSC peg is threatened as the backing ratio falls below 100%.
Liquidators cannot act even when incentivized to do so, allowing positions to deteriorate further.
Severity: High
A user deposits 1 ETH when ETH = $2,000. They mint 900 DSC (within the 50% threshold: $1,000 effective collateral). ETH price crashes 60% to $800. The user is now liquidatable (health factor = 0.44) but the liquidation call reverts because the bonus demand exceeds available collateral.
Cap the total collateral to redeem at the victim's available deposited balance. When the position is deeply underwater, the liquidator still receives all available collateral (just without the full 10% bonus), which is sufficient incentive given the liquidator is still recovering more value than they pay in DSC. This is a common pattern in mature CDP protocols.
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.