I’m sure you’ve already read in the news about the recent Terra collapse, but I wanted to shed some light on the finer details of the situation. In short, macroeconomics led to a weakness in Terra (UST/LUNA), creating an opportunity for exploitation that an attacker (or attackers) took advantage of.
To dive into the details, let’s start from the beginning…
Terra, founded by Do Kwon and Daniel Shin in 2018, is a blockchain built in the Cosmos ecosystem. The network went live in April 2019 with the purpose to create an algorithmically-pegged stable coin tied to the US dollar and a network to support global payments. There are two key aspects to Terra; LUNA is the crypto and TerraUSD, also known as UST, is the stable coin. LUNA had an ICO price of $0.80 while UST is meant to maintain a peg of $1. At the all-time high, LUNA hit $119.55 in April 2022 with a market cap of $40B and UST had reached a peak of ~$19B.
Now the peg maintenance mechanism between LUNA and UST:
There is a “promise” to people that you can always redeem one UST for $1 worth of LUNA. Say that LUNA is worth $0.10, which means you can burn 10 LUNA to create 1 UST. If LUNA is $10, you would burn 0.1 LUNA to get 1 UST. UST is always meant to trade at $1 with a market-making mechanism for arbitrageurs. If it trades above $1, people — arbitrageurs — can buy $1 worth of Luna for 1 UST and exchange them for one UST worth more than a dollar, for an instant profit. This works on both sides and is meant to reach a market-neutral price of $1. Now, in theory, this all sounds good but let’s remember that both LUNA and UST were created out of thin air with no material backing from governments, fiat, or other real-world assets (excluding capital raised).
Now, there is a lot of risk in the system, especially in crypto if there are massive selloffs. To hedge the risk, LUNA foundation bought $3.5B worth of Bitcoin (with plans to buy up to $10B) to hold as an asset and help maintain the peg in case LUNA started to decline rapidly and the peg for UST breaks.
Now, to what happened…
A bit of backstory, Do Kwon has had very publicized feuds with folks on air and in the news that challenged the UST/LUNA. He openly challenged parties to try and bring down Terra. Do Kwon seems to have put a target on his back with his behavior and
was challenging parties that were showing him the weakness in LUNA/UST.
Many went into great detail about how the underlying tokenomics and hedges would not be enough in case of a sophisticated attack by a party with enough conviction and capital, or a large market selloff. One analyst even wrote how a hypothetical party could exploit the weakness in the Terra ecosystem through various attack vectors. Looking at the events, it is likely the Terra collapse this week was a black swan event that was premeditated by a party/parties that took advantage of market weakness to play out their strategy that would lead to a “death spiral”.
A “death spiral,” where the price of the underlying assets would fall faster than their ability to maintain the peg. This would create an environment where you would continue issuing more LUNA to offset depeg of UST, and this would effectively dilute its prices to $0.
The markets have been extremely volatile over the past few weeks driven by geopolitical risk, COVID, high inflation, and one of the largest tightening monetary supply initiatives in recent history. With weakness in equities, we saw crypto finally begin to sell off. This started creating a downtrend in price and tightened liquidity of crypto assets.
Here’s the play-by-play (thanks to Route 2 FI on Twitter):
- Supposedly, Terra Labs had pulled $150M of UST liquidity from 3-Pool on Curve to migrate over to 4-Pool – to help maintain balance and diversify across another asset. There was now limited liquidity in the active 3-Pool, and the attacker exploited it
- The attacker swapped $85M of UST to USDC creating an imbalance in the pool
- To rebalance Curve, 50K ETH was sold and 20K ETH was sent to Binance
- The rumors started circulating on Twitter and elsewhere, which started creating early fear in UST. This leads to $2B of UST being pulled out of Anchor by various stakeholders (Anchor is the protocol on Terra that offered users a 20% yield on UST)
- This creates a minor depeg, with UST now hovering between 0.987 – 0.995
- The first defense by LFG (LUNA Foundation Guard) is successful, preventing further depeg, but it never fully recovered to $1
- While all of this is happening, the attackers borrowed 100,000 BTC to short (i.e. betting that the price of Bitcoin will fall)
- Remember that the LUNA foundation was buying BTC in March/April to help collateralize UST
- The attackers then buy $1B UST in an OTC trade (peer to peer, over the counter)
- The attacker uses $350M of this to drain liquidity from the Curve pool
- This starts creating panic in the marketplace and the peg starts to fall, now hovering between $0.97 – $0.98
- Rumors and fear start spreading like wildfire and deposits on Anchor (with an all-time high of $14B) start falling ~$10M every minute
- The US markets begin to open in the red, further exacerbating fear and weakness in the macro economic environment, fueling the selloff in crypto
- The attacker still has $650M of UST and they begin dumping on Binance
- This starts to lead to massive depeg with more sell pressure on UST than buy pressure, remember we need balanced supply and demand
- To help fight the depeg, LFG starts to sell LUNA and Bitcoin to restore it -> this leads to downward price pressure on both LUNA and Bitcoin (remember the attackers shorted Bitcoin)
- This leads to the death spiral and the crazy unwind we saw over the past few days
- Attackers keep dumping UST
- LFG sells LUNA and BTC to maintain peg
- Bitcoin starts selling off due to massive sell pressure
- Fear continues to spread and UST peg continues to fall as more look to the exits -> Anchor deposits continue to fall as people look to withdraw
- LUNA price continues to fall, because of the re-peg mechanism that continues to issue more LUNA
- UST selloff leads to more LUNA in circulation and this leads to lower LUNA price
- With all the events happening rapidly there is massive chaos in the markets and the fear is beginning to reach unsustainable levels
- Traders are now actively shorting LUNA in the markets
- Exchanges ban withdrawals of UST and panic has started to reach peak levels
- At this point, a bailout of LFG and UST hinted by Do Kwon seems to fall through and they realize that they can’t win
- With the tweet from Do Kwon admitting that we need to let it bleed before rebuilding, the wipeout of LUNA continues
- Peg bleeds, hitting a low of $0.23 (currently at $0.44) and LUNA is effectively wiped out
Today, LUNA is halted on most exchanges from trading and effectively $0 and the Terra blockchain has shut down from processing any new transactions. Per Do Kwon’s recovery plan, Twitter user 0xHamz built a model to show how long it could take to fix the imbalance between UST and LUNA and repeg – per the latest estimates: 50 days. In my opinion, the trust has shaken and it seems unlikely Terra will be able to recover. Terra has massive backers and partners that could help breathe new life into the project and help them “fix” the stablecoin mechanism, but with tightness in the market and massive write-offs that many would have likely endured this week, it is doubtful. The macro market has continued to fall this week and liquidity seems to be drying up. Regulators have all their eyes on Terra and are likely looking for a poster child to push through regulation.
The events over this past week are very nuanced. One thing is clear, billions of dollars were wiped out for companies in the ecosystem, consumers that had their savings in UST, and many others. It is a tough time and the macro markets haven’t made it any easier. The fallout of LUNA will continue to impact the broader ecosystem and I am not sure all the dominos have fallen. Many eyes remain on Bitcoin with LFG still holding a substantial amount and what they may do next.