15,000 USDC
View results
Submission Details
Severity: high
Valid

Incorrect Bonus Calculation Can Prevent Necessary Liquidations and Lead to Insolvency

Summary

In the current implementation of the liquidation process, there's a potential issue that can prevent a necessary liquidation even when the collateral ratio of a user is above 100%. This can happen due to the bonus calculation logic, which could decrease the user's health after the liquidation, leading to a revert. This could accelerate the insolvency of the protocol.

Vulnerability Details

Consider the following scenario:

LIQUIDATION_THRESHOLD = 50
LIQUIDATION_PRECISION = 100
weth_price = 2000 usd

Scenario where liquidation is not possible:

  1. User A mints 1000DSC using 1 WETH as collateral.

  2. The WETH price drops to 1099 USD.

  3. User B tries to liquidate User A by repaying 500DSC on their behalf.

  4. Before the liquidation, User A's health is 0.5495, making liquidation possible.

  5. User B receives approximately 0.5045 WETH through the liquidation.

  6. User A's health decreases to 0.549, which is lower than before the liquidation, causing a revert.

Even though the collateral ratio is sufficient, the liquidation doesn't occur, and this could accelerate the protocol's insolvency.

Impact

This can quickly lead to insolvency of the protocol if it is not cleared despite a sufficient collateralization ratio.

Tools Used

VS Code

Recommendations

In a situation where health is decreased by bonus at liquidation, the amount of bonus should be decreased to prevent health from decreasing.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.