LUNA Debacle: A Planned Attack or an Imperfection in the System?

Written by dankhomenko | Published 2022/06/06
Tech Story Tags: cybersecurity | twingatehq | terra-luna | crypto | cryptocurrency | algorithmic-stablecoins | stablecoin | hackernoon-top-story | hackernoon-es | hackernoon-hi | hackernoon-zh | hackernoon-vi | hackernoon-fr | hackernoon-pt | hackernoon-ja

TLDRWithin just a couple of days, the price of LUNA crashed from above $83 to almost zero, and an algorithmic stablecoin of the ecosystem called UST lost its peg to the US dollar. This event shook the cryptocurrency market and pulled the prices of all cryptocurrencies down. Even USDT which is backed by USD and securities was traded at a rate slightly lower than 1 USD for a while. But while USDT recovered rapidly, UST after a short improvement continued its freefall.via the TL;DR App

Within just a couple of days, the price of LUNA crashed from above $83 to almost zero, and an algorithmic stablecoin of the ecosystem called UST lost its peg to the US dollar.
This event shook the cryptocurrency market and pulled the prices of all cryptocurrencies down. Even USDT, which is backed by USD and securities was traded at a rate slightly lower than 1 USD for a while. But while USDT recovered rapidly, UST, after a short improvement, continued its freefall.

What Happened and What Lessons can be Learned from the LUNA Collapse? 

Many people believe that a “crypto-winter” has arrived and that this crash was one of the expected effects. However, I doubt it. 
That is because there are so many smaller and less impactful projects that still exist and even flourish in their way. Even if we have to deal with crypto-winter consequences, it has no relation with such an impactful and resourceful project as Terra (LUNA).
Others insist that such a fall is a “punishment” for the arrogance of Do Kwon, the project’s founder. Just a week before the LUNA bloodbath, he said that "95% are going to die [coins], but there's also entertainment in watching companies die too".
Even though I don’t believe that the current situation with Do Kwon’s brainchild is connected with this statement, it sounds ironic. He watched his project collapse without being able to do anything about it (even though he tried).

What happened to LUNA then?

I think that the answer lies in UST. The stablecoin of the Terra network is an algorithmic stablecoin and is not backed by any asset. The LUNA coin was created to absorb market volatility and ensure the stability of UST. Simply put, the algorithm that was supposed to take care of the UST dollar peg works like this:
When the UST value goes up, the algorithm burns LUNA tokens to mint UST. The circulating volume of UST increases, and the token price drops. If on the contrary, the UST value starts dropping, the algorithm releases LUNA by removing UST tokens from circulation thus increasing the demand for UST and triggering a UST price increase. 
The mechanism seemed to be perfect until it stopped functioning as expected. Moreover, it stopped functioning suddenly, and even the emergency measures taken by the project founders - namely the $10b BTC purchased to back up UST in case of an emergency - didn’t work. I do not think that all algorithmic coins will break down just because they aren’t backed up by real assets. We all know that demand and supply drive the market and that the USD is just a piece of paper whose value depends on that demand. In this regard, USD is not more valuable than UST.
So if it wasn’t faulty countermeasures, then what happened?
To me, it looks like a well-planned attack. The project was destroyed intentionally, and the one who did it could forecast the measures to make LUNA recover. 
Let me explain how it all evolved. But first, some background information.

A Soros Attack 

From 1989 to 1990, the economic situation in England worsened by pushing the country to join the European Monetary System. At that time, the British pound was highly overvalued, which allowed the country to benefit from cheap imports. On the other hand, this overvalued national currency penalized exporting companies. Combined, these factors led the country into a recession in 1991.
It was at this time when George Soros, an American investor, and billionaire, had a brilliant idea that made him richer by $1.1b and made the Bank of England crash. He decided to perform a speculative attack on the Bank of England.
It all started on September 16, 1992, when Soros took short positions on the GBP for approx. 10 billion pounds. He also managed to persuade other important investors and investment banks such as the Bank of America and JP Morgan that the British Pound was going to fail. These banks started selling GBP on a large scale. 
To stabilize the situation, the Bank of England started purchasing GBP by using its reserves in foreign currency. However, the reserves of the bank were not sufficient to handle the attack, and Britain had to leave the European Monetary System with a GBP devaluation of approx. 15%.
Investors and banks that participated in the attack were able to repay all the loans they had in GBP but with a pound devalued against USD. In total, this attack brought George Soros around $1.1b in capital gains.
Of course, this attack was not without risk. Any of these factors would make the attack impossible:
  • A strong response from the Bank of England
  • If other central banks had provided support for GBP
  • Poor coordination between attackers
Now, let’s look at how the collapse of the GBP in 1992 is connected with the collapse of UST and LUNA.

The Soros Type Attack

Just before the UST depegging, the balance in the curve liquidity pool looked like this:
As you can see, everything is pretty well-balanced. Then, the attacker starts depositing more UST liquidity in the curve:
It creates the liquidity unbalance in the liquidity pool, and causes the depegging of UST:
In this example, the depeg was almost unnoticeable and could be restored relatively quickly. But this was just the beginning. 
This move granted the attacker access to how many UST were injected into the liquidity pool to trigger the coin depeg and it made other major investors fear that the coin may not be as stable as it was supposed to be. Also, the attacker could see the two main wallets used to restore the peg. 
So, to make the attack succeed, these two wallets need to be neutralized and the attacker does this by forbidding their UST exit positions as part of an arbitrage trade.
With it, the foundation for a full-scale attack was ready. The attacker first disbalances the liquidity pool.
And sends the UST price into a free fall.
But this time, the main resources that could be used to restore the balance are blocked in two main wallets, and the investors’ trust deteriorates.
When the pool crashed, main depositors rushed to withdraw their UST and swap them to LUNA. This reduced Terra's liquidity and made the company unable to buy back UST to reduce the circulation volume and restore the peg or stabilize the situation. 
Meanwhile, the attacker sells more UST to keep the coin depegged and drain Terra’s liquidity. Terra again uses its capital. This time, it uses the reserves in BTC to buy back UST. It, in turn, puts the entire cryptocurrency market under pressure and sends the BTC price down. The attacker instantly benefits from it by swapping his LUNA to BTC and thus, sending the LUNA price even deeper. 
Terra is buying back discounted UST from the attacker by liquidating its asset portfolio and depleting its resources. UST holders continue swapping the coin to LUNA. At some point, the system suffers from a total loss of liquidity and cannot manage the disbalance anymore.
Like in the case of the Soros attack on the Bank of England, this attack could be partially or completely prevented if:
  • The attacker didn’t have enough resources to complete the attack
  • If users didn’t start swapping UST to LUNA which would  support the stablecoin
  • If other market players supported Terra (even though in the current circumstances, I do not see clearly how it could be done)
Who organized the attack? There are speculations. In any case, it was somebody who knew Terra very well to forecast how the company would react to recover the peg and had enough resources to make such an impact. 

Will LUNA Recover?

Kwon is trying to save the situation by forking the LUNA protocol. Now, Terra (LUNA) 2.0 is live and started producing blocks. To me, it looks like trying to save a sinking boat but I may be mistaken. In some time, we will see whether the project revitalizes. 
I believe that creating an algorithmic stablecoin was a brilliant idea, but there should be something else to back it up besides an algorithm.
Algorithmic stablecoins are in their infancy stage, and once the technology is developed, we might face a different financial world. For now, though, these coins are too vulnerable, and if a system has a vulnerability, even a small one, there will be somebody willing to exploit it. 

Written by dankhomenko | CEO of SIDUSHEROES.COM and NFTSTARS.APP. International entrepreneur with a global vision for innovation.
Published by HackerNoon on 2022/06/06