This aims to document what happened during the UST depegging and cascading liquidation of our WETH & WBTC vaults on Ethereum.
Background:
Our vaults collateralize asset (WETH & WBTC) into MakerDAO to mint DAI and deposit DAI into Curve UST wormhole pool (DAI -> 3CRV -> UST-3CRV LP) for yield-farming in Convex Finance
Timeline:
- 10th May,
USTpegging started to rapidly deteriorate with market price as low as $.6 in a few hours and the Curve UST wormhole pool was seriously imbalanced withUSTtook up over90%in the pool. This means if we remove LP position at this time from the pool we would suffer huge slippage and receive much lessDAIthan we borrowed from MakerDAO - 11th May, crypto market fud dump made our situation even worse and our CDP monitoring bot failed to redeem required
DAIto repay MakerDAO to boost the collateralization ratio due to extremely imbalanced UST-3CRV reserve in Curve UST wormhole pool - 11th May (at block #14755244), MakerDAO triggered the liquidation of our
WETH&WBTCvaults due to the collateral ratio fell below its145%liquidation threshhold - 11th May (at block #14755321), our
WETHvault was liquidated with76%collateral sold plus13%penalty - 11th May (at block #14755332), our
WBTCvault was liquidated with77%collateral sold plus13%penalty - After liquidation event, Mushrooms devs immediately started to evaluate possible salvage methods of remaining collateral in MakerDAO but in no vain so far. The underlying yield-farming smart contract for
WETH&WBTCvaults could only redeem asset from active CDP collateral position calledinkbut after liquidation the remaining asset was already moved frominktogem - In consideration of
USTnon-stopping depegging and proposal to burn cross-chain liquidity, Mushrooms decided to remove LP position completely by suffering huge slippage from Curve UST wormhole pool to at least secure some portion of deposited DAI and to distribute claimed DAI directly to all affected vault users pro-rata as announced in our twitter - 12th May (at block #14760219),
DAIwas claimed forWETHvault but the slippage caused only1.82Mout of originally3.44Mdeposited DAI was back. - 12th May (at block #14760259),
DAIwas claimed forWBTCvault but the slippage caused only78Kout of originally130Kdeposited DAI was back. - Claimed
DAIwas then distributed to affected vault users according to vault share percentage accordingly from our deployer address as announced in our twitter - 13th May, Mushrooms reached out to insurance partner for possible help but unfortunately existing insurance integration does not cover this type of liquidation event (
within normal operations).
Lessons:
- Deposit into
USTCurve wormhole pool might be a risky move at the beginning (sounds a bit hindsight) and it is not wise to predict the market without fail-safe in place since the market could turn against what your expected in a blink - Smart contract could be more robust to take extreme situation (like liquidation) into account and reasonable to keep some alternatives to redeem asset in emergency(but with proper permission check)