Lessons from the Collapse of Terra and UST Stablecoin
- nashv7
- Oct 1, 2022
- 8 min read
Updated: Oct 22, 2022
On May 19, 2022, the US Terra “Stablecoin” collapsed catching many by surprise including crypto luminaries and well-heeled investors.
How were so many blindsided?
There are essentially two stablecoin models: collateralized and uncollateralized. Collateralized stablecoins like USDC or Tether maintain financial reserves like currencies or bonds to ensure that holders of these synthetic dollars can redeem them for actual money, at some point.
Algorithmic stablecoins forego this fail safe and attempt to maintain their pegs through other financial means. UST was used as an on-chain redemption tool and a related token, LUNA, was supposed to prop up UST’s value based on changing supply and demand. LUNA was burned or minted as UST rose or fell against the dollar. UST relied solely on arbitrageurs to maintain its peg to the US dollar. It did this by contracting the supply of UST when it was below peg and expanding Luna and vice-versa when it was above peg.
With UST below peg, arbitrageurs could mint $1 worth of LUNA by buying and burning UST. They could then sell Luna immediately.
With UST above peg, they could mint $1 worth of UST by buying and burning LUNA to sell back on the market trading at a premium.
The rationale for UST and similar algorithmic stablecoins was to counter the risk of custodial stablecoins being vulnerable to government regulation and censorship. The purpose was to create a “crypto-native” dollar – with all of the supposed benefits of blockchains, like censorship resistance – that would be cheaper to use than a fully or partially collateralized option. Unfortunately, the algorithmic stablecoin is vulnerable to cyberattacks and market manipulation.
The UST debacle began with an attack on the Terra network by a malicious, powerful and wealthy entity that seems to have profited immensely from the consequences — probably to the tune of an estimated $1 billion or more. To understand how a single entity managed to topple such a large network, it is necessary to understand the backdrop for the attack.
Innovative Technology & Large Ambitions
Major traditional and DeFi payment networks, such as PayPal (PYPL) orTether (USDT), seek to be used primarily as a medium of exchange. Terra wanted to grow beyond that. It wanted to become a true alternative to the U.S. dollar. It was an ambitious goal, which, in retrospect, had numerous pitfalls.
But the grandiosity of the endeavor helps explain why so many projects and investors poured their resources into the project. The huge upside they saw is called “seigniorage” — profiting from the difference between how much it costs to create the money and how much the money is worth. To achieve and maintain seigniorage, they needed to find a way for market participants to stay in the ecosystem. That’s the tricky part. They invented Anchor Protocol, an overcollaterized lending platform to enable lenders to earn interest on their UST deposits to fund borrowers using their crypto coins as collateral. Anchor kept users invested in the UST stablecoin and theTerra ecosystem by providing near-20% yields, partially subsidized by investors, and this attracted a growing number of users.

Fig 1: Overcollaterized Lending with Anchor Protocol
• LTV Ratio = Loan / Total Collateral
Max LTV depends on volatility of asset
• Borrower deposits collateral, receives loan up to LTV ratio of collateral
As long as loan interest is paid, collateral can be withdrawn by borrower at any time
Collateral is liquidated if LTV ratio exceeds over-collaterization ratio (~120%)
• Lender receives interest on deposit
• Investor provides bootstrap liquidity to yield reserve
• Yield Reserve maintains operating capital
Inflow = Rewards + Borrower Interest + Investor Capital
Outflow = Lender Interest
• Incentive rewards are distributed as needed
With Anchor, users were attracted to the site by the opportunity to earn passive income that beat anything available in traditional finance and was also very competitive in the world of DeFi. Meanwhile the Terra team thought the higher yields were essential for the wider adoption of LUNA and its stablecoin, UST. As investors and institutions bought more LUNA, the amount of UST in circulation grew faster than expected, making it the third-largest stablecoin in crypto, and, among decentralized stablecoins, the largest of all.
UST’s growth rate of 63% in the first quarter of the year — along with LUNA’s price rise to an all-time high around $119 in April — made the Terra network almost irresistibly appealing to new developers, projects and big funds. Many sought to participate, and their involvement further improved user confidence across the board.
That’s essentially where the problems began: UST grew too big too quickly, and the Terra team needed to scale the network quickly to stay in sync. Here’s the key: UST was an algorithmic stablecoin, backed strictly by LUNA at the time. That’s why the Terra team founded the Luna Foundation Guard (LFG). With the help of other hedge funds like 3AC, Jump Capital and Delphi Digital, they sought to diversify the collateral beyond LUNA to other assets. And shortly thereafter, Terra announced the purchase of $10 billion worth of Bitcoin to further strengthen the collateral backing UST. This was a step in the right direction. It was a factor in Bitcoin’s rise to $47,000 at the end of March and LUNA’s rise to its all-time high in April. And it was very reassuring. Across the crypto market, many believed this was all that was needed to solidify the network.
Fueled by that belief, the Terra team then turned to expand the adoption of UST even further. They sought to popularize UST beyond Anchor to other protocols, such as Curve. Curve is a decentralized exchange and money market exclusively for stablecoins with the largest total value locked (TVL) for stablecoins ($8.51 billion). The way Curve works is simple: It has liquidity pools with various stablecoins and, in theory, those pools should have the same ratio between them. That means you should be able to swap between stablecoins without losing significant value with slippage. In other words, without much difference between the expected price of an order and the price achieved when the order is executed. It’s a handy feature, especially for investors seeking to minimize unnecessary loss while navigating through DeFi. But the founders of Curve found a way to further incentivize users to maintain these ratios themselves: They gave rewards to market participants who could do just that.
Inspired by this — and not to be outdone — Terra’s founders announced the launch of their own new pool, called 4pool. And, to prepare for their launch, they withdrew a significant amount of liquidity from their Curve pool so it would be ready for deposit into 4pool when it opened. But by so doing, they exposed a weakness that a single bad actor could exploit. And, as it turned out, there was someone waiting in the wings for this kind of situation. So, that’s the background. That’s how and why Terra found itself in a vulnerable position.
"The Attack"
What happened next is verified by on-chain data — a fundamental feature of decentralized finance that has proven to be a valuable tool for research and analysis of past and present events. That record is what allows users and analysts to clearly discern what happened and recognize that the mishaps that followed were not a fluke or accident. Nor were they a rooted in some failure of Terra’s smart contract. Rather, it was one of the most sophisticated, large-scale attacks ever seen in crypto history. It’s even been compared to when George Soros virtually broke the Bank of England.
The stage was set when the folks behind Terra withdrew UST from their existing Curve pool, leaving the pool out of balance. To rebalance the pool and prevent an investor exodus, the Luna Foundation Guard (LFG) wallet, a major defender, sold 50,000 ETH and sent another 20,000 to Binance. It worked. No one ran. And this reinforced the narrative that gave so many users and investors comfort. They came away reassured that big players could defend UST’s dollar peg.
But those big players couldn’t protect against what happened next:
Someone or some group began an attack on UST, dumping it in larger and larger quantities. Initially, it didn’t look suspicious. Soon, however, the transactions piled up, reaching a total of 350 million swaps on Curve.
Thus, the attacker was able to push UST below $1.00, creating a small de-peg.
Misinformation about UST’s collateralization and fear over the de-peg was spread all over Twitter. The attacker then moved from Curve and began selling UST on Binance, the centralized exchange with the largest UST market. To drum up further fear, uncertainty and doubt (FUD), the attacker began shorting Bitcoin. The attacker apparently knew that the Luna Foundation Guard would be forced to sell its Bitcoin in order to protect the peg, which would then weaken the price of BTC. By shorting, they triggered even more BTC selling, which, in turn, led to more selling. But the attacker’s goal was not so much to depress the price of BTC. It was to weaken the BTC collateral behind UST and de-peg UST even further. Users soon realized that their Bitcoin collteral was inadequate to restore the UST peg, and they rushed to get out of UST. They withdrew funds from Anchor. Many users even sought to redeem their UST for LUNA and then sell the LUNA to recoup losses.
Unfortunately, that only served to push the market down even more. And ultimately, the pressure was so great that the mechanics of Terra’s protocol — intended to always balance LUNA against UST — also failed. (For example, if the price of UST was, say, 99 cents, an arbitrageur could burn their UST for $1 worth of LUNA. If the price of UST was $1.01, an arbitrageur could mint extra UST with only $1 worth of LUNA. And the market price of UST would quickly come back to $1.)
Why did it fail?
Not only was there a massive attack, but there also was a daily limit of $150 million on arbitrages. And the arbitrages possible within that limit were not enough to absorb the impact of all UST sales. Eventually, investors began shorting LUNA, as well. Why such a limit was in place is still unknown. But it helps explain why LFG and Jump Capital decided to stop defending UST’s dollar peg. Yes, they’re probably the biggest market makers in crypto. And yes, they had every intention of defending the peg. But once they realized what was happening,they backed off. It was also at this point that we decided to act. We recognized there wasn’t enough transparency from the folks behind Terra. They were silent. Equally concerning was a lack of clear evidence that the Luna Foundation Guard actually used all its reserve funds to protect the peg before their decision to stop. Yes, 80,000 BTC did move from their reserve to Gemini and Binance, but there was no clarity on whether those were sold directly on the exchanges, or if they were merely traded back and forth. Investors feared that, instead of protecting the peg, those reserves were used mostly to buy out whales, protecting their investments at the expense of smaller users.
It turned out to be the nail in the coffin for LUNA/UST. And sure enough, many hours later, the death spiral resumed, ultimately dragging the price of Terra to nearly zero and the price of UST to 10 cents on the dollar.
This does not augur well for algorithmic stablecoins like UST. But it should strengthen the cause for stablecoins like Tether and USD Coin (USDC), which are backed by solid collateral. The Terra network was a decentralized experiment at the highest level imaginable and, in the end, its unusual success was the root of its unusual failure. Despite everything, all leading stablecoins are trading at $1.00, or at a small fraction above or below $1.00. And despite the turbulence, the two largest cryptocurrencies in the world, Bitcoin and Ethereum, soon stabilized at price levels that could have normally been expected even in the absence of all the above events. Although other bearish forces in the broader market environment could still drive prices lower, those have little or nothing to do with Terra or UST.
The Terra episode was a costly one (to the tune of billions of dollars) but an invaluable learning experience for all investors. It demonstrates the need to be wary of market manipulators and should help pave the way for continuing growth and yield opportunities in the world of decentralized finance.
Reference
Marko Grujic, "UST and LUNA Postmortem Review", May 2022



Comments