DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Risk of Amplified Under-Collateralization After Primary Liquidation

Summary

The MarginCallPrimaryFacet contract provides a mechanism for liquidating under-collateralized positions. However, the current liquidation process may further decrease the collateral ratio, potentially exacerbating the under-collateralization issue.

Vulnerability Details

When a position is flagged for liquidation due to its collateral ratio dropping below the primaryLiquidationCR, the liquidate function can be called to create a forced bid with an inflated price (the oracle price multiplied by the forcedBidPriceBuffer) on the market. The cost of this forced bid, combined with associated fees, is borne by the position owner. This mechanism, especially in volatile market conditions, can lead to a further decrease in the collateral ratio, making the position even more under-collateralized.

Initial Parameters:

  • Debt (Stable Token pegged to USD): 10,000 tokens (equivalent to $10,000)

  • Collateral (zETH): 4.5 zETH

  • Oracle Price of Token in zETH: (since and 1 ETH = , so )

  • Initial Debt in zETH: $$

  • Initial Debt in zETH: $$

  • Initial Collateral Ratio: $$

Primary Liquidation:

Assuming Caller Fee, TAPP Fee, and Forced Bid Price Buffer collectively account for 10% of the collateral:

  • Total Deductions in zETH: 10% x 4.5 zETH = 0.45 zETH

  • Collateral After Deductions: $$

  • Bad Debt: $$

Secondary Liquidation:

  • Collateral: 4.5 zETH

  • Bad Debt: $$


From the above comparison, it's evident that the secondary liquidation method results in less bad debt (0.5 zETH) compared to the primary liquidation method (0.95 zETH) due to the associated fees and buffers in primary liquidation.

Impact

  1. User Impact: Users with positions close to the liquidation threshold may find their positions significantly under-collateralized post-liquidation, leading to potential losses.

  2. Systemic Risk: If many positions are liquidated in a short time frame, especially during market volatility, it could lead to a cascade of liquidations, destabilizing the system.

Tools Used

Manual Review

Recommendations

To minimize bad debt, the protocol should prioritize secondary liquidation when the CR is below 100%. This will ensure that the system's health is maintained and the amount of bad debt is minimized.
Consider preventing primary liquidations and only allowing secondary liquidation when the Collateral Ratio is below 100% to avoid putting the debts on an even riskier position.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other
ubermensch Submitter
almost 2 years ago
0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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