Terra’s UST post-mortem, risk and treasury management

Risk & Research, Credmark

Summary

Last week, the biggest and most popular algorithmic stable coin UST de-pegged from USD 1 by 33% in one day followed by a death-spiral sell-off and now it’s trading below $0.1 after slightly more than a week. Its governing token, LUNA crashed by nearly 100% and subsequently was delisted from many exchanges, including FTX and Binance. It’s important to understand how this happened, backed with data and the application of quantitative methods.

1. General Information

Algorithmic stablecoins are, in simple words, an automated central bank that, via built-in smart contracts, tries to control the supply and demand of the token so that its price is traded within the required range (peg).

Terra’s UST was by far the largest algorithmic stablecoin ($29 bln. market cap on 5 May 2022) before its crash. It was running a so-called seigniorage model, without fixed collateral, where the peg relied on the arbitrage between UST and Terra’s native token LUNA. The price of the LUNA token reflects the development of the underlying ecosystem and applications, which includes the mining network.

The design of Terra’s stablecoin UST was relatively simple, 1 unit of UST was backed by $1 dollar worth of LUNA, the governance token of Terra. Whenever someone exchanges 1USD for 1 UST, $1 dollar worth of LUNA was burnt. 1 UST can be then swapped anytime to $1 worth of LUNA. When UST is priced over the pegged of $1 dollar, one can mint 1 UST by burning LUNA and sell UST on the open market, and increase the supply of UST to bring it back to the peg. When UST is below the peg, one can mint $1 of LUNA by burning 1 UST and selling LUNA on the open market, and decrease the supply of UST.

There were many algorithmic stablecoins launched in the history of cryptocurrencies [1], but only sUSD, UST, and FRAX managed to maintain the peg of $1. DAI is conceptually different as it’s fully backed by third-party assets and is a decentralized stablecoin.

The following table provides a breakdown of the size characteristics of UST, FRAX, and sUSD in $ bln as of 5 May 2022.

*Given each algo stablecoin is designed to maintain the peg to $1, the market cap of the stablecoin is considered to be a liability from an issuing platform perspective

** Self-reported, the information couldn’t have been verified by the third parties [2], [3]

The first UST de-peg happened on 7 May and resulted in the drop of LUNA’s token price and subsequently dropped l to ground zero by 13 May. The table below outlines the impact on the stablecoins market cap at the time before the crash and in the end in $ bln. As we can see, although circulation of non-UST algorithmic stablecoins decreased, they maintained the peg and their market cap remained relatively stable compared to the 92% ($17.23 bln.) drop in UST.

Hierarchy chart below outlines the biggest parts of the Terra ecosystem as of 5 May 2022. The arrows represent the direction of claims in case of withdrawal.

Here’s a breakdown of primary DeFi operators in UST and their holdings (Wrapped and Wormhole version in Eth main network).

Anchor is a lending protocol specializing in UST. It was known for its staking program which paid out 20% APY on deposited UST. The total deposits accounted for 75% of the total UST in circulation and paid approximately $0.23 bln. in monthly interest. There has been a large outflow of UST from Anchor (14bln UST before the crash and 1bln UST now). In the initial de-pegging of UST, holders were willing to sell UST at a 10% discount as they have cashed in the interests in the past months. The sale may have replenished the supply of UST in the pool and could have contributed to the further de-pegging of UST.

2. Capital-at-Risk

As UST leverages the capital which backs LUNA, it’s critical to assess whether the protocol is well-capitalized to ensure survivability under a stressed situation. In this regard, there are two risk management questions to answer:

  • What should have been the required capital-at-risk?

  • How was UST positioned against other algo stablecoins before the attack?

2.1. How much was needed to break the peg?

During the initial wave of withdrawals, on 10 May the UST dropped to 0.67 cents. This is a de-peg of 33% from the $1 set by Terra.

To model the amount required to break the peg by this much, we can use an Automated Market Maker (AMM) Decentralized Exchange (DEX), where the pricing is algorithmic.

Let’s assume for simplicity that it was a Uniswap v2 UST/DAI pool. The pricing, in this case, is governed by:

Where x and y are the quantities of UST and DAI, respectively, in the pool, and k is the constant number. We assume that both quantities are equal to $19 bln. worth. That is equivalent to the market cap of UST before de-pegging.

With the pricing algorithm, we can estimate that it would take approximately $3.4 bln. of DAI swapped against UST from the pool to move UST/DAI price from 1 to 0.67.

This is larger than the $3.29 bln. that LFG had, which might explain why UST only rebounded to 0.94 for the rest of the day before it crashed.

2.2. Liquidity Coverage Ratio

Liquidity coverage ratio (LCR) for algo stablecoins is recommended to be parameterized as:

, where: Stressed liquidity buffer assumes a 30% reduction in its market value, and

Net outflows assuming the need to repay 25% of coins that could be exchanged to fiat within a 30-day window.

With the described approach we could compare UST and FRAX on 5 May 2022, 2 days before the beginning of the UST de-peg:

As shown, UST was well under-reserved. Its LCR was at 0.49 compared to 2.38 at FRAX.

Recommended level of LCR is at least 1.1 which means UST should have had a minimum liquidity buffer of more than double or two times fewer on-demand liabilities.

2.3. Market Risk Capital

Since market volatility in cryptocurrencies is significant, market risk capitalization is one of the primary considerations.

As mentioned in section 1, Terra had a separate organization tasked with forming a reserve to support Terra Luna in fulfilling its obligations, LUNA Foundation Guard (LFG). Based on what the LFG disclosed on Twitter, as of Saturday, May 7, 2022, the LUNA Foundation Guard held a reserve consisting of the following assets: 80,394 $BTC, 39,914 $BNB, 26,281,671 USDT, 23,555,590 USDC, 1,937,554 AVAX, 697,344 UST, and 1,691,261 LUNA. for its treasury as of May 7, 2022, before it started to sell in an attempt to pull UST back to pegging, we calculate its VaR (180 days horizon, 10-day return, 99% confidence).

As of 5 May 2022 VaR was $0.52 bln. and represented 17% of LFG reserve. VaR remained stable around the $0.5 bln. mark and didn’t increase, which could mean that the volatility observed over the period between the beginning and end of the crash was in line with Business-as-usual volatility observed in BTC, the largest part of the LFG reserves.

FRAX runs a much more conservative model with 85% of FRAX circulation stored in USDC as collateral and 36.6m$ in various altcoins with the same 10day VaR equaling 0.

As of 5 May 2022 required market risk capital in $ bln. per protocol are:

Market risk capital should have been set aside to cover the risk of market volatility.

3. Treasury Management

Terra UST had flaws in their treasury (assets and liabilities) management:

  • Community relationships - high concentration of investors and lenders in decentralized protocol

  • Product - all liabilities were effectively on-demand without any term structure making it an easy target for a bank run

  • Tokenomics - a system of incentivization was relying on the assumption of growth and neglected other instruments such as UST staking APY that could have disincentivized sell-off

3.1. The concentration of investors and lenders

Was it an attack from one concentrated holder? Yes, it was, we’ve identified significant withdrawals from Anchor made by individual wallets starting from 7 May to 11 May, with the largest made on 8 May that was $347 mln. worth of UST. Pie charts below clearly show this type of behaviour and overall UST inflow was toppled by UST outflow.

UST Liquidity added/removed (deposit and redeems) to Anchor protocol From 5 May - 12 May:

Interestingly, the Top 10 addresses were responsible for around 30% of overall UST liquidity removed during the period, which is very high considering best practice concentration shouldn't exceed 5% per counterparty. The daily break-down of redeeming for the top 10 addresses is below:

Here are stats of the total deposited and redeemed UST in Anchor during 5-12 May.

In summary there were $8.5 bln. net outflows between 5 and 12 May from Anchor.

Daily Snapshots

5 May

8 May

11 May

12 May

Analysis of transactions from the Terra chain confirms that during the first wave of redemptions there was an outflow from a concentrated number of UST depositors equal to 2.5 bln representing 18% of the entire balance and 30% of the whole withdrawal over the week from 5 May. The holders concentration level of more than 5% is considered to be very large. It should have been better managed by Anchor treasury management team through diversification or restructuring.

Also since Anchor had only one staking product which was on-demand, in other words, depositors had the right to withdraw at any time. The term stacking should have been introduced to spread out cash outflows.

3.2. Tokenomics

Anchor as the biggest lending protocol played a significant role in Terra UST incentivization mechanism. The rate that was offered to lenders was kept constant at 20%.

Firstly, the rate offered was unsustainable given the size and concentration ($17bln), staking could have been diversified at smaller APYs across different platforms organically. Terra had to find investment opportunities with higher APY to maintain a positive margin.

Secondly, in an unprecedented bank run, the rate of borrowing remained static. Whereas it could have been used as a tool to incentivize inflows and maintain the peg. In particular, introducing a variable rate that would change dynamically tosupport the peg algorithm. Or introducing term structures to incentivize stickier behaviour.

3.3. Liquidity Crisis Management

From the lagged nature of actions (the chain was not halted until11 May after 4 days of sell-off). It appears the Contingency Funding Plan lacked robustness and authority to act. This is a typical reason for failures in TradFi institutions before the global financial crisis.

One particular one that is worth mentioning is the ability to timely shutdown technology that might have a flaw that can lead to liquidity crises.

Conclusion

Data and financial modeling help to extract rational insights on DeFi protocols. Our analysis shows that both risk and treasury management activities required improvements.

Counterparty and maturity concentration thresholds weren’t properly managed. Incentivization tooling was sub-optimal and lacked a variety of tools. The asset and liability management function lacked robust liquidity crisis management expertise and authority.

UST was a high liquidity risk model proven by LCR metrics. LFG should have had separate capital to cover for potential market risk events given its reserves were placed in risky assets. Risk metrics should have been better aligned with peers.

References

  1. Coingecko, How to DeFi: Advanced, https://www.coingecko.com

  2. LFG, accessed on 16 May 2022, https://datastudio.google.com/u/0/reporting/b31cc9e5-c54c-4418-a6ce-b332c57e82e9/page/4YBqC?s=or-T7NeGLew

  3. FRAX dashboard, accessed on 16 May 2022, https://app.frax.finance/amos

  4. LFG Twitter account, accessed on 16 May 2022, https://twitter.com/LFG_org/status/1526126703046582272

Last updated