Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 4.55 KB

ust-depeg-liquidation-event.md

File metadata and controls

23 lines (18 loc) · 4.55 KB

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 with UST took up over 90% in the pool. This means if we remove LP position at this time from the pool we would suffer huge slippage and receive much less DAI 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 its 145% liquidation threshhold
  • 11th May (at block #14755321), our WETH vault was liquidated with 76% collateral sold plus 13% penalty
  • 11th May (at block #14755332), our WBTC vault was liquidated with 77% collateral sold plus 13% 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 called ink but after liquidation the remaining asset was already moved from ink to gem
  • 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 for WETH vault but the slippage caused only 1.82M out of originally 3.44M deposited DAI was back.
  • 12th May (at block #14760259), DAI was claimed for WBTC vault but the slippage caused only 78K out of originally 130K 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)