skip to content

Examining UST's Collapse

043

UST de-pegged from $1 over the weekend after seeing large withdrawals from Anchor and a massive sell-off on Curve. Against a weak macro backdrop with high inflation and rising rates, this triggered panic and initiated a bank-run scenario from Anchor, UST, and the broader Terra ecosystem. Despite great efforts from the Terra community to restore faith in UST, market forces prevented the former leading algorithmic stablecoin from fully recovering, leading to a collapse in both UST and LUNA.

Executive summary

Over the weekend, Anchor saw major outflows in UST deposits. Most of the withdrawn UST was then bridged from Terra and sold for other stablecoins on Curve and other exchanges, which led to significant supply imbalances and caused UST to de-peg. At first, the de-peg was small at ~$0.98. But in an adversarial operating environment with rising interest rates and general market-wide weakness, UST’s initial de-pegging was enough to spark concerns and trigger a bank-run scenario on Anchor as depositors rushed for the exits. We described the risk of such a scenario in our March 25, 2022 newsletter. In an attempt to mitigate this risk, LFG had begun to acquire BTC to add more support for the UST peg, but while they had acquired significant BTC, they had not yet deployed a module to allow for it to be selected by users as a UST redemption option.

The Luna Foundation Guard put its bitcoin reserves to work, trying to restore UST’s peg alongside many other members of the Terra community such as Terraform Labs. But their efforts proved to be insufficient in restoring faith in UST as the pace of exits from Terra showed no signs of slowing. LUNA price was collapsing as the algorithmic design of UST enabled more and more minting of LUNA tokens. This dynamic continued for several days until Thursday, when Terra validators elected to halt the chain, and restrict new delegations to preserve the security of Terra. By then, over 6 trillion LUNA tokens had been minted while the algorithmic design of UST had effectively failed.

Certain strategic and technical decisions around UST and the Terra blockchain contributed to the volatility of this week’s events. We explore some of those factors and discuss how algorithmic stablecoins may be viewed in relation to other safer stablecoin types.

CROPPED-ust-collapse-chart1-png

Background

Terra is Tendermint-based, delegated Proof-of-Stake blockchain built on the Cosmos SDK. Terra is known for its algorithmic stablecoin UST, which until this past week was the #1 algorithmic stablecoin by market cap, and for Anchor, a savings/borrowing protocol that has a long track record of offering some of the highest yields in DeFi on a stablecoin at ~18-20%. It has arguably been one of the most scrutinized protocols from a financial perspective.

The main team behind Terra is Terraform Labs (“TFL”), co-founded by Do Kwon—also the prominent CEO—and Daniel Shin, now currently the CEO of the payments technology firm, Chai. The primary mission of TFL was to build out a blockchain that was anchored by a utility-based, algorithmic stablecoin—TerraUSD (UST)—to power the decentralized economy.

Stablecoins can generally fall under three different categories:

  • Custodial & Fiat-backed: fully collateralized stablecoins with off-chain fiat reserves or other financially equivalent assets with a centralized sponsor firm (e.g. Tether/USDC and Circle/USDC).

  • Non-custodial & Over-collateralized: Requires greater portion of deposits than its issuance. Collateralized stablecoins, such as DAI, are minted/burned when assets are deposited/withdrawn from their reserves.

  • Algorithmic: stablecoins which are not explicitly collateralized that are typically tied to another volatility-absorbing asset and achieve price stability via a protocol’s algorithm through market incentives such as UST.

LUNA is the governance token of Terra. UST was designed to maintain its price stability through the mint/burn function of Terra’s market module: by design, on-chain users could redeem their LUNA for UST (or vice versa) at a $1:1 ratio regardless of the market price of UST at the time. If demand for UST rose and pushed the price above $1, users could burn $1 of LUNA to mint new UST, which expands UST supply and puts downward pressure on the price of UST. Similarly, if the price of UST falls below $1, users could redeem their UST by burning it for $1 of LUNA. This presents a constant arbitrage opportunity designed to keep UST equal to $1. Important to note that LUNA doesn’t explicitly collateralize UST; it only absorbs the short-term volatility of UST. UST is backed by the demand for LUNA and the Terra ecosystem. If demand for LUNA declined significantly, UST would struggle to maintain its peg.

Over the past several months, Do Kwon and TFL sought to expand UST to other chains. To build confidence in the stability of UST those outside the Terra ecosystem, TFL set aside several billion dollars’ worth of funds to establish a reserve backing UST with external currencies like BTC and AVAX to be managed by the Luna Foundation Guard (“LFG”), which is overseen by 6 industry experts. The LFG had accumulated over 80k BTC (worth around ~$3bn since its latest purchase last week) and ~$200m of AVAX in reserves, which provided UST with another form of backing in addition to the pre-existing market module, which relies upon demand for itself as a utility asset and upon LUNA.

One of the necessary components for UST to expand to other platforms was through using external exchanges, including centralized exchanges like Binance and decentralized exchanges like Curve. These venues are external to the Terra blockchain, where the on-chain market module for UST lives. TFL was going to rely heavily on the 4pool—a new stablecoin pool on Curve that includes USDC, USDT, and FRAX—as its main source of “off-chain” liquidity. These external exchanges that UST relied upon require greater amounts of liquidity as a form of protection against off-chain price manipulation. But disaster struck UST and the Terra ecosystem before the 4pool could go live on Ethereum.

The Incident

Sat/Sun, May 7-8th - the cracks start to appear

Over the weekend, Anchor saw major outflows in UST deposits totaling nearly $3bn, bringing Anchor’s UST deposit balance down from $14bn to $11bn. Roughly $1bn of the net withdrawal amount was attributed to just five addresses, including a single address that had net withdrawals of $335m. Much of this withdrawal amount ended up bridging from Terra to Ethereum via Wormhole to be swapped for other stables using the wormhole v2 UST-3Pool on Curve. This led to a significant supply imbalance with UST becoming the majority of the pool and drying up the "exit liquidity" in other stablecoin assets for UST holders to swap to.

CROPPED-ust-collapse-chart2
CROPPED-ust-collapse-chart3

Based on the on-chain data, it appears that one large address sparked the initial de-pegging of UST. LFG was in the process of migrating some of the liquidity on its existing wormhole v2 UST-3pool on Curve in preparation for the new 4pool. Soon after LFG withdrew ~$85m from the pool, just as UST was more susceptible to price deviations from $1.00, was when several of the large address started to drain the liquidity from the pool. Simultaneously, UST came under sell pressure on Binance, also causing balances and leading to the initial de-pegging of UST.

CROPPED-ust-collapse-14

The combination of these activities—the withdrawal from Anchor, the swap on Curve, the shorts on BTC and LUNA, and the general market-wide weakness—led to concerns around the stability of the UST peg, which created a negative feedback loop that led over 11k participants to withdraw their deposits from Anchor in a bank-run scenario. Users typically followed the same exit strategy by withdrawing their Anchor deposits and bridging from Terra to Ethereum to be swapped to another stablecoin on an external exchange (mainly Curve’s wormhole v2 UST-3pool and Binance). With liquidity pools becoming increasingly unbalanced, prices for UST began to fall on external exchanges to a then-low of ~$0.98 on Sunday.

As UST started to de-peg, the Terra community quickly reacted to stabilize the liquidity pools the price of UST. Efforts to rebalance the pool were continuously needed as UST holders exited their positions at an accelerating rate. Overall, at least $500m was added to Curve pools or swapped to rebalance the pool. These actions helped stabilize UST prices a bit (back to $0.995 on Binance) Sunday. Eventually, these efforts proved insufficient in restoring the faith needed to stabilize UST. The inability to restore confidence in the algorithmic stablecoin resulted in continued downward pressure on the stablecoin and on LUNA as users continued to exit their UST positions.

Later Sunday evening, the 6 members of the LFG Council voted unanimously to deploy $1.5bn in capital ($750m in BTC and $750m in UST) in an attempt to alleviate some of the selling pressures around UST. Specifically, LFG would loan $750m worth of BTC to OTC trading firms to help defend the UST peg (i.e., sell BTC for UST) and would loan 750m UST to accumulate more BTC as market conditions normalize. With markets evolving rapidly and without the intended on-chain bitcoin redemption mechanism having gone live, the LFG BTC reserve needed to be actively managed.

Monday, May 9th - the worst is not behind us

On Monday, the broader equity markets opened sharply lower, and while crypto markets continued a third-straight week of declines. This set off more fear and re-accelerated the capital rotation out of UST. Anchor continued to see withdrawals, which then further drained the liquidity from the external exchanges, putting put downward pressure on UST’s price.

UST price held around $0.98 throughout the morning. But the outflows eventually picked back up and price broke around 2pm before stabilizing around $0.95. After 5pm, UST’s price moved even lower to $0.82 before quickly recovering back above $0.90. Shortly after, UST declined even further, hitting as low as $0.60 on some exchanges.

CROPPED-ust-collapse-chart5

Throughout this period, peg defenders including TFL, LFG, and other market participants, continued their strategy of injecting capital to rebalance the liquidity pools including one single address that deposited more than $460m.

On Monday afternoon, Do Kwon tweeted: “Deploying more capital – steady lads”. LFG then emptied its BTC address, setting off some panic given the entirety of the bitcoin balance was moved, which contrasted with the communication from Sunday night that just a portion of LFG reserves would be put to use. On-chain analysts and sources disagreed as to the destination of the spent BTC. Regardless, it appeared that the majority of LFG’s BTC was transferred from the LFG wallet to market-making partners who could presumably use it to further defend UST’s peg.

CROPPED-ust-collapse-chart6

Given the opacity of centralized exchanges, it’s not clear how the Bitcoin was or is being used or how much has been sold. Still, BTC transfers onto exchanges this past week reversed a long-term trend of declining supply of BTC held on exchanges. The growth in this metric is potentially attributable to the LFG deposits as well as declining market sentiment, which led to other BTC holders seeking to sell their coins.

CROPPED-ust-collapse-chart7

During the heightened market activity Monday, some platform issues emerged on the Terra blockchain itself. Terra experienced broadcast delays on Monday afternoon, which increased the difficulty for transactions to be submitted to the blockchain, leading to network congestion. Some users took to Twitter to complain that application frontends were not properly updating even though submitted transactions were showing up in block explorers. THORChain paused trading and LP actions automatically due to Terra’s network instability. Anchor acknowledged an indexer issue that affected updates to the frontend, specifying that there were no withdrawal caps and that the deposits displays were not intentionally frozen. Others pointed to some validators running on bad servers leading to validator downtime.

An analysis by Flipside suggested that bots had spammed the network with transactions. Many validators also had an upper limit on their mempool set at 5,000 transactions, which slowed processing times and led to many failed transactions.

LOW QUALITY SCREENSHOT 1

Binance temporarily suspended withdrawals on Terra and also temporarily prevented selling of UST below $0.70, effectively setting a price floor. While Binance did not officially communicate any reasons for preventing UST selling below $0.70, one explanation was that Binance already had set its internal limits to trigger a circuit breaker and it wanted to create time for a more liquid market to emerge.

Tuesday, May 10th - Do is working on it

Early Tuesday morning UST was trading as low as $0.60 but quickly rebounded back above $0.90 where it traded in a narrow range throughout the day.

The de-pegging of UST captured the attention of U.S. Treasury Secretary Janet Yellen during a Senate Banking Committee hearing, where Yellen urged Congress to pass stablecoin legislation citing TerraUSD specifically. “A stablecoin known as TerraUSD experienced a run and declined in value. I think that this simply illustrates that this is a rapidly growing product and there are rapidly growing risks.”

Later Tuesday afternoon, reports of LFG’s active pursuit of capital relief began to disseminate. The Block’s Larry Cermak had shared some details behind LFG’s negotiated terms, including that it was targeting a $1bn-$1.5bn in total funding. However, LFG and Do Kwon had failed to confirm the closing of any new funding, leading the market and the asset pair to continue sliding.

Wednesday, May 11th - UST and LUNA continue to spiral

Markets spiraled overnight with the price of UST experiencing further volatility. UST briefly touched new lows of $0.19 while the LUNA continued to plummet.

Early Wednesday morning, Do Kwon released a statement, sharing details behind Prop 1164 to “Help UST Pegging. Increase estimated minting capacity to $1200M”, a proposal to increase the minting capacity of the on-chain market module. The mint/burn limits initially put in place had led to traders taking advantage of the slow mint/burn mechanism by front running and selling LUNA, causing worse price execution of the mint/burn. These actions resulted in the minting of even more LUNA. To stop this unproductive and volatile battle, the proposal aimed to first absorb the stablecoin supply that wanted to exit before UST could start to re-peg.

Do added, “As we begin to rebuild UST, we will adjust its mechanism to be collateralized.” However, Do’s communication notably left out any specific details regarding any funding tied to the recovery plan,, causing market participants to suspect the deal had not materialized.

By Wednesday’s end, more than 2.1bn in UST had been burned, a 77% increase from the prior day. This coincided with an expansion in LUNA supply of 1.2bn, averaging .44 LUNA minted for each unit of UST that was burned.

CROPPED-ust-collapse-chart9
CROPPED-ust-collapse-chart10

All the market activity with UST translated into the busiest days in Curve’s history with 5/12 generating a daily record in trading volumes with over $3.3bn, nearly doubling the previous record which was just set the day before on 5/11.

CROPPED-ust-collapse-chart11

Thursday May 12th - halt the chain

By the time of writing, UST had not recovered to its $1 peg, instead trading around $0.38. LUNA had fallen to $0.038, down 99.9% from its closing price of ~$77 on Friday, May 6.

General fear around stablecoin viability spread to other coins, including Neutrino Dollar (USDN) and then Tether, which eventually traded as low as $0.92 before recovering to $0.997 at the time of writing (Thursday 4pm ET). USDT fell to $0.92, as investors rushed to other stablecoins like USDC.

CROPPED-ust-collapse-chart12

Terra validators decided to halt the blockchain “to prevent governance attacks following severe LUNA inflation and a significantly reduced cost of attack.” Prior to the de-pegging of UST, more than 40% of the LUNA supply was staked. By 5/12, as supply growth and price decline showed no signs of slowing, many had un-staked their positions, leaving only 4.7% of the total supply staked. With LUNA’s price under $0.02 and the total supply of LUNA at nearly 45bn, this implied that less than $50m was left to secure the Terra blockchain – an extremely high vulnerability.

LOW QUALITY SCREENSHOT

How did this happen

Was the market module not working as intended?

Terra on-chain UST is designed to always equal to $1 of LUNA through the market module—the mechanism meant to stabilize UST prices back to $1. However, there were several parameters set around the mint/burning mechanics that limited the pace and the amount of UST redemptions:

  • The market module has some daily minting limits in place with redemption capacity set at $293m – this limit has periodically been adjusted through governance proposals as the system continues to scale. There have been 4 changes to the liquidity parameters since 2021 with the latest occurring on 2/1.

  • The redemption parameters also include a PoolRecoveryPeriod variable that slows the burning speed of UST, which is meant to operate as a safety mechanism to deter any significant gaming of the mechanism.

  • Last, the basepool parameter impacts the calculation of the variable spread fee that is added to any swap between Terra and LUNA, which increases based on the volume of mint/burn activity that has occurred (floor set at 0.5% but spread fee has spiked to over 50% at points which was still economical for users as UST traded below $0.50).

While these safety parameters were intended to limit the volatility in supply changes, they may have resulted in slowing the peg recovery process. The limiting mint/burn parameters also intensified the selling pressure on LUNA because traders were able to see the pending burns of UST and concurrent mints of LUNA. Traders sold LUNA in anticipation of coming inflation before it actually occurred. This led to even greater quantities of minted LUNA through the market module, which were quickly sold.

CROPPED-ust-collapse-chart14
CROPPED-ust-collapse-chart15

There were also several technical issues that directly impacted market participants and may have weighed on sentiment as events unfolded. Terra validators ran into performance issues as the network hit its throughput limits, other critical infrastructure created indexing issues that prevented applications from updating, and Binance temporarily suspended withdrawals, and prevented selling of UST below $0.70. TFL and LFG also hoped that the on-chain bitcoin reserve system would be live so users could have the choice of redeeming UST for bitcoin rather than LUNA. This would have alleviated some of the pressures on LUNA by reducing the supply expansion, though it’s unclear how that would have impacted Terra and the broader market. However, the mechanism for integrating the acquired Bitcoin into the UST redemption process had not yet been implemented, effectively leaving the Bitcoin in the hands of the LFG (which appears to have resorted to conducting open market operations with it to defend the UST peg).

The parameters of the market module and the spread fee could have been better optimized to reduce the volatility of UST and LUNA prices as some of the limits in place drove participants from the on-chain mint/burn mechanism to using some of the external exchanges (where the on-chain mint/burn market module was unavailable and where the de-pegging ended up occurring at scale). The market module was not being utilized to its full extent during the first couple of days even when it wasn’t at its daily minting limit when it was still economic to do so with the spread fee. It’s clear now that users didn’t opt to use the market module when there was no demand to hold LUNA as its price was plummeting. This dynamic, the loss of confidence in UST during a simultaneous drop in LUNA prices is the algorithmic stablecoin “death spiral” that LFG had sought to avoid (we described this dynamic in our March 25, 2022 newsletter). Those early withdrawers from Anchor instead opted to exit by bridging away from Terra to sell their UST on external exchanges, where speculative trading activities from non-UST holders exacerbated the market movements of UST and LUNA.

CROPPED-ust-collapse-chart16

As withdrawal of UST deposits on Anchor started, the change in UST supply was at relatively minimal levels for the first couple days, suggesting that users were not making much use of the on-chain mint/swap function. The total change in UST supply from 5/7 – 5/9 was a decrease of 165m, representing just 2% of the 6.2bn in net decrease in UST deposits on Anchor over the same three days. Then, More UST was burned over the next 2 days as the price of UST deviated further from its peg; 5/10 and 5/11 saw 1.2bn and then 2.1bn UST burned, which represented 57% and 81%, respectively, of the daily net change in UST deposits on Anchor. Bridge outflows (not to scale with the other categories as it’s measured in dollar terms) have been the primary exit route for Anchor withdrawals.

These de-pegging vulnerabilities were largely exposed due to TFL’s plans to expand UST beyond Terra across other chains where most of the market moving activity occurred. One of the necessary components for UST to expand across chains was using external exchanges like Binance and Curve, where TFL was going to rely heavily on the 4pool to expand its presence. Having low levels in these external liquidity pools made UST more susceptible to price fluctuations outside of Terra’s market module’s mechanisms. The open market operations conducted by LFG then made the vulnerability even worse as LFG was in the process of migrating its liquidity.

Having more off-chain liquidity would have reduced some of UST’s vulnerability to price manipulation and supply imbalances. TFL noted this in past improvement proposals as potential weakness. If everything was on-chain on Terra, the stabilizing mechanisms would have had greater control over the fluctuation of UST, potentially mitigating the de-pegging and containing any contagion that affected the broader market.

Examining Stablecoin Designs

Not unlike the scaling trilemma (where blockchains often make trade-offs between decentralization, scalability, and security), stablecoin designs can largely be assessed along three factors:

  • Price stability. This refers to how well a stablecoin maintains its peg and the strength of its redemption procedures and guarantees. With stronger reserve guarantees, fiat-backed stablecoins generally maintain better peg stability to the dollar than crypto-backed stablecoins, however the reserves backing certain “fiat-backed” stablecoins do often comprise assets other than fiat currency, at the discretion of the issuer, that may be less liquid in a mass redemption scenario. Overcollateralized stablecoins tend to provide stronger redemption guarantees than algorithmic stablecoins.

  • Scalability. This includes factors like how quickly stablecoin supply can expand and how capital efficient it is. Both fiat-backed and over-collateralized stablecoins are constrained by their capital deposits and reserves. Because they are not collateralized by fiat currency or other physical assets, algorithmic stablecoins could theoretically scale to meet higher levels of demand without being constrained by the amount of collateral they can obtain.

  • Decentralization. Decentralization in stablecoins generally refers to being uncensorable to a greater degree than not relying on a centralized entity to properly function. Fear over the censorability of off-chain fiat-backed stablecoins like USDT and USDC drove greater demand for a more decentralized money, leading UST to become one of the fastest growing stablecoins.

CROPPED-ust-collapse-chart17

The trade-offs along these factors between various stablecoin designs are not always evident until a stress-testing event occurs. Compared to overcollateralized stablecoins, UST has prioritized growth and capital efficiency and has always been subject to the risk of reflexivity and death spiral. But it had not been properly stress tested in adversarial market conditions. During a bull market, it is easier for UST to maintain its peg as the LUNA ecosystem grows. But against a weak macro backdrop in a rising interest rate environment, the capacity for peg defenders to act as a backstop weakened.

We have seen market conditions shift demand between different stablecoin types. The geopolitical developments in recent months may have led some market participants to over-index on the property of censorship-resistance vs. stability. Then later this week, we saw increased demand for USDC at Tether’s expense. Market participants may emphasize downside protection more after the de-pegging of UST and in the face of more regulatory attention on the safety guarantees and potential vulnerabilities of different stablecoins. It remains unknown whether we will see a “decentralized” algorithmic stablecoin that exists outside the reaches of policymakers and regulators, given almost all of them still rely on a centralized team to back them up. But as teams iterate, we will likely see more attempts at building stablecoins that achieve strong redemption guarantees while minimizing exposure to censorable assets or entities.