Convex UST Wormhole Post-Mortem

CortexDAO
CortexDAO
Published in
6 min readMay 17, 2022

The sudden downfall of UST has sent shockwaves through the DeFi ecosystem. Users of Anchor faced perilous liquidations, LPs were rocked by not-so-impermanent loss, and projects raced to stem the bleeding.

Our protocol faced its own challenges. In the effort to provide diversified Convex exposure to users, the protocol had taken a position in the UST wormhole Curve pool.

We were lucky to have limited exposure due to the diversification, but the protocol still suffered a loss of roughly 7.24%.

This loss is not one we take lightly.

The team is passionate about DeFi and the future of this industry demands we all hold ourselves to the highest standards we can achieve. While losses from hacks, protocol instability, and black swan market events might seem like frequent occurrences, this does not mean they should be acceptable.

In the interest of transparency, the team wanted to provide a post-mortem of the UST depeg and how it impacted the protocol.

We will cover our risk assessment of UST, the timeline of events, and our key takeaways from the experience.

UST Risk Assessment

Peg mechanics

Algorithmic stablecoins are fundamentally riskier than collateralized stablecoins. We considered UST a less risky algorithmic stablecoin, though still riskier than collateralized stablecoins, due to the high liquidity and volume, and its past success at restoring peg.

Algorithmic stablecoins are most risky when their markets are too inefficient for the peg mechanics to play out at scale. We believe this initial assessment was flawed for the following reason:

  • The mint/burn arbitrage mechanic used to hold the UST peg is limited by the BasePool and PoolRecoveryPeriod parameters. The limit is meant to protect the mechanic from oracle skew. Historically, proposals have been passed to increase the amount of allowed arbitrage so the mechanic can hold the peg at higher market caps.
  • The proposals below are all protocol changes to the BasePool and PoolRecoveryPeriod. A key thing to note is that following the final February 2022 proposal, the supply of UST doubled, eventually leading to the depeg event.

9/2020 — https://station.terra.money/proposal/12

12/2020 — https://station.terra.money/proposal/18

2/2021 — https://station.terra.money/proposal/36

6/2021 — https://station.terra.money/proposal/90

2/2022 — https://station.terra.money/proposal/185

  • Our initial risk assessment of UST was done in February shortly after the final update to the BasePool and PoolRecoveryPeriod parameters. Again, it was following this that we saw a doubling of UST supply over a short time period.
  • A critical error in our risk assessment was how low the tolerance was for UST market cap to outstrip BasePool and PoolRecoveryPeriod parameters. An increase of even 30–50% of UST supply without a corresponding proposal to update parameters should have been a warning sign.
  • High UST liquidity was a boon until the supply sufficiently outpaced the allowable arbitrage. Once that point was reached, the liquidity became a destabilizing force.

Historical Depeg Events

The previous UST depeg event in May of 2021 was used to model our expectations of how a future depeg event could play out, and what indicators to look for:

  • Tracking the BasePool delta and the arbitrage spread would indicate how efficiently the mechanic is working.
  • Tracking LUNA liquidity would indicate how much arbitrage could be sustained before the possibility of a death spiral.
  • The event demonstrated UST peg mechanics recovering from a break below 10%.

Additional Factors

LFG reserves that were set aside for the purpose of defending the UST peg were not factored into the risk assessment because any market-making activity they could be used for would be opaque.

Timeline

May 7th, 10 pm

UST peg breaks to low $0.991. First sign of potential weakness, however well within what was thought to be a safe range based on the May 2021 depeg.

May 8th

Peg consistently stays above $0.995. Historically, this price has occurred under normal operation without a peg break.

May 9th, 5 am

Peg is effectively restored at $0.999.

May 9th, 3 pm

Do Kwon announces they will be deploying LFG funds to defend the peg as it drops to $0.938. How the LFG funds were used was not transparent and therefore did not reduce the perceived risk of a sustained depeg.

May 9th, 11 pm — May 10th, 3 am

The peg breaks to $0.747 and quickly rebounds to $0.932. Our thesis was that the sustained price above $0.90 was due to peg mechanics. This was based on the UST-LUNA arbitrage spread, the decreasing supply of UST, and the increasing supply of LUNA.

At this stage, LUNA appeared to effectively absorb the arbitrage and its market cap was still within range of the UST market cap. While LUNA does not collateralize UST, having a larger market cap is still impactful because it indicates a capacity to absorb considerable arbitrage.

May 10, 3 am — May 10th, 5 pm

The peg sustains a price above $0.90. With a tighter tolerance than the May 2021 depeg and the arbitrage spread determined by the BasePool delta holding, the team decides the position should start to be reduced the longer the price stays below peg.

This decision was based on the nature of the peg mechanics. The longer the arbitrage between UST and LUNA must be sustained, the LUNA liquidity is available, and the greater risk of a permanent depeg. The BasePool delta determines the spread on UST-LUNA arbitrage, so the reset would have increased the amount of arbitrage possible to recover the peg.

May 11th, 3 am

The peg breaks to $0.538 despite arbitrage capacity. Even if there were emergency measures to increase the size of the BasePool, LUNA liquidity would not have supported the necessary arbitrage to recover the peg. The decision was made to find an adequate exit point to limit any further losses instead of DCA.

May 11th, 9 am

The peg reaches a low of $0.300.

May 11th, 5 pm

At roughly $0.64 the entire position was unwound. Despite strong buy side liquidity causing the price to climb higher, the peg mechanic was indisputably broken, and any recovery would have been a result of opaque market making. Over the next two days, UST death spirals with barely a single retrace back towards the peg.

May 12th — Today

The team has been analyzing the event to understand how we could have better served our users and developed more practical models for informing our decisions. In the end, the protocol took roughly 7.24% in losses from the exposure.

While it highlights the value of having a diversified portfolio, there are many that took far more significant losses from having imbalanced exposure. It has also given the team important takeaways for how to improve the operation of the protocol and empower users.

We believe there could have been different approaches that would have a better-mitigated loss, while still being aligned with the overall objectives of the protocol.

Takeaways

1. Assess risk on fundamentals, take action on price

Fundamentals such as peg mechanics are useful for risk assessment, but in practice, monitoring and incident response should rely solely on price action.

Using key metrics that track the health of peg mechanics is inadequate and can even be a lagging indicator. A simpler approach, treating all the stables the same, with a tight tolerance around volatility, would be more practical despite the false positives from ignoring peg mechanics.

While relying on price action does increase the number of false positives, causing losses from slippage, there are other factors to consider.

If a stable reliably returns to the peg, user confidence can still cause large outflows and force the liquidation of the position before the peg can be restored. In this situation, liquidating the position based on price action would have been preferable despite robust peg mechanics.

2. Active communication of asset exposures

It is important for users to understand what their exposures are in any protocol. However, making that information available is not enough. Expected user behavior must be considered so the information can be reliably delivered.

Some protocols have features that naturally encourage a user to frequently review the protocol’s state. This organically keeps the user informed of changes to the protocol, such as asset exposure, if that information is displayed in the UI.

If a protocol allows users to adopt a more hands-off approach, it’s important to pursue active communication of protocol changes.

Regular email reports on protocol activity is one option. Email is reliable for web2 platforms, however, it fails to reach many users on web3 protocols.

Another option is EPNS, which could directly update users about real-time protocol activity that affects their exposure.

--

--