The Cardano ecosystem will have an algorithmic stablecoin DJED in Q1 2023. DJED is a formally verified crypto-backed pegged algorithmic stablecoin. The stablecoin design is publicly available and mathematically verified. Anyone who is capable can take a look and point out design flaws. The protocol has been implemented by COTI and a security audit will be performed before the project is launched on the Cardano mainnet. People are afraid to use algorithmic stablecoins because of the negative experience with TerraUSD (UST). This is understandable. On the other hand, it is important to note that the Terra project algorithm was different from Djed. Let's take a look at the basic differences between the two projects. TLDR The authors of the Terra algorithm were confident that arbitrage could handle all market turbulence. It was possible for the system to go into insolvency. Djed is overcollateralized stablecoin, has a reserve coin SHEN, and the algorithm is able to stop minting and burning tokens when necessary. DJED is over-collateralized from 4X up to 8X. It decreases the risk of being unpegged. If the value of ADA decreases, the total supply of ADA will never increase as it happened with LUNA. DJED can be seen as a utility that will increase the market capitalization of Cardano. TerraUSD had no reserve coin between stablecoin and collateral TerraUSD (and other Terra assets) is an algorithmic stablecoin that maintained its value peg through a set of arbitrage opportunities between UST and LUNA. The following relationship has been set up between LUNA and UST: more UST means less LUNA, and less UST means more LUNA. The Terra algorithm itself always treated UST as being equal to 1 USD, even if the peg is slightly off, let’s say 0.97 or 1.03 USD. Suppose we wanted to mint 200 USD worth of UST. First, we had to convert an equivalent value of LUNA tokens (let’s assume LUNA was 40 USD). We’d need 5 LUNA to mint the target 200 UST. When 5 LUNA was burned, we got 200 UST. How were the arbitrations designed to keep the UST at the value of USD supposed to work? If 1 UST was traded at 1.01 USD, users could use the market swap feature of Terra Station to trade 1 USD value of LUNA for 1 UST. 1 USD value of LUNA was burned and 1 UST was minted. Users could then sell 1 UST for 1.01 USD and profit 0.01 USD, adding UST to the Terra pool (the supply of UST increased). This arbitrage was profitable until the UST value fell back to match the value of the USD value. A similar arbitrage worked in reverse for contraction. If 1 UST was traded at 0.99 USD, users could buy 1 UST for 0.99 USD. Users then utilized the market swap feature of Terra Station to trade 1 UST for 1 USD value of LUNA. The swap burned 1 UST (the supply of UST decreased) and mints 1 USD value of LUNA. Users profit 0.01 UST from the swap. This arbitrage continued and UST was burned to mint LUNA until the value of UST rose back to 1 USD. Minting and burning of tokens were always available and there was no mechanism that would prevent it in the case of negative development of events. The authors of the algorithm were confident that arbitrage could handle all market turbulence. As you will see later, this assumption was wrong. A design flaw made it possible for more USTs to exist in circulation (with an expected value of 1 USD) than the total USD value of all LUNAs. In other words, the USTs lost their backing. It was possible for the system to go into insolvency. DJED is overcollateralized, has a reserve coin SHEN, and the algorithm is able to stop minting and burning tokens when necessary. The Djed algorithm is based on a collateral ratio in the range of 400%-800% for DJED and SHEN in order to ensure there’s enough ADA in the pool. SHEN provides extra backing and is an imaginary buffer in case of market turbulence. The Djed algorithm will only allow minting DJED if there is a sufficient number of ADAs in reserve. If the reserve ratio falls below 400%, the algorithm will not allow DJED to be minted and at the same time will not allow SHEN to be burned. Thus, the minimum required backing is kept. In this case, it is possible to mint SHEN. Minting SHEN increases the number of ADA in the reserve so minting of DJED is eventually enabled again. When the reserve ratio gets above 800%, the reserve is considered large enough and minting SHEN is temporarily stopped. Why did TerraUSD collapse? Multiple factors are to blame. The Anchor protocol offered market-leading yields of up to 20% on the year to users who deposit their UST on the platform. There is no point in telling you that such a large return is unrealistic and was a red flag from the start. Up to 75% of UST's entire circulating supply was locked in Anchor. It was a significant centralization of capital. Negative sentiment began to prevail in the markets and with it interest in cryptocurrencies waned. Their value began to fall, including the value of LUNA. Unexpectedly, UST deposits in Anchor dropped sharply from $14 billion to as low as $3 billion. A whale, or multiple whales, decided to close a position in Anchor and take profit. USTs have entered the open market. In addition, an unknown entity began swapping large amounts of UST for USDC. Do you remember that the algorithm has to mint LUNA when burning UST? The algorithm was forced to mint large amounts of LUNA, causing a dramatic drop in market value in a short time (supply was higher than demand). This has undermined confidence in the whole ecosystem. The massive selling pressure led to sharp drops in the values of both LUNA and of UST. When it began to be obvious that there was no longer the LUNA value (market cap) that would be worth the USD value for backing every minted UST, some watchful traders warned that the entire system might become insolvent. There has been a death spiral. Could DJED have a similar problem as TerraUSD? When UST lost the peg, people started panicking and selling UST. This led to the minting of LUNA. A large amount of LUNA in the market caused the market value to drop rapidly. ADA is used to decentralize the Cardano network. If the DJED were to be unpegged, one would not expect people to sell ADA en masse. DJED is just one of many projects on the Cardano protocol. Unlike LUNA, in the case of the Cardano ecosystem, one would expect that people would buy ADA when the market value drops dramatically. DJED may temporarily lose backing if the market value of the ADA plummets, let’s say by 90%. If such a condition were to last for an extended period of time, DJED would remain unpegged until either the value of ADA went up or people bought SHEN (which would be very profitable). DJED is over-collateralized and can prevent a death spiral by blocking the burning and minting of coins. UST could be under-collateralized relatively quickly. Every UST in circulation reduces the circulation of LUNA. In the Cardano ecosystem, ADAs cannot be burned (you can't even do that), but only locked by the Djed algorithm. If there is demand for DJED, the number of locked ADAs will grow, which will reduce the availability of coins on the market. This may increase the market value of ADA and therefore hold the peg. DJED can be seen as a utility that will increase the market capitalization of Cardano, i.e. the market value of ADA coins. It was similar to the Terra project. When there was a demand for UST, LUNA was burned, which reduced supply. The problem was that LUNA had no other significant use, so there was not as strong demand for it as there is for ADA. DJED is over-collateralized from 4X up to 8X. It decreases the risk of being unpegged. For every 1 DJED minted, there is 4–7 dollars worth of ADA in the reserve pool. The Djed algorithm has a bigger fund to buy back all DJED in circulation for 1 USD worth of the backing asset. Thus, there is at least a 4X higher chance of maintaining the peg. Once again, ADAs are not minted when DJED is burned but returned to the user. So even if the value of ADA decreases (by unlocking ADA from the Djed algorithm and thus increasing the available number of coins in the market), the total supply of ADA will never increase as it happened with LUNA. SHEN is in the system for risk-takers. If there is not enough ADA in reserve, SHEN owners cannot sell the tokens. ADA and DJED are not affected. The Djed algorithm prefers DJED holders over SHEN holders. This means that DJED holders can burn DJED and get back ADA. SHEN holders can only do so if there is sufficient ADA in reserve (above 400%). Conclusion Cryptocurrencies are very volatile and some might say that 400% is a low hedge and 1000% would be better. However, that would be very capital inefficient and perhaps unnecessary. Cryptocurrencies cannot routinely lose 90% of market value in one day. In that case, they would be completely useless in the real financial world. As adoption increases, their volatility will decrease. Cryptocurrencies can drop 70% in a year, but not in a day or two. In the years to come, hopefully, things will improve. From our perspective, the 400% threshold is sufficient and we believe that if there is a unpeg, it will be a very brief episode as there will always be a strong demand for ADA. The first attempts to build an aircraft failed. If humans had given up, we'd never be flying in space today. It's normal for some attempts to fail, and it certainly doesn't mean that all other attempts will fail if they are fundamentally different. DJED is not UST. Being afraid to use DJED just because TerraUSD collapsed is like saying you won't drive a car because you fell off your bike when you were a kid.