What Happened to LUNA & Terra? A Death Spiral, an Offering Trap, and a Mathematical DrawbackMay 20, 2022
- 1 1. What happened to Terra?
- 2 2. How does Terra work?
- 3 3. Death Spiral
- 4 4. An Offering Trap
- 5 5. Mathematical Drawback
1. What happened to Terra?
Terra, the most famous algorithm stable coin project in the cryptocurrency market, experienced a disastrous downside during the past week, which also caused a crash in the whole market. Till May 18th, the negative deviation of Terra’s stable coin called UST has been near 90% from 1 USD dollar. Terraform Labs once offered around an additional 25 billion Luna within a very short time to correct the deviation of UST last week. However, for now, all the effort has failed. The price of Luna ($0.0001847) has been infinitely near zero, and it seems that the “unpegging” of UST could not be solved anymore. Like a famous crypto VC manager said,
“It is certified by this incident that algorithm stable coin cant not be improved through technological iteration, instead of that, the principle of it has significant deficiencies.”
Change of UST Price
Change of LUNA market capitalization
Notably, the market capitalization of the whole cryptocurrency market has been down to around 1.2 trillion dollars. Even in 2017, the peak of market capitalization once almost reached 1 trillion dollars. It was definitely that a significant loss happened for the whole market during the last week.
2. How does Terra work?
Terra is an algorithm stable coin. Initially, Terra focused on developing payment and deposit applications serving end-users, with UST as the primary currency. At the beginning of 2021, Terra decided to expand its DEFI ecosystem. And then Terra experienced a skyrocketing development till it collapsed recently. The Terra UST stable coin mechanism consists of two leading coins, the native coin of the Terra network called Luna and the stable currency called UST. To maintain the stable coin pegged to 1 USD dollar, the Terra protocol adds to or subtracts from Terra’s supply through users’ arbitrage, as shown below.
- When UST price < 1 Dollar, for example, 1UST=0.99USD, users and arbitragers can buy 1UST with 0.99 dollars. Then users can send 1 UST to the market swaps in Terra station and receive $1 worth of Luna. At last, users sell their 1 dollar worth of Luna, profiting 0.01USD through arbitrage. This arbitrage through burning stable tokens and minting native tokens continuously contributes to depreciating the supply of stable coins, increasing the demand for stable coins, and eliminating the negative deviation of UST price till the price of UST back to the normal level.
- When UST price > 1 Dollar, for example, 1UST=1.01USD, users and arbitragers can firstly buy $1 worth of Luna and send it to the market swaps in Terra station and receive 1UST. At last, users can sell their 1UST for 1.01 USD. This arbitrage through burning native tokens and minting stable coins continuously contributes to increasing the supply of stable coins, depressing the demand for stable coins, and eliminating the positive deviation of UST price till the price of UST back to a normal level.
3. Death Spiral
The “death spiral” concept is frequently used in the debt market. Traditional convertible debt could be changed into a fixed amount of shares. At the same time, a new type of convertible debt could be transformed into a fixed value of dollars. This debt is usually used to fund small-cap companies. Holders of this new type of convertible debt tend to short the stocks when the price of company common shares fall rapidly. Their convertible debt could be changed into more common shares and then quickly cover their short positions. Then, along with the debt holder, common shareholders also begin to sell stocks due to the rapidly falling price. Eventually, the market value of this company will unravel. This is how a so-called “death spiral financing” works.
Last week, a similar thing happened to UST and Luna. As we introduced above, UST is backed by Luna within the Terra protocol. Only if the value of Luna could maintain a relatively high level can UST be pegged into the price of 1 USD through arbitrage. However, once the negative deviation of UST is more significant than market expectation, market sentiment can tend to be very panicked, and everyone begins to sell off UST. Consequently, more and more UST is changed into Luna, and then more and more Luna is sold off. UST price and Luna price both began to fall sharply. Limited arbitragers would like to purchase UST under such a circumstance. Thus the mechanism to maintain the cost of UST by arbitrage begins to lose effectiveness. No power could push the price of UST back to 1 USD dollar at such a time. Eventually, everything collapsed.
As shown by the graph below, indeed, within the Terra protocol, the only cause that could break this mechanism is losing the market’s confidence.
A death spiral happened with $UST
On the morning of May 8th, 2022, Luna Foundation Guard(LFG) subtracted 0.15 billion UST from the UST-3CRV pool to increase liquidity for the new 4Crv pool, which pulled the trigger.
About 10 minutes later, a new address swapped $85 million worth of UST for USDC in UST-3CRV and then transferred the money to Ethereum. At that time, the UST-3CRV pool had lost its balance, 77% of which consisted of UST, compared to 33% of 3CRV.
A moment later, several whale users on Binance began to sell UST off through several trades, all above 1 million dollars. At that time, there were signs that Jump Trading (market maker of Terra) sold off Ethereum, intending to prevent UST from being unpegged. Influenced by a series of events above, UST, locked on the anchor protocol of Terra (around 23.7 billion dollars at that time), began to close and be sold off. Then the waterfall of UST and Luna began.
4. An Offering Trap
Even if a death spiral happened, Luna and Terra still had a chance to escape from its unraveling. At that time, LFG still owned a sufficient reservation of 3.16 billion dollars, including Bitcoins and other assets. LFG could finance its market makers from this reservation and then indirectly achieve a market rescue. However, Terraform Labs made the wrong decision to increase the offering of Luna unlimitedly and then brought every participant into an offering trap. At last, the whole blockchain industry lost this battle.
On May 11th, 2022, Terra Research announced a proposal to allow more efficient UST to burn and Luna mint. Terra Research believes that this proposal will increase the selling pressure on UST and Luna in the short term. However, for an extended period, it will increase the efficiency of the arbitragers to buy UST and sell Luna, and then eventually bring UST back from its deviation to 1 USD. Indeed, Terra Research admitted that this way would dilute Luna very significantly. In other words, Terraform Labs and DK, the initiator of Terra, decided to sacrifice Luna to save UST.
It is a foolish plan. This proposal causes Luna’s price to fall almost vertically from $31.15 to around $0.0002. The circulating supply of Luna increased from approximately 0.35 billion to 6532.32 billion. The market lost confidence completely. Nobody wants to hold Luna anymore. And no arbitragers wish to risk the rapid dilution of Luna, even the own market makers of Terra.
This situation is called “an offering trap.” Removing the cap of Luna minting means increasing the offering of Luna without any limitation. Terraform Labs intended to sacrifice the benefits of ordinary Luna holders in exchange for the safety of UST, in other words, in exchange for their help.
5. Mathematical Drawback
Ignoring topics concerning the future and restart of the Terra program now being discussed everywhere, at last, this article picked a unique perspective concerning the market making algorithm of Terra to discuss to illustrate that the offering trap mentioned above is a born drawback that has already existed mathematically in Terra Protocol. If readers of this article are still interested in algorithm stable coins in the future, like the emerging one called USDD or something else, I hope that the technical view mentioned here could help you to detect the nonconformity of a program.
Terra uses the concept of the IMF(International Monetary Fund) called SDR（Special Drawing Rights）, an international reserve asset created by the IMF in 1969. SDR serves as the unit of account of the IMF. The SDR basket reviewed in November 2015 is as it is shown below,
The SDR value in terms of the U.S. dollar is determined daily based on the spot exchange rates. On May 16th, 2022, it can be found that the new spot exchange rate of SDR value is $1.333020.
Similarly, Terra creates a stable coin called Terra SDR or SDT, which tracks the price of SDR as the basic unit of account on the Terra network. Terra SDR is the flagship of Terra stable coin families. All the fees, incentives, and donations within the Terra network are calculated based on Terra SDR.
Terra uses a market-making algorithm called Constant Product to ensure liquidity for the Terra & Luna swaps. The function of Constant Product (CP) is as it is shown below,
CP= Size of Terra Pool * Size of Luna Pool*(PriceLuna/PriceSDR)
where CP:Constant Product
Size of Terra Pool: SDR Unit
Size of Luna Pool: Number of Luna tokens
Price of Luna: USD dollar Unit
Price of SDR: USD dollar Unit
This function can be explained that CP needs to be unchanged during any swaps. Thus market makers maintain CP as invariant by adjusting the relative price of Luna to Terra SDR according to the size change that happened on Terra Pool or Luna Pool.
Assuming that the initial sizes of Terra Pool and Luna Pool are 1000SDR and 1000, respectively, and the ratio of Luna price to SDR price is 1, thus the CP is 1000000 SDR squared. And then, for example, somebody wants to burn 200 SDR worth of Terra in exchange for minting some Luna, the calculation is as below,
CP=1000000 SDR squared=1200 SDR(Size of Terra pool)*1000(Size of Luna Pool)*(Price of Luna to Price of SDR)
Adjusted Size of Luna Pool=Size of Luna Pool* (Price of Luna to Price of SDR)=833.33 SDR
Thus, the offer of 200 SDR worth of Terra is added to the pool, and 166.66 worth of Luna is subtracted from the Luna Pool.
Luna official stated that “The primary advantage of Constant-Product is that it offers “unbounded” liquidity, and swaps of any size can be serviced.” It is true that during the collapse of UST and Luna this time, numerous UST were added into the pool, and numerous LUNA were taken away from the LUNA pool almost instantaneously under this function. I suppose that two dreadful drawbacks of this CP market-making mechanism contributed to the unraveling of Terra and Luna this time.
- A significant side effect of “unbounded” liquidity is that it is too sensitive to the change in the market. When the market tends to burn UST and mint Luna, the CP market-making mechanism affords excessive liquidity for selling off and thereby indirectly amplifies the panic emotion of the market.
- The sizes of Terra Pool and Luna Pool are also controlled under another function,
PoolLuna * PoolTerra=PoolBase*PoolBase
Where the parameter “PoolBase” defines the initial sizes of Terra and Luna pools which are equal.
According to the Constant-Product function, the size of the Terra pool could become very large under a UST burning pressure like what happened this time. Under such a circumstance, to maintain the balance of size controlling function above, the price of UST on SDR in Terra pool needs to fall sharply because UST in the pool is too much more than a normal situation. Price decreasing in the Terra Pool can have multiple effects of losing confidence in UST on the secondary market outside.
Overall, I argue that the mathematical drawback of the fundamental design of Terra Protocol also played a negative role during the incident this time. A serious mathematical audit of protocol for any algorithm stable coin program seems indispensable in the future if the market still does not wish to abandon the stable algorithm coins afterward.
Image Source: fellowneko/123RF
Source: Read Full Article