Demystifying the Terra debacle

What happened to Terra?

Publications > Demystifying the Terra debacle

By Stéphane Reverre and Amine Mounazil

Demystifying the terra Luna debacle
Demystifying the terra Luna debacle

A stablecoin is a cryptocurrency whose value is “pegged” to the price of a reserve item, the US dollar being the most commonly used reserve asset. Stablecoins appeared for the first time in 2014, and have been gaining popularity since. Today, they are considered the backbone of the crypto ecosystem by providing an “on-risk” and “off-risk” alternative for cryptocurrencies. Moreover, their adoption is driven by the demand of traditional financial institutions and the larger crypto sector for a standard approach to leverage blockchain technology while avoiding related risks.

Thus, stablecoins address one of the fundamental issues with many mainstream cryptocurrencies: their extreme volatility, which makes them inadequate for real-world transactions. Altough competition is nothing new among stablecoins, “de-pegs” are an unwelcome and novel eventuality as different projects fight tooth and nail to source the liquidity required to keep their coins close to the promised pegged value ($1 most of the time).

In this piece, we first give a brief overview of stablecoin issuance, followed by an analysis of stablecoins from a macroeconomic standpoint, before introducing quantitative insights about the recent activity that led UST to depeg and spread contagion in the digital asset market.

A brief overview of stablecoin economics

To better understand the issuance of fiat-backed stablecoins, consider each stablecoin protocol as a financial organization similar to a bank with assets and liabilities. The reserve assets (monetary units or investment securities) and liabilities (issued tokens) are matched 1:1.

However, things are different in the case of crypto-collateralized stablecoins because of the volatility of the collateral. If the value of cryptocurrency reserves falls, the system may become undercollateralized. As a result, if liabilities are in dollar-equivalent, the 1:1 backing will not hold. One way to solve this problem, and to keep the entire system safe, is to make reserve assets significantly larger than liabilities (over-collateralize). Although their exact mechanisms differ, this is how the Maker (DAI) and the Synthetix
(sUSD) protocols manage their risk.

As for algorithmic stablecoins, they are based on the idea that maintaining the value of the stablecoin over time is possible through the right set of incentives offered to market participants, in response to market conditions. In other words, the protocol itself contains provisions to defend the peg directly, as in the case for Celo Dollar (cUSD) and TerraUSD ($UST).
When it comes to non-custodial stablecoins (i.e. stablecoin that do not hold physical collateral), there are five key hazards:

  • Collateral (valuation issue)
  • Data Feed (the system is unable to price itself)
  • Administration (parameter failure)
  • The Base Layer (the underlying blockchain fails)
  • Smart Contract (a bug could lead to vulnerability and eventually insolvency)

Each of these can cause the stablecoin value to fall, possibly to zero. Because they are not formally backed by collateral, algorithmic stables like $UST are especially vulnerable to collateral risk. When there is a loss of confidence, such as when the general crypto markets falls, it may lead to a bank run or “death spiral”.

The robustness of a stablecoin depends on its ability to maintain the peg by reducing the spread between its “market value” and its “theoretical value“, i.e. the value of the currency the coin is pegged to. This ability is supported by two elements: the quality of market makers and the depth of the orderbook.

Stablecoin macroeconomics

In legacy markets, a currency peg is a means of securing a currency’s stability by tying its exchange rate to another currency. A notable example is the peg of the Chinese Yuan to the dollar, managed by the Chinese Central Bank, or the Swiss franc, whose peg to the Euro snapped in 2015. Currency pegs allow governments to develop a stable trading environment free of volatility, and to effectively operate an active control of monetary flows (e.g. balance of payments, foreign direct investment etc). As a general rule, government’s foreign currency reserves must be large in order to maintain a peg. This is because, if the government has to appreciate/depreciate its own currency, it may have to do so in the open market with its own reserves, in addition to traditional tools such as raising/decreasing interest rates.

A stablecoin is in essence a digital asset designed to keep its value by being pegged to a fiat currency such as the dollar or the euro, a commodity such as gold or silver, or another crypto currency. To keep the peg, the money supply of stablecoins is extended and contracted. When the price of a stablecoin rises in relation to the peg, the stablecoin’s money supply expands. Similarly, if the price of a stablecoin falls in relation to the peg, the stablecoin’s money supply contracts.
One recurrent risk for stablecoins, or any pegged currency, is the threat of an attack aimed at breaking the peg and profiting from price discrepancies (Soros’ 92). This risk has been present in legacy markets long before the emergence of blockchain technology and decentralised finance (DeFi), and is illustrated in modern economic theory by the concept of the “impossible trinity”. The impossible trinity (or unholy
trilemma) states that an authority (say a central bank) can only have two of the following at the same time, but never all three:

  1. Free capital movement (i.e. absence of capital controls): citizens of a country can diversify their assets by investing overseas, thanks to capital mobility. It also invites foreign investors to invest in the country by bringing their resources and expertise.
  2. A fixed foreign exchange rate (i.e. a peg): a fluctuating currency rate, which is sometimes influenced by speculation, can be a cause of larger economic unpredictability. A steady rate also makes it easier for households and businesses to participate in the global economy and develop long-term plans.
  3. An independent monetary policy: when the economy is in a recession, the said authority can raise and lower interest rates, and when the economy is overheated, it can cut the money supply and raise interest rates.

Source : Wikipedia

We turn now back to our crypto eco-system. It is crucial to understand the tokenomics behind both assets before diving into a quantitative analysis of the $LUNA and $UST debacle. The underlying protocol, Terra, operates with two tokens ($LUNA and $UST), and incorporates a virtual automated market maker (AMM). The objective is to keep those tokens in balance to maintain the $UST stablecoin’s peg. In addition to the “algo” part, Terra is supported by the Luna Foundation Guard (LFG) and its reserves.

Market participants can mint (e.g. create) $UST on Terra by burning (e.g. destroying) an equal dollar-amount of $LUNA and are incentivized to do so. Consequently, the price of $LUNA rises as the demand for stablecoins rises: the change in $UST demand dictates how much $LUNA must be burned. As this amount is subsequently burned, supply decreases.

As it happens, $UST’s adoption since the end of 2021 has been parabolic, thanks to Anchor, Terra’s lending and borrowing protocol, which offered annual percentage yields (APY) as high as 19.5% on deposits. This, of course, has resulted in a reduction of $LUNA’s supply, which decreased by 5% in January 2022 alone:

Market activity quantitative insights

Now that we are somewhat familiar with the tokenomics of these protocols, we can better understand the market behavior by first reading market activity then looking at anomalies and microstructure analytics on [include venues & pairs].

Earlier this year, the Luna Foundation Guard (LFG) raised $1 billion through a sale of $LUNA (its native token) to form a $BTC reserve, in order to maintain Terra’s stability and fund future developments. The establishment of a $BTC reserve was meant to reduce the possibility of a death spiral. So, instead of having to mint $LUNA to arbitrage the price of $UST, users can now exchange $UST for $BTC on Terra.

Swap BTC and UST

In April again, the LFG acquired an additional 37,863 $BTC for ~$1.5 billion, while the Anchor APY was reduced to 18%. During the same period, a massive $UST sell-off happened on Curve and Binance resulting in a small depeg that was aggravated by the withdrawal of roughly $2 billion from Anchor. The unfavorable timing has led many participants to speculate this was a coordinated attack to drive the stablecoin to depeg in order to either cripple the Terra ecosystem or trigger some sort of contagion that would result in $BTC to dip.

Historically, every known stablecoin has broken its peg at some point. Moreover, statistical evidence* shows that $BTC volatility is statistically stable with a finite theoretical variance, whereas stablecoin volatility is statistically unstable and responds to $BTC volatility synchronously.

(*) “On the stability of stablecoins”, Journal of Empirical Finance, vol. 64, 2021, Grobys et al. – Source

During the crash, the biggest volatility peak was observed at the beginning on May 9th at 6:20 pm. Many sale trades were observed, bringing the price down but immediately the market reacted and pushed the price back up, hence the high volatility. This selling pressure lasted exactly 1 min. The charts below show market activity for LUNA and UST on FTX, Kraken and Gemini over a few days prior to the crash (from May 5th to May 9th). Markets are still in “rebound mode” i.e., they tend to come back up even after severe down-moves, especially for UST:

Terra Luna price on FTX
Terra Luna price on Gemini
Terra Luna price on Kraken
Terra Luna price on Kraken UST

After May 9th, this “rebound” behavior disappears entirely, markets just “give-up” for LUNA, and UST trades at levels much lower than its peg value:

Terra Luna price on Gemini

When zooming closer at periods where activity is very surprising (to the point where our filters identify them as “anomalies”), here is one example of what we find on May 9th:

Terra Luna traded price and net traded volume with anomaly number 1

The biggest orders were sent in the middle of the crash. At 19:07 and 21:57:

Terra Luna traded price and net traded volume at 19:07
Terra Luna traded price and net traded volume

Following the crash, we observe a strong desynchronization between prices on FTX and Gemini, as can be seen below, where prices differed by more than $8 for several minutes. In addition, Gemini suffered a dramatic 9-fold decrease in market share on the LUNA-USD pair:

Terra Luna traded price on 05 10 2022
Terra Luna traded price on 05 10 2022 22:51
Terra luna rolling revenues

At the beginning of the crash, Gemini had a book twice as full as that of FTX, which can explain the large trades and other strange events observed on FTX. Logically, it was easier for manipulators to move the price on the market where the book was the thinnest. Following the crash however, the liquidity available in Gemini’s order book was almost non-existent.

Tether ($USDT), the crypto market’s largest stablecoin, also displayed symptoms of stress as Terra’s UST stablecoin imploded. It abruptly lost its $1 USD peg in early morning trading, falling as low as $0.95 before going back to $1.


Aftermath

On May 13th, block production on Terra was temporarily paused to prevent second-order consequences on network stability and governance caused by hyperinflating supply. Trading of $LUNA pairs was also suspended on some exchanges like Binance and Coinbase as it traded at less than a tick’s value.

In an effort to preserve the community and the developer ecosystem, Do Kwon (CEO of Terraform Labs, the company behind Terra) came up with the Terra Ecosystem Revival Plan. In order to significantly strengthen the liquidity around $UST peg, the LFG Council voted to loan $750M worth of $BTC to trading firms to help protect the $UST peg, and to loan $750M UST to accumulate $BTC as market conditions normalized. In addition, the foundation is looking to use its remaining assets to compensate current and past holders of $UST.

Distribution of LFG’s Reserve Assets as of 16 May 2022

On the 16th of May, Do Kwon published the Terra Ecosystem Revival Plan 2, where he imagines a fork in the Terra chain that will lead to a new chain without the algorithmic stablecoin. While the entire crypto-currency market has mixed opinions on this new experiment, it is clear once again that more scrutiny is needed to protect the small holder and protect the market from counterparty risk.

About SUN ZU Lab

SUN ZU Lab is a leading independent provider of liquidity analysis for investors already active or crypto-curious. We provide quantitative research on the liquidity of all digital assets to help investors improve their execution strategies and source the highest level of liquidity at the lowest cost.

Our product line includes research reports, software tools, and bespoke developments to fulfil the needs of the most demanding digital investor.