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,
UST
pegging started to rapidly deteriorate with market price as low as $.6 in a few hours and the Curve UST wormhole pool was seriously imbalanced withUST
took 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 lessDAI
than we borrowed from MakerDAO - 11th May, crypto market fud dump made our situation even worse and our CDP monitoring bot failed to redeem required
DAI
to 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
&WBTC
vaults due to the collateral ratio fell below its145%
liquidation threshhold - 11th May (at block #14755321), our
WETH
vault was liquidated with76%
collateral sold plus13%
penalty - 11th May (at block #14755332), our
WBTC
vault 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
&WBTC
vaults could only redeem asset from active CDP collateral position calledink
but after liquidation the remaining asset was already moved fromink
togem
- In consideration of
UST
non-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),
DAI
was claimed forWETH
vault but the slippage caused only1.82M
out of originally3.44M
deposited DAI was back. - 12th May (at block #14760259),
DAI
was claimed forWBTC
vault but the slippage caused only78K
out of originally130K
deposited DAI was back. - Claimed
DAI
was 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
UST
Curve 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)