In some cases where the collateral is spread across multiple tokens, the liquidation may become impossible only after a small price drop.
To liquidate a position the liquidator has to take care that the healthFactor
is broken before the liquidation and has recovered at the end of the transaction for it to go through. So the healthFactor
should not be broken anymore after a liquidation transaction, that means the value of the liquidated position's collateral is back to at least 200% of the value of the underlying stablecoin.
However, the liquidate()
function only allows the liquidation of one token at a time which might not be enough to recover the full debt if the collateral is composed of several tokens. Because the debt cannot be recovered in one call to the liquidate()
function, the position is not liquidatable anymore.
Some <200% collateralized positions are not possible to liquidate, breaking the core mechanism of the stablecoin.
This can happen even with quite a small debt.
(1) A user uses 5 tokens as collateral, worth $1000 in total, to mint $500 of DSC.
Collateral:
$200 TokenA
$200 TokenB
$200 TokenC
$200 TokenD
$200 TokenE
TOTAL = $1000
Minted:
$500 DSC
HealthFactor = (1000/2) / 500 = 1
(2) All prices go down by 15%
Collateral:
$170 TokenA
$170 TokenB
$170 TokenC
$170 TokenD
$170 TokenE
TOTAL = $850
Minted:
$500 DSC
HealthFactor = (850/2) / 500 = 0.85
There is a liquidation opportunity now that HealthFactor = 0.85 < 1
(3) A liquidator burns the maximum possible amount of $154.54 DSC and gets $170 worth of Token0 ($154.54 + 10%)
Remaining:
$0 TokenA
$170 TokenB
$170 TokenC
$170 TokenD
$170 TokenE
TOTAL = $680
Minted:
500 - 154.54 = $345.46 DSC
HealthFactor = (680/2) / 345.46 = 0.96
The liquidation transaction FAILS because the HealthFactor = 0.96 < 1
(4) The liquidation process will always revert and the position will remain <200% collateralized.
Manual review
Allow the liquidation of several tokens at the same time.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.