terra-revival / backtest

Python backtesting engine for USTC or any Terra Classic Stable Algos
Other
6 stars 2 forks source link

LUNA/USTC lessons learned from the crash #17

Closed 413x45h4w closed 11 months ago

413x45h4w commented 1 year ago

Having spoken in detail with Do Kwon, multiple TFL insiders, and many other ecosystem participants over the past year, here is my best “mosaic” view of the downfall of UST. I am posting it here to inform the community discussion on USTC’s path forward.--4lex

The pre-crash UST had $19B in circulation collateralized by $100-120B of LUNA (fully diluted), or perhaps $60B circulating supply.

UST in existence had ballooned over the course of 2021 from $1B to a peak of $19B by late April 2022. ~75% of UST was deposited into Anchor, the “central bank” of Terra, which offered 20% yields on UST.

For a while, UST’s yields were sustainable. During 2021, the global supply of dollars was expanding in the double-digits, and the crypto-economy saw a disproportionate share of that increase. Within the crypto-economy, Terra seized the spotlight because

-it had a genuinely differentiated product narrative (a decentralized stablecoin) -its founder, Do Kwon, was an outstanding coder and marketer and product designer, a very rare combination in DeFi -Terra built on an SDK (Cosmos) which offered the very low-fee Ethereum alternative that was in vogue at the time -TFL’s builders were, by crypto standards, highly productive and UX-focused -Terra had a very easy-to-use, 20%-yield money market protocol (Anchor) which became wildly popular.

When the crypto bear market started in January 2022, DeFi’s decentralized money-market rates (driven by crypto participants’ demand for leverage and risk tolerance) collapsed. Anchor didn’t lower its own rates in line with the crypto market. This caused 2 things.

In the short term, UST gained stablecoin market share against competitors, since it offered higher rates which depositors couldn’t find elsewhere However, borrowing demand was falling everywhere, so Anchor wasn’t able to offset its high rates with borrowing, as had been the case before The Anchor community became angry, since the Anchor protocol was effectively paying astronomical interest rates to subsidize unsustainable demand for UST deposits which it couldn’t lend out.

Do Kwon, recognizing Anchor’s central role in UST, temporarily alleviated these concerns when he personally donated first $50M, and then $350M more, into Anchor’s Treasury, to keep underwriting Anchor’s ability to pay high interest rates on its deposits in 1Q22.

This decision, which I believe was meant to buy time while Anchor governance figured out a middle path forward while defending UST’s expanded market share vs other stablecoins, proved to be a fatal error of judgment. The market judged that Anchor had become “too big to fail” within the Terra ecosystem and had an infinite backstop paid for by Kwon and TFL.

Large crypto-adjacent firms like Celsius poured billions more into Anchor as a result. It quickly became clear that even Kwon’s $350M helicopter-drop wouldn’t keep Anchor in business for very long. Anchor’s deposits quickly ballooned from an already-unsustainable $7bn or so. However, since more UST was being minted, more LUNA was being burned, LUNA was mooning amidst a massive bear market, so nobody cared.

At the same time (4Q21/1Q22), Kwon was selling off-chain, long-dated options in the Luna Foundation Guard to raise funds for a BTC reserve that could collateralize UST.

By mid-April, 2 activist funds (Polychain and Arca) had initiated a governance activism campaign on Anchor to lower deposit rates. The key players of the Terra ecosystem (Jump and TFL) were torn. TFL (Kwon) prioritized UST market share, which was expanding thanks to Anchor’s high deposit rates. Others, very likely including Jump, wanted to slam the brakes and dramatically lower Anchor deposit rates.

By late April, Anchor’s breakeven deposit rate (the point at which borrowing demand matched deposit payout obligations) was 4.5%, yet it was still offering 19% yields (thus, it was hemorrhaging money, and would need another Do Kwon bailout very shortly). TFL and Jump Crypto held a secret meeting in Chicago to roadmap an Anchor update to convert Anchor deposits into 2 types: a 30-day deposit rate (which would offer 15% yields) and the existing overnight deposit (which would offer only 4.5% yields). This would’ve slowed the unsustainable growth of UST on Anchor and reduced Anchor’s need for a bailout.

However, crypto markets were disintegrating faster than TFL was adapting. Over the fateful weekend of May 7-8, several of Terra’s largest whales started making very large withdrawals.

At the time, UST’s liquidity had expanded to many venues outside of the Terra chain. The main venues were Binance, FTX, and Curve.

In Terra’s earlier phase, Terra had complete control over its capital control system. Basically, if a user converted UST to LUNA (selling UST), s/he had to pay an exit tax. This tax would be .1% if nobody else was withdrawing, but if more people were withdrawing beyond a certain threshold, the exit tax would shoot up to as high as 100% if enough net selling occurred over a given time period. This allowed the system to keep itself algorithmically solvent no matter how many people were trying to withdraw at the same time.

However, in Terra’s new hypergrowth phase, as UST expanded to off-chain secondary markets, UST’s CCS could no longer evenly tax all sales of UST. UST’s off-chain prices collapsed first on Curve and Binance, while the chain was offering much higher prices (somewhat offset by the on-chain tax, but even net of the tax, the chain was getting “bad fills” for arbs since the arbs were paying such high taxes). This situation spiraled out of control after Tuesday, when the Luna Foundation Guard had run out of money to defend UST at the lower, off-chain Curve and Binance prices.

As the crash deepened, the complex arbitrage system that supported UST’s value between on- and off-chain venues broke down because UST sales and arbs were being taxed at very different rates. TFL ultimately brute-forced tax rates down to 40% because it needed a functioning arbitrage system across different venues.

There are many critical lessons from UST’s fall, but 2 of them stand out.

First, a stablecoin needs organic borrowing demand in order to support positive “real interest rates” (interest in excess of the growth in money supply). It’s very likely that Anchor was offering deeply negative “real interest rates” during the summer/fall of 2021 when its nominal interest rate was 20% because the money supply of the Terra ecosystem was growing so much faster during DeFi summer, Federal Reserve monetary stupidity, etc. However, once the crypto recession started, Anchor’s static rate was wildly inappropriate. So the interest rate a stablecoin protocol offers should be algorithmically driven by market forces, not by governance.

Second, capital control systems become much more fragile and complex when off-chain liquidity is involved. The Terra system heavily relied on third-party arbitrageurs and liquidity agents like Jump, Kujira, and White Whale to maintain its peg across different venues. Arbitrageurs make money when price differences more than offset their cost of capital, cost of volatility, and transaction costs. Capital controls, beyond a certain point which TFL determined was a ~40% tax rate, impair arbitrageurs’ ability to make profit and thus damage liquidity.

So the viewpoints of third-party liquidity providers and venues is extremely important when discussing a new capital controls system.

OhhBilboBaggins commented 11 months ago

Tracked in this CW Thread:

https://commonwealth.im/terra-classic/discussion/12110-lunaustc-lessons-learned-from-the-crash