The LUNA-UST post-mortem: A case of ego and greed blunting the blade of true innovation
"Whether it was a coordinated attack or simply an opportunistic trade. The point is if it can be attacked, it will be attacked."
Market volatility and price fluctuations are pretty standard in the crypto space, but nothing could have prepared anyone for what happened this past few months in the crypto market. It was mayhem across the board brought about by a singular project —Terra LUNA! Even veteran players and investors in the space couldn’t have predicted the Black Swan catastrophic crash of the LUNA-UST project. The LUNA token went from $85 with a peak of $40 billion in market cap plummet to zero in 72 hours, causing the infamous algo-stablecoin, UST, to depeg to as low as $0.30 and eventually led to a death spiral. If anyone had brought the mentality of the “too big to fail” that once wrecked carnage in the global banking system, they must be thinking otherwise now. For the sake of history and documenting the biggest fall of a protocol since the birthing of cryptocurrencies, I did a post-mortem of the LUNA-UST death spiral, covering the spillover it caused in the broader DeFi space.
Terra to the world
Terra was created to be a global, user-friendly platform for electronic cash built on one of the most robust ecosystems in crypto, Cosmos, using the Cosmos SDK module Terra runs on a Tendermint Delegated Proof of Stake algorithm. With Cosmos, Terra is primed for interoperability with various blockchains on the Cosmos ecosystem and bridges to other networks such as Ethereum and Avalanche, allowing for movement of value across non-native chains. Tendermint, the Delegated Proof-of-Stake (DPoS) consensus mechanism, enabled Terra to secure its network by allowing token holders to delegate their funds to certified validators who run nodes on the network and vote on the validity of blocks. Validators also play a part in the governance of the blockchain.
Founded by Do Kwon in 2018, Terra's original goal, stipulated in the project's whitepaper, was to fulfil what Bitcoin initially set out to be, becoming a peer-to-peer electronic cash system. To achieve this, Terra launched a network of stablecoins pegged to various fiat currencies such as TerraCNY (Chinese yuan), TerraEUR (euro), TerraBGP (British pound), TerraJPY (Japanese yen), TerraKWR (South Korean Kwon), TerraSDR (the International Monetary Fund) and of course, TerraUSD (UST). UST is the de facto stablecoin on the Terra network and closely tracks the US dollar price through a mechanism that involves maintaining its stability using the network's native token, LUNA. Today, the Terra ecosystem boasts a vibrant developer ecosystem with over 100 natively built projects across DeFi and NFTs. Well, that was until a week ago when everything came crashing down. To understand the catastrophic collapse of what was once one of the most revered blockchain networks, we need to look at the mechanics behind Terra's most popular algorithmic stablecoin, UST.
TerraUSD (UST): The algo-stable that was supposed to make a difference
Stablecoins are cryptocurrencies that maintain parity with non-volatile assets. The idea is to have an asset that holds a stable value, especially in a highly volatile market such as crypto, bridging between traditional and decentralised finance. The most preferred asset is the US dollar. So a lot of stablecoins closely track the value of the US dollar in a 1:1 peg ratio. But not all stablecoins work the same way. Traditional stablecoins like USDT and USDC are said to be backed by fiat cash and other traditional assets. There are also crypto-collateralized stablecoins, most notably Maker's DAI. These stablecoins leverage the collateral model to maintain their peg to the dollar. But Terra's UST belongs to a category of stables called algorithmic stablecoins. Instead of collateral, algo-stables like UST rely on market incentives to maintain their peg.
With a dual token model, UST is created by burning Terra's native token LUNA using smart contracts. The idea here is that you can burn a dollar’s worth of LUNA to mint one UST at any given time. The reverse also applies to redeeming one UST for a dollar’s worth of LUNA. For example, if you have $50 and burn LUNA, you should be able to mint an equivalent 50 UST. This is also applicable to all stablecoins on the Terra network. The network uses the arbitrage mechanism, which allows traders to take advantage of price deviation in these assets to make profits. For instance, if an increase in demand for UST causes the stablecoin to trade above $1, say $1.01, arbitrageurs can dilute the supply of UST by converting $1 worth of LUNA and then earn a profit of $0.1. The reverse is the case if UST trades below the $1 mark. But this is basically how most algorithmic stablecoins work, and all that came before UST has succumbed to an inherent risk with the algo-model—the death spiral risk. A death spiral is a situation in a dual token model where the demand contraction of one asset leads to a fall in the price of the other. Then the fall in the price of the latter invariably leads to more demand contraction of the former, which causes further sell-off of the latter and so on until the whole system collapses.
So what made UST different from previous algo-stables such TITAN, ESD and "Basis Cash" that ultimately came crashing down?
Terra's team recognised this inherent risk, which is why efforts were made to diversify the utility of the LUNA token. Unlike the other failed algorithmic stablecoins whose native token's utility was mainly for maintaining the dollar peg of the stablecoin with little utility or incentive for users to hold the token, LUNA's utility spanned across the Terra ecosystem. Apart from UST, it is also what maintains the peg of Terra's other stablecoins, used to pay for network fees and participate in governance. By increasing the underlying utility of the network's base token, Terra gave users a reason to hold the LUNA token beyond just acting as a tool for maintaining the network's stablecoins. This would help prevent a death spiral or bank run event because if there's enough value associated with the base token, there would be less reason to part with the asset. Additionally, token holders can stake LUNA for yield.
The token mechanics design here seemed sound and reasonable. Which begs the question: why did it go wrong?
Growing too fast. The dangers that lurk
The Terra ecosystem grew gradually and steadily before the crypto downmarket at the end of 2021, which was believed to have served as a stress test for the algorithmic peg. The LUNA-UST algo-project performed well and stayed within $0.998 and $1.006 even as the broader crypto markets saw wild price swings. This was the turning point for stablecoin as it started to gain the trust of the wider DeFi community. Doubts and concerns about UST's potential as a truly decentralised stablecoin, despite the risk of being an algorithmic stablecoin, began to die down. Coincidentally, this was when founder Do Kwon's arrogant rhetoric on Twitter became more apparent.
As confidence grew, so did traction, especially as top rival stablecoins such as Tether's USDT drew regulatory scrutiny for their opaque reserves. UST quickly went from relative obscurity to becoming the fourth-largest stablecoin behind USDT, USDC and BUSD. The market capitalisation of UST exploded in November 2021, starting the month at less than $3 billion and quickly reached over $15 billion market cap in March 2022, according to data by CoinGecko. This growth was also primarily driven by the 20% fixed APY offered by Anchor, Terra's leading decentralised money market. With new users trooping into the Terra ecosystem searching for juicy yields, Anchor quickly shot up to over $15 billion in TVL within a year, as data from DeFiLlama showed. All of these helped pump the network's native token, LUNA, growing by 138-fold, trading at $0.66 at the beginning of 2021 to an all-time high of $104.58 on March 9, 2022, at a time when most other cryptocurrencies were heavily impacted by macro factors such as inflation and the Ukrainian invasion crisis.
UST was hitting the strides. With a very vibrant community (LUNAtics) and a charismatic leader in the person of Do Kwon at the helm of affairs and leading the charge, nothing was stopping Terra from taking over the world of DeFi.
WAGMI right? Well, not quite.
Here's the problem.
LUNA-UST was growing fast. It grew faster than the liquidity it needed to prevent any bank run event effectively. Moreso, the value of LUNA, a function of its utility within the Terra ecosystem, was far from enough to incentivise HODLing. This is because as UST adoption increases due to the juicy rate offered by Anchor, the value of LUNA increasingly becomes dependent on the Anchor protocol. Nothing else on the Terra network grew comparatively to Anchor-UST. In other words, the Terra ecosystem's rapid traction became the network's Achilles heel. People began to notice the unsustainability of the model. But to make matters worse, Do Kwon's disparaging rhetoric on Twitter against anyone who dares to raise concerns or criticise the project misled the LUNAtics community into believing that all is well with the project. The founder had the community hooked on the WAGMI juice. The herd mentality was in full swing. Savvy investors and experts knew the project was headed for catastrophe only that no one would have imagined that it would be to an unprecedented degree.
Regardless of Do Kwon's egoistic behaviour and his inability to publicly admit the fair concerns raised by many in the DeFi community about the unsustainability of the trajectory, the LUNA-UST project is on. He and the Terra team recognised the risks and continued to make a series of moves to mitigate any potential fallout. The first move was the $1 billion raised by the Luna Foundation Guard (LFG) to form a bitcoin reserve for UST with a long-term goal of accumulating a total of $10 billion in bitcoin reserves to act as "a release value for swelling pressure to exit UST to LUNA on-chain, dampening the reflexivity of the system by reducing dilution of the LUNA supply during severe contractions''. The second move came later in April with the announcement of the new Curve's 4pool (UST-FRAX-USDC-USDT). This was an attempt to deepen the liquidity of UST to meet the rapidly increasing demand and increase the difficulty of attacking UST pools. However, Do Kwon's unwillingness to effectively communicate the reality of the project's situation to the LUNAtics community ultimately led to the heavy price investors had to pay for his recklessness.
The unprecedented death spiral of LUNA-UST
What exactly happened? Let's look at some series of events and timelines that led to the massive collapse of one of the most significant projects in crypto.
On 5th May, the LFG reached its $3 billion bitcoin target after a final buy of 37K bitcoins, bringing the total reserve of the LFG to 80K bitcoins.
On 7th May, two days after this mark was reached, there was a massive withdrawal from pool 53 on the Anchor protocol. The entity behind the withdrawal knew it would have an impact on the UST peg. Testing the waters?
This of course led to the depegging of the UST to 98 cents on the dollar. The peg was able to recover briefly, forcing the LFG to announce a strategy to help defend the UST peg on Monday morning.
But market conditions on Monday morning worsened as the value of both LUNA and BTC began to fall. Terra's arbitrage mechanism expectedly kicked in, but the problem was that arbitrageurs were dumping newly redeemed LUNA as soon as they received it which continued to drive the price down. And the lower the value of LUNA goes, the less confidence the market has in the robustness of the peg, which causes more UST to deviate from $1, leading to more LUNA redemptions and so on. It was a circular flywheel of redemptions and dumping. This saw UST depegging down to 69 cents on the dollar.
The LFG continued to do everything it could to recover the peg. This meant that it emptied the funds in reserve, and thanks to some deep-pocketed market makers, the peg could be restored above 90 cents on May 10.
But this was short-lived as UST went back to as low as 36 cents by the end of the week.
So summarily, what you have is a situation in which some market participants knew that the LFG had reached its bitcoin reserve target. Then, they decided to dump UST in low market liquidity conditions, knowing it would impact the peg. Possibly having taken some big short positions on bitcoin with the knowledge that the LFG will be forced to sell their bitcoin reserve, resulting in a selling pressure that would drive the price of bitcoin lower. People have described this as crypto's version of the George Soros attack.
Beyond the death spiral, a domino effect ensued in DeFi protocols.
Besides the $50 billion damage caused by a single protocol, Anchor, in less than a week, the ripple effect of this heavy loss spanned across several DeFi protocols beyond Terra. But because the attention has been focused on Terra, it is easy to overlook this event's damage to the total DeFi space. Let's examine the ripple effect of the LUNA-UST carnage beyond Terra.
Tether and Lido staked ETH depeg
Terra's collapse was the Tether depeg. The leading stablecoin saw its peg to the dollar fall to $0.94 following the LUNA-UST tumble. This doubt caused many people to move their funds off of Tether. But the stablecoin rebounded to $0.98, preventing an implosion of the entire crypto market.
Moreso, deep into the heart of DeFi, several liquidity pools on Curve experienced heavy imbalances and temporary de-pegging as liquidity providers pulled their funds in panic. Interest-bearing tokens such as cvxCRV and stETH were trading way below their pegged ratio. Oracle attack - Venus protocol and Blizz finance
Many DeFi protocols also took direct hits as a result of Terra's collapse. A notable occurrence is Chainlink's price feed incident which led to the loss of about $13.5 million for the decentralised money market, Venus protocol. DeFi protocols make use of oracles like Chainlink to provide their users with real-time price estimations of the tokens that are available on their platforms. During the free fall of LUNA-UST market price, Chainlink had to pause its price feed for LUNA at $0.1 due to the extreme market conditions. As a result of this, the price of LUNA on Venus was last listed at $0.107 while the market price was $0.01. This allowed users to dump their LUNA on the protocol and borrow other assets against it, 10X more than possible due to the erroneous data.
Another money market, Blizz finance, was heavily affected by the discrepancy in Chainlink's price feed. Avalanche's lending platform could not react in time and stop the attack due to a time lock mechanism in the protocol's code. This caused exploiters to completely drain the protocol's assets before the team could react. Data from DeFiLlama showed that the TVL in the protocol went from over $10 million to $0. Many lending protocols accumulated colossal debt due to extreme market volatility and on-chain congestion.
KAVA's colossal code backfire
One project that is probably kicking itself in all this KAVA. The protocol made one of the worst possible mistakes any project could make in the DeFi space—trust. KAVA protocol hard coded $UST to $1. This allowed users to mint $USDX, the network's native stablecoin, against UST at 99% LTV (loan-to-value ratio) without liquidation risk. Then went on to dump $USDX for other assets on the KAVA swap. This caused the de-pegging of $USDX as it was being minted against zero value of UST and getting dumped. By the time the network team was able to correct this mistake and change the UST hard peg, the protocol had already lost over $300 million in TVL. The stablecoin is gradually edging closer to regaining its peg and currently trades at $0.94.
Three Arrows Capital (3AC) collapse
DeFi is a highly experimental ecosystem, Terra’s implosion may have sparked an industry-wide sell-off, but that isn’t the most significant damage. As far as domino effects go, the biggest fallout from the fall of Terra so far is one of the leading investment firms in crypto, Three Arrow Capital (3AC). 3AC holds large positions in some of the biggest projects in crypto with an estimated AUM of over $18 billion at its peak. The firm was heavily exposed to Terra and took heavy losses as a result. But that is not the worst of it. Recent developments have revealed that 3AC was heavily over leveraged which left the fund in a precarious position going into the bear market. The rapid fall in asset prices made it difficult for the firm to repay its loans, failing to meet several margin calls. The resulting cascading liquidations led to further asset prices falling across the entire crypto market, wiping away billions of investor funds. On June 29, a British Virgin Island court ordered the liquidation of 3AC as the firm filed for Chapter 15 bankruptcy.
CeFi platforms bite the dust - Celsius, BlockFi, Voyager, Vauld
The CeFi crypto lending platform to run into liquidity problems following the market downward trajectory is Celsius. For context, Celsius had about $12 billion in assets under management (AUM) and had lent out over $billion to users as of May. So by all ramifications, the company was a unicorn in the DeFi space. While the leading lending platform was quick enough to get out of its Terra positions just before the collapse (a decision eliciting extreme negative sentiments from other whales), they took heavy losses on several other positions such as AVAX and the BadgerDAO hack. Additionally, the company was also heavily invested in Lido stETH and, as a result, had no way of accessing sufficient liquidity when users came calling for their funds. This forced the company to freeze all withdrawals from the platform. Celsius began exploring measures such as strategic transactions and liability restructuring to manage its liquidity issues. However, after it managed to close off its loan position on the DeFi platform Aave to free up the remainder of funds held in collateral. Celsius filed for Chapter 11 bankruptcy protection in the U.S. Bankruptcy Court for the Southern District of New York. It was later revealed that the company still has a $1.3 billion dollar hole in its balance sheet. The question now remains, will users ever get their invested funds back?
Another crypto lending firm, Voyager digital was one of the entities caught on the heel by the falling 3AC. The company had earlier issued a notice of default to 3AC revealing that the hedge fund failed to make payments on a crypto loan totalling $650 million. As a result of this bad debt, the company was forced to suspend trading activities, deposits, and withdrawals as it filed for Chapter 11 bankruptcy. BlockFi is another popular lending platform that was caught in the middle of a liquidity crisis as a result of its exposure to 3AC. The company is currently looking for a bailout from Sam Bankman-Fried's crypto exchange, FTX at a "variable price of up to $240 million based on performance triggers." The acquisition will provide BlockFi with enough credit facilities to protect user funds.
The latest to catch the bear market contagion is the CeFi crypto lending platform, Vauld. The Singapore-based firm also announced that they are suspending withdrawals, trading activities and deposits on the platform citing financial challenges. The announcement followed after the startup company had earlier cut 30% of its workforce. On Monday, 11th July, the company issued a letter to its creditors, disclosing that they have a shortfall of $70 million citing their exposure to Terra’s UST collapse as well as market losses bitcoin, ether and matic positions as contributing factors. The company is currently in talks with Nexo which seems to be the only notable CeFi lending platform still standing, for a possible acquisition.
It is worth noting that amidst all this carnage, DeFi lending platforms like Aave, Compound, Maker are all kicking on as expected. These recent events further validate the “code is law” maxim. The code always self regulates. This acts as a sound reminder that centralised systems, even those wrapped in DeFi cloaks are subject to abuse and exploitation without regulation. This bear market only exposed the financial recklessness in CeFi.
Is there a future for algo-stablecoins in crypto?
It is hard to say if people will ever have confidence in decentralised algorithmic stablecoins in crypto again. This may very well be the straw for many. There's no denying the fact that Terra's UST started well and could have pulled it off if it weren't for bad leadership. But this is crypto, and people tend to move on pretty quickly in this space. I believe there are still many more innovations ahead of us, and who knows, we might just get it right. Besides, projects like the FRAX stablecoin, which combines the algorithmic and collateralised models, have mainly been successful. On the other hand, Tron's algo-stablecoin, USDD, is still being tested and struggling to maintain its peg, despite Justin Sun and his team's claim that the stablecoin has not lost its peg because they have enough reserve assets to match withdrawals. So, only time will tell if there's a place for algorithmic stablecoin products in the crypto ecosystem.
Another consequence of this LUNA-UST failure is that it has given regulatory bodies one more excuse to double down on their efforts and come down hard on crypto, specifically stablecoin regulation. Many experts expect a swift regulatory clampdown on the DeFi space. Janet Yellen wasted no time calling for the immediate regulation of stablecoins amidst the LUNA-UST carnage. Therefore, it is likely that the crypto space will start seeing more regulatory presence in little to no time, which might affect or limit many protocols and how they operate.
What's next for Terra
Experts in the crypto space believe that the Terra debacle could've been managed better and maybe saved people from a lot of pain. But the deed has been done. Now the Terra team is looking for ways to salvage what is remaining of the Terra ecosystem and possibly build their way to the top again. There are plans to fork the Terra network as Ethereum did in the early days. According to Do Kwon's proposal titled "Terra Ecosystem Revival Plan", this is to "preserve the community and the developer ecosystem". He proposed that validators should reset the network ownership to 1B tokens and distributed as follows: 40% to LUNA holders before the depegging event, 40% to UST holders pro-rata at the time if the new network upgrades as compensation, 10% to LUNA holders at the final moment of the chain halt and 10% to the community pool to fund future development. They are effectively dumping the UST as there is no way to restore confidence in the stablecoin. The new blockchain, Terra 2.0, went live on 28 May and is currently trading at just below the $2 mark. Whether the hard fork will help save the Terra network remains to be seen. Still, it is undoubtedly a step in the right direction as the network has one of the largest and most vibrant developer ecosystems in the crypto space, with some unique and innovative products. And although it took a hit, the Terra ecosystem still has robust brand recognition. So maybe there is still one last kick left in Terra, and it might very well be the kick that gets it back to the top. But to do that, I would strongly suggest that a change in leadership is most critical, especially with Do Kwon currently facing a series of class-action lawsuits. His continued association with the Terra project can only hurt the network.