Normal behavior: The liquidate function allows external liquidators to repay a portion of an undercollateralized user’s DSC debt in exchange for collateral plus a 10% bonus, incentivizing third parties to maintain solvency.
Issue: The implementation does not prevent msg.sender == user, so an undercollateralized borrower can liquidate their own position and capture the liquidation bonus, extracting value that should go to independent liquidators.
Likelihood:
Reason 1 // Underwater users routinely look for ways to minimize loss and will call any function that returns additional collateral in exchange for debt repayment.
Reason 2 // MEV and bots will quickly discover that self-liquidation yields a risk‑free 10% gain compared to pure repayment, making this behavior widespread once deployed.
Impact:
Impact 1 // Liquidation incentives for honest third‑party liquidators are significantly weakened, as the bonus is captured by the borrower instead of compensating others for providing capital and gas.
Impact 2 // In stressed market conditions, reduced external liquidation participation can lead to delayed or absent liquidations, increasing protocol bad debt and reducing confidence in the stablecoin.
A borrower opens a leveraged position and then self‑liquidates to farm the bonus:
User deposits 10 WETH as collateral and mints the maximum DSC allowed.
Price drops such that the user becomes undercollateralized (health factor < 1).
User acquires some DSC from the market.
User calls liquidate(weth, user, debt_to_cover) from their own address.
The engine transfers collateral + 10% bonus back to the same user, giving them more value than they would get from simply repaying debt.
Add an explicit check in liquidate to prevent self‑liquidation and keep the bonus reserved for external actors.
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.