Talking about the risks of various stablecoins from the perspective of stable UST crash
创宇区块链安全实验室
2022-05-19 07:58
本文约3631字,阅读全文需要约15分钟
What exactly are stablecoins and why are they so risky?

first level title

Preface: What is a stablecoin?

How the largest of these reserves, tether, is backed by dollars, or whether there are enough dollars to be backed, has been a mystery. Critics have argued that despite its Tether assurances, Tether Holdings does not have enough assets to maintain a 1-to-1 exchange rate, meaning its Coin is essentially a fraud. In this issue, Zhichuangyu Blockchain Security Lab will unveil the mystery of various stablecoins for readers.

Start - Centralized Stablecoin

USDT

secondary title

Launched in 2014, Tether is a blockchain-enabled platform designed to facilitate the digital use of fiat currencies. Tether aims to disrupt the traditional financial system with a more modern approach to money. Tether has made progress in enabling customers to transact with traditional currencies on the blockchain without the inherent volatility and complexity often associated with digital currencies.

It has been fulfilling a promise on the website: Tether is pegged to real-world currencies one-to-one, and each Tether is backed 1:1 by the traditional currency (USD) in our reserves.

This has led to its commitment to exchange with credit endorsement, and the official stated that its market value has exceeded 77 billion U.S. dollars as of December 2021."Of course, the black swan incident occurred a few days ago, and the USDT on the market ran out of USDT due to panic, resulting in USDT in the market"price drop

, while the prices of other currencies have risen, this does not affect Tether’s official 1:1 exchange commitment in essence: verified customers (in permitted jurisdictions) can exchange USDT for USD 1 on Tether.to, but only The current USDT currency pair in the market was sold, and everyone's selling price was very low in their psychological expectations, so that 0.95 BUSD was exchanged for their 1 USDT, and he was also willing to happen.

Afterwards, the official release stated that in the past 24 hours alone, Tether has cashed out more than $300 million in redemptions, and has processed more than $2 billion today without any problems.

USDC

Of course, there are many risks in this, such as the centralized TEDA institution does not have sufficient asset reserves as it announced to deal with the run, or it has deviated from its 1:1 exchange commitment.

USDC has always taken compliance as its main concept. Its issuers Circle and Coinbase are both companies with high status in the industry. Among them, Circle is the first company in the world to obtain the Bitpcense license in New York State. Coinbase is the cryptocurrency exchange with the most regulatory licenses in the world.

Because of this, coupled with the change in the attitude of the U.S. regulatory authorities this year, USDC has been recognized by many traditional financial institutions, and its usage scenarios have increased significantly. In March, Visa said it would allow the stablecoin USDC to settle transactions on its payments network."USDT"Therefore, it is easy for us to understand that USDC is actually the pursuit of compliance and the endorsement of large enterprises.", and undoubtedly rely on its"To fulfill the promise of 1:1 exchange.

first level title

The Battle — Algorithmic Stablecoins

DAI

In the stable currency market, USDT and USDC occupy a large position, and their TVL also carries a huge volume in the blockchain market. Most importantly, he can directly affect the economic orientation of the entire market, similar to the existence of the Federal Reserve in traditional finance. This big piece of cake has also aroused the preemption of many leaders.

DAI is a borderless decentralized stablecoin issued by Maker DAO. Based on the over-collateralization mechanism, DAI is 1:1 softly anchored to the US dollar. It uses the collateral and price aggregation system to ensure that 1DAI is equivalent to 1 US dollar. The biggest difference between it and TEDA is that it is decentralized, and acceptance depends on The acceptance ratio of collateral and DAI identified by the price aggregation system, such as 1 ETH=2000 DAI, the price stabilization mechanism is as follows:

Since the health of the system depends on the value ratio of the collateral, when there is a huge change in the price of the collateral such as Ethereum, it will directly affect the system, and the system relies on forced liquidation to relieve assets close to the critical value. Of course, the design of its loan settlement must be more complicated than the conventional system, and at the same time, its decentralized design will inevitably lead to its ability to accept and concurrency be limited by the underlying design of the chain. Problems with the robustness and security of the system may also lead to a 1:1 commitment tilt.

The design of maintaining such a price stability system is very complicated. MarkerDao has designed a rate module (MCD) for accumulating the stability fee of the treasury debt balance and the deposit interest stored in DAI. The design is as follows: for the collateral, the rate module passes According to cumulative calculation, the interval of t is 1 second. For a Maker treasury system 1, starting from t_0, let the unit (s) of time t stabilize the fee value as F_i, and let the initial value of the fee rate accumulation rate be recorded as R_0

Suppose a vault is created at time t_0 with debt D_0 drawn immediately; normalized debt A (system stored on a per-vault basis) is calculated as D_0 / R_0

The total debt accumulation value of a Valut safe at a certain time t is calculated as the multiplication of F_t from time t_1 to t_T and the initial debt D_0 at the time of creation:

UST

The position of VAT in the entire computing stability system architecture is shown in the figure below, and its complexity is evident:

Terra is a decentralized blockchain designed for algorithmic stablecoins, and the entire ecosystem runs between the two Tokens of UST and Luna. UST is a stable currency pegged to the US dollar, launched in September 2020, and Luna is his governance token. Its minting mechanism requires users to destroy reserve assets such as Terra (Luna) to mint an equivalent amount of UST.

  • Unlike other stablecoin mechanisms, UST is designed to burn 1 USD of LUNA to mint 1 UST, or burn 1 UST to mint 1 USD of Luna, which is very similar to the previous collapse of titan/iron. If UST is unanchored, there will be two arbitrage opportunities in this setting:

  • [1] Buy UST (such as 0.95) below $1, sell at $1, arbitrage 5%

[2] Buy UST (such as 0.95) below $1, convert to $1 LUNA, sell Luna to $1 USDC (extract from the market value of $1 Luna), and repeat the operation

  • If this kind of setting breaks UST, it will lead to the following negative feedback loops, and LP will not maintain price stability:

  • Market Volatility Leads to Luna Price Drop

  • When the situation in [2] happens, the market pulls away from selling Luna, which further lowers the price of Luna

  • The price drop of Luna caused the Anchor collateral to be liquidated, and the liquidator sold it after the liquidation, causing the value of Luna to continue to decline

  • As Luna falls, users' UST convertible Luna increases, and UST's APY20% unlocking further causes Luna to continue to issue and sell down

Panic spread, UST staged the above-mentioned USDT black swan event, 0.8 USDT exchanged for one UST event, intensified UST arbitrage in exchange for Luna and sold Luna

Then, as the above negative feedback loops proceeded, Luna continued to fall, panic continued to increase, and the short-selling sentiment further increased.

In the early hours of May 8th, due to the withdrawal of funds by the Luna Foundation to build the 4Crv pool and the user sell-off at the same time started a death spiral, in the end Luna almost returned to 0 in the cycle and panic, and the value of UST was seriously out of anchor.

The reserve graph in the Curve pool at that time is as follows:

USDD

Judging from Curve's StableSwap market-making curve 2, although it will not cause liquidity to dry up, when the reserve deviation is too large, it will be closer to a constant product market-making, that is, the ratio of other UST to other assets will be smaller:

USDD is managed by TRON DAO reserve and guarantees its price stability. TRON DAO minted 999 billion USDD stablecoins by burning TRX. These minted USDD are then sold to whitelisted traders for eventual release on the market. USDD does not rely entirely on code automation. The issuance and destruction of USDD, as well as the key arbitrage activities in the primary market, have all been adjusted from relying on automatic code completion to being approved by the Federal Reserve, the authority.

Therefore, USDD's stabilization mechanism has little to do with centralization and stablecoin algorithms. It is more like an IEO out of acceptance mode. The biggest risk comes from the price drop of TRX, which is not enough to fully meet the redemption demand of all issued USDD (1USDD is exchanged for too many TRX). Under the premise that there is no guarantee of unlimited minting rights, USDD needs to make excess reserves to cope with the price drop of TRX. At the same time, in terms of reserves, there is also a risk of insufficient liquidity of TRX reserves in the stored contract.

first level title

Epilogue: Annihilation is also rebirth"Locking in the Terra ecology with a value of 20 billion US dollars, its native algorithmic stablecoin UST fell into a death spiral due to a large amount of capital short hunting and debt crisis, and there was a serious unanchor event, which was close to zero in just 5 days. The algorithmic stablecoin it launched was also hit hard. This game is a complete victory for the Air Force and a paradise for arbitrageurs, but how many people 4's assets are zeroed and despaired. Affected by this crisis, the sentiment of the entire market has also been extremely affected, causing BTC to break through 25,000 dollars. Whether it is an investor, an institution or a project party, in the field of blockchain ecological construction"large test

References

need to be more cautious.

[1] Maker protocol documentation https://docs.makerdao.com/

[2] Curve white paper https://curve.fi/files/stableswap-paper.pdf

[3] USDD Burn contract address https://tronscan.org/#/contract/TNMcQVGPzqH9ZfMCSY4PNrukevtDgp24dK"[4] According to the data on the chain, there were 4.04 million addresses on the Terrarra chain on May 7, which is equivalent to 4.04 million possible"victim

创宇区块链安全实验室
作者文库