DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Valid

Collateral type removed from cachedCollateralLiquidationPriority can't be liquidated

Summary

If a collateral is removed from the cachedCollateralLiquidationPriority, and a trading account has this as a collateral, during liquidation, this collateral will not be taken into consideration.

Vulnerability Details

As stated above, if a collateral is removed from the set cachedCollateralLiquidationPriority, the protocol will not be able to fully liquidate the user's positions. This occurs because the collateral, although deposited by the user, is effectively ignored during the liquidation process. As a result, the liquidation mechanism fails to account for the total value of the collateral available in the trading account.

POC

  1. The current list of cachedCollateralLiquidationPrioritycontains USDC and WETH.

  2. User position which is liquidatable is backed by USDC, DAI and USDT

  3. During liquidation, it will liquidate just the USDC.

Impact

The protocol will lose funds due to the incomplete liquidation of the user's trading account. And the collateral will be stucked in the protocol.

Tools Used

Manual review

Recommendations

Consider implementing mechanism which will take in consideration all of the collateral deposited as margin by the trading account, not just the set of cachedCollateralLiquidationPriority

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

removal of collateral types from the liquidation priority list will affect affect the liquidation process of the existing positions

Support

FAQs

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