A Comprehensive Deep Dive to Stablecoins

Arbnom
25 min readSep 14, 2023

--

Cryptocurrencies are well-known for their volatility, often resembling a rollercoaster for investors and traders. Unlike most cryptocurrencies, stablecoins aim to maintain a constant price, although some have lost their pegs over time. These stablecoins come in various forms. Some peg their value to the US dollar, others to the Euro. But it’s not only fiat currencies they mimic; a stablecoin might also be pegged to the price of Brent crude oil or an ounce of gold. The core idea is to tie the coin’s value to a tangible asset. In this Medium post, we’ll explore:

1)The necessity of stablecoins

2)What we expect from stablecoins

3)The rationale to protect the peg

4)Fiat backed stablecoins

— USDT, USDC, BUSD, TUSD

— USDC depeg

5)CDP backed stablecoins

— DAI /MakerDAO

— Black Thursday of DAI

— DAI depeg (caused by USDC)

— LUSD /Liquity

6)Algorithmic stablecoins

— UST collapse

— USDD

7)Hybrid stablecoins

— UXD & delta-neutral positions

— Mango Market exploitation

— FRAX & Curve wars

8)Stablecoin trilemma

Many wonder about the necessity of stablecoins. If we trust banks to safeguard our money, why would someone exchange USD for a USD-pegged stablecoin? The primary motivation is the “trustless philosophy.” We’ll delve deeper into this concept in a subsequent post. Stablecoins simplify trading, especially in the DeFi realm. Without them, DeFi would struggle to gain efficiency. For example, imagine an ETH holder wanting to cash out some of their investment. What cryptocurrency would they choose in exchange for ETH? Simply trading ETH for another cryptocurrency doesn’t really equate to cashing out — it’s more like changing investment strategies. Without stablecoins, DeFi would be limited in its usefulness, pushing users back to centralized exchanges (CEXs). Transferring USD between CEXs would be out of the question. But beyond facilitating trade, stablecoins also provide opportunities to earn real returns, insulated to some extent from broader market fluctuations. The Curve’s 3pool (USDC/USDT/DAI) is a prime example of this.

Stablecoins must meet several essential criteria. First and foremost, they need to be stable, which means they should be pegged to a specific asset. There also needs to be a mechanism to protect this peg, which we’ll discuss in the next paragraph. It should also have high liquidity, as this provides a strong defense for the peg. One key reason is that increasing liquidity on DEX decreases slippage rates, which in turn reduces the chance of depegging during large trades.

For instance, consider two stablecoins: one with a supply of 10,000,000,000 and the other with just 10,000. Even if the slippage rates are the same for Alice, she would certainly prefer the first one. More liquidity enhances arbitrage opportunities, which can be a safeguard during unexpected market events. Moreover, volume is also one of the crucial aspects for a stablecoin. Consider a stablecoin with significant liquidity but almost no trading volume. Since the volume is low, selling (or buying) it from a CEX becomes challenging. Due to this limited volume, not many people want to become an LP, leading to high slippages on DEXs (see https://medium.com/@arbnom/navigating-the-defi-landscape-a-comprehensive-deep-dive-to-amms-954020ec23b). These are the essential aspects that stablecoins compete on.

Let’s discuss the concept of pegging. As previously mentioned, a stablecoin’s price should match the price of its pegged asset. However, maintaining this is challenging due to the open market’s dynamics. For example, if we consider a stablecoin pegged to the USD, there should be a small margin within which the coin’s price can fluctuate. Many believe a ±0.001 margin is negligible, implying the stablecoin’s price ranges between $0.999 and $1.001. Achieving this is possible with the right tools.

The price of a stablecoin largely depends on traders’ expectations. For instance, if everyone believes that our stablecoin should be priced at $1 with a fluctuation margin of ±0.001, then no one would try to buy or sell it outside of that range. However, this belief shouldn’t be taken at face value. There needs to be a reliable mechanism that ensures the price stability, reinforcing people’s trust. Beyond instilling trust, the mechanism should also fortify the stablecoin against unexpected market events. A primary way to protect the peg is by offering arbitrage opportunities during depegging. If our stablecoin is priced at $0.98 on one platform (DEX or CEX) and $1.13 on another, arbitrageurs can help stabilize the price by buying the cheaper one and selling it where it’s more expensive. But what if the price drops across all platforms? It’s essential to note that not only a price drop (negative depeg) is detrimental to stablecoins; a price increase (positive depeg) can also pose challenges. Given that in the DeFi realm, one can borrow stablecoins using other crypto assets as collateral, a rise in the stablecoin’s price can heighten the risk for that position, potentially triggering liquidations. To guard against both forms of depegging and to restore order after any disruption, there needs to be an internal arbitrage opportunity. This goes beyond mere inter-exchange arbitrage. An effective method is having collateral backing the stablecoin. If the value of our stablecoin drops by 5%, arbitrageurs would step in, leveraging the collateral to profit. Similarly, if the stablecoin becomes overpriced, arbitrageurs can offer collateral to mint the stablecoin and gain profit.

While the core idea behind protecting the peg centers on arbitrage opportunities, various stablecoins have unique mechanisms to create these opportunities. Let’s delve into the different types of stablecoins.

Fiat-Backed Stablecoins

USDT, USDC, BUSD, TUSD: These stablecoins are minted and regulated by centralized institutions. They claim to hold fiat money (or other tangible assets) valued more than the minted stablecoins. This type of stablecoin is currently the most prevalent in the market. As of September, 2023, the market share of fiat-backed and USD stablecoins stands at approximately 93.5%. Despite the existence of over 15 fiat-backed and USD-pegged coins, four primary players — USDT, USDC, BUSD, and TUSD — hold 98.9% of the total market share for fiat-backed USD stablecoins. Although they command the largest market share, they face significant issues concerning decentralization. These stablecoins incorporate “malicious functions” in their smart contracts, which allow the companies behind them to control all user assets. One glaring instance of this is the blacklist feature, the name of which might vary between contracts, but its function remains constant: it blocks transfers from specified wallet addresses. Furthermore, these companies can confiscate funds from blacklisted accounts and have the authority to mint an unlimited supply due to their contract structures. This presents a risk for crypto users because, without visibility into the collateral held, it’s challenging to gauge the safety of these stablecoins.

USDC depeg: Discussing centralized stablecoins necessitates mentioning the recent USDC depegging, triggered by the bankruptcy of Silicon Valley Bank (SVB) on March 12, 2023. Predominantly servicing startups, Circle, the company overseeing USDC, was among SVB’s clientele. SVB held Treasury bonds and other long-term debts, traditionally regarded as safe havens for investors. However, the value of these bonds plummeted after the Federal Reserve hiked interest rates to combat high inflation, making these bonds less profitable compared to newer, higher-interest offerings. Around the same time, several of SVB’s clients, primarily in the technology sector, faced financial difficulties, prompting many to withdraw their assets. Consequently, SVB had to sell their bonds at a $1.8 billion loss. This sale prompted credit agencies like Moody’s to downgrade SVB’s ratings, alarming customers about the bank’s liquidity crisis, which spurred a bank run culminating in SVB’s bankruptcy. Circle claimed to back each minted USDC with one dollar and had deposited over $3.3 billion in collateral with SVB. Amid these events, USDC lost its peg, with its value dropping to $0.88. After U.S. banking authorities assured full coverage for Silicon Valley Bank’s uninsured depositors, USDC’s price gradually recovered to $1, illustrating the inherent risks of centralized stablecoins.

Crypto-Backed Stablecoins

Crypto-backed stablecoins are generated using Collateralized Debt Positions (CDPs). Unlike fiat-backed stablecoins, the contracts of these stablecoins permit users to mint and burn them. As of September 2023, there are over 75 crypto-backed stablecoins with a combined market cap of 5.817B. However, DAI, LUSD, eUSD, and MIM account for more than 83% of this. It’s also noteworthy that crvUSD is steadily gaining traction and is poised to challenge the dominant players in the future, particularly due to its unique deliquidation mechanism (a topic we’ll explore in a future post).

To mint CDP-backed stablecoins, a user must lock their assets in a position. They can then mint stablecoins valued less than their locked assets. Given the highly volatile nature of cryptocurrencies, it’s crucial not to mint at a 1:1 ratio. The collateralization ratio, defined as the value of collateral divided by the borrowed amount, indicates the risk associated with positions. The minimum required collateralization ratio varies across protocols, but they all operate similarly. If a position’s collateralization ratio falls below the required minimum, the assets associated with that position are sold or liquidated. The methods of liquidation differ: some protocols liquidate through on-chain auctions, some sell at the current market price without an auction, and others utilize AMM pools for sales. Users with a CDP must remain vigilant to safeguard their funds. To close a position, the user must repay the borrowed stablecoin amount along with any accrued interest. One might wonder why someone, like Alice, would lock up and essentially undervalue her assets. Several reasons can explain this. Perhaps Alice owns ETH (or another asset) and, while she doesn’t want to sell them, she needs liquid assets. She might borrow some DAI and later pay back her debt to retrieve her original assets. Alternatively, she might see an opportunity in DeFi, becoming a liquidity provider in an AMM pool using her stablecoins to earn profits, or she might pursue riskier, high-reward strategies. There are numerous motivations behind such actions.

DAI MakerDAO: While CDP-backed stablecoins offer more security than their centralized counterparts, they aren’t as scalable. Take DAI, the largest among them, as an example. DAI hit its all-time high with around a 10.3B market supply in February 2022. According to makerburn.com, the maximum supply of DAI, backed by non-stablecoins, peaked at about 5.7B in November 2021. This is significantly lower than USDT’s supply. The disparity isn’t due to MakerDAO being any less secure than Tether (the company behind USDT). The primary constraint is overcollateralization. While overcollateralization strengthens the system’s security, it hampers scalability since minting a $1 asset requires collateral worth more than $1.

Black Thursday of DAI: Following “Black Thursday” on March 12, 2020, MakerDAO permitted the minting of 1 DAI in exchange for 1 USDC. This move addressed DAI’s liquidity issues. On that day, ETH’s value plummeted, going from $196 to $101. This dramatic decrease led to a significant spike in network fees. The average gas price exceeded 78 gwei on March 12 and rose further to over 84 gwei on March 13, compared to an average of around 10 gwei prior to that. This surge in fees was primarily due to people rushing to sell their ETH and other assets on various DEXs, while others tried to transfer assets to centralized exchanges. The heightened fees and transaction demands caused network congestion. During this congestion, MakerDAO’s system couldn’t access price information from its oracle. Additionally, ETH’s price drop liquidated numerous positions, leaving many vulnerable. To close or safeguard these positions on MakerDAO, users needed DAI. This increased demand for DAI, causing its price to surge to $1.26. This price hike created an added 26% debt for borrowers. As ETH’s price continued to drop, more positions were liquidated, and due to network congestion, many could not bid on these liquidations. Malicious actors, dubbed “zero bidders,” placed almost null bids and won the auctions, extracting ETH worth $8.32M. To address this, MakerDAO urgently allowed USDC as collateral to mint DAI, facilitating an arbitrage opportunity and increasing DAI’s liquidity, bringing its price closer to $1. As the network congestion resolved, most of MakerDAO’s issues were addressed. However, the aftermath of Black Thursday cost MakerDAO 5.67M DAI. To cover this shortfall, they minted MKR, their governance token, and auctioned it for DAI.

In early 2021, MakerDAO introduced the Peg Stability Module, enabling users to exchange DAI with USDC and GUSD at a 1:1 ratio. Unlike the CDP Module, users directly swapped their asset for DAI without retaining ownership. This system protected the peg and spurred DAI’s growth. By July 2022, the DAI supply exceeded 7B, but notably, over 85% of it (almost 6B) was backed by stablecoins. The Maker community was concerned about this centralization and the vulnerabilities it introduced. They initiated a transition, replacing stablecoins with Real World Assets (RWA) — primarily T-bills. However, on March 12, 2023, three years after Black Thursday, DAI deviated from its peg, trading around $0.95. This was largely due to USDC’s issues, leading to DAI’s depegging. After USDC regained its peg, DAI stabilized. In response to this event, MakerDAO sped up the collateral conversion process, and by September 14, 2023, only 23% of DAI was backed by stablecoins.

LUSD — Liquity: The USDC depegging didn’t solely impact DAI. Liquity’s stablecoin, LUSD, also deviated from its peg around the same time. Interestingly, there was no concrete reason for this. As both DAI and LUSD are backed by CDPs, the market panic that affected DAI influenced perceptions of LUSD. However, since LUSD is exclusively backed by ETH, it quickly regained its peg. This illustrates the market’s sometimes irrational behavior.

LUSD, like DAI, is backed by CDP positions. Yet, their liquidation processes differ slightly. When the collateral in a CDP position drops in value, Maker initiates an on-chain auction to mitigate losses. This auction involves two stages. The first stage’s objective is to recover the amount lent by the protocol. If a keeper bids an amount equal to or more than the DAI initially minted for the CDP, the second stage begins. The goal here is to retrieve as much of the position owner’s assets as possible. This stage is a reverse auction: keepers bid on accepting a smaller fraction of the collateral in exchange for a fixed amount of DAI that covers the outstanding debt. This entire process spans between 6 and 24 hours, making DAI liquidations relatively inefficient. Enter Liquity, which offers an innovative solution for expedited liquidations. Speedier liquidations mean reduced minimum collateralization ratios. For instance, Maker has three vault types for borrowing DAI using ETH, each with distinct collateralization ratios and interest rates. The ETH-B vault, which has the lowest collateralization threshold, requires a ratio of 130%. Meanwhile, Liquity mandates a mere 110%. But how is this achieved?

Rather than auctioning liquidated assets, Liquity sells them within a Stability Pool. Unlike AMM pools, this Stability Pool only contains LUSD. Here, the counterpart to Maker’s keepers are the Stability Providers, who supply liquidity to the Stability Pool. When a CDP faces liquidation, the LUSD equivalent to the debt is extracted from the Stability Pool to be burnt, and the collateral gets allocated amongst Stability Providers based on their pool share. Since the base collateralization ratio is 110%, if Stability Providers immediately offload their newly acquired collateral, they secure a 10% premium. Consider this: If the prevailing ETH price is $1150 and Alice borrows 10,000 LUSD by pledging 10 ETH. Should the ETH price drop to $1100, her position would be liquidated via the Stability Pool, meaning the 10,000 LUSD she borrowed would be taken from the pool and eliminated. This collateral would then be divided amongst the Stability Providers. If Bob, for example, has a 10% stake in the Stability Pool, he effectively pays 1,000 LUSD for 1 ETH. Selling this ETH at its current price of $1100, he’d gain a $100 profit.

Having a Stability Pool for swift liquidations is ingenious. But what happens if it runs out? The system then treats every CDP holder as a Stability Provider. As such, the debt and collateral from liquidated CDPs are spread across all remaining CDPs relative to each user’s share of collateral in the system. For instance, if Alice owns 10% of all collateral, she’d inherit 10% of both the collateral and the debt from any liquidated CDP. She could then earn a 10% profit by selling the acquired collateral for LUSD.

While it’s feasible to establish a CDP at a 110% collateralization ratio, Liquity has a Recovery Mode to ensure the system’s stability. This mode activates when the overall collateralization ratio (the total value of collateral divided by the total loan amount) dips to 150% or lower. In this mode, new CDPs must have a collateralization ratio of at least 150%. Furthermore, CDPs below this threshold can face liquidation unless the Stability Pool is exhausted. This begins with the riskiest CDP and continues until the system’s overall ratio is back to 150%. Notably, this kind of liquidation doesn’t offload an entire CDP’s collateral. For example, if Alice has the most vulnerable position at 140% and Recovery Mode kicks in (assuming enough LUSD in the Stability Pool to cover her position), then 110/140 of her collateral is sold. She can reclaim the remaining 30/140. Therefore, she only loses 10/140 of her collateral, having borrowed LUSD equivalent to 100/140 and retrieved 30/140 of her collateral.

Liquity’s model excels with its handling of CDPs, and it has an exceptional feature to safeguard its price: redemptions. Redemptions are a crucial feature that strengthens the LUSD price. Users can redeem $1 worth of ETH for 1 LUSD. The redeemed ETH is sourced from the riskiest position — the one with the lowest collateralization ratio. As a result, the debt of the redeemed positions diminishes proportionate to the redeemed amount. Essentially, a redemption means settling the debt of the riskiest position and claiming its collateral. For a redemption to be worthwhile, the LUSD price must be below $1. This way, Alice can purchase LUSD on the open market and redeem it for ETH. For instance, if the ETH price is $1000 and Bob has the riskiest position, having borrowed 800 LUSD for 1 ETH. If Alice initiates a redemption with 100 LUSD, she essentially covers 100 LUSD of Bob’s debt and claims $100 worth of Bob’s collateral. In this scenario, after the redemption, Alice obtains 0.1 ETH. Bob’s remaining position is 700 LUSD borrowed against 0.9 ETH. To simplify, this example omits the redemption fee. Typically, there’s a flexible fee structure based on the last redemption date and the amount to be redeemed. This structure aims to deter unnecessary redemptions, protecting CDP owners from potential redemption-based attacks. Moreover, Liquity doesn’t have a governance mechanism steered by its founders or investors. It doesn’t possess an admin key, ensuring no one can modify the system’s rules. The smart contract code is entirely immutable. These features position LUSD as a prime example of a resilient and decentralized stablecoin.

Algorithmic Stablecoins

Unlike other types, algorithmic stablecoins aren’t backed by an asset. Instead, they achieve stability through smart contracts and algorithms. Rather than being directly tied to a reserve of assets, they balance supply and demand.

UST collapse: A prime example of this type was TerraUSD, or UST for short. UST’s strength derived from its sister coin, LUNA, which was the Terra Blockchain’s native token. Note that after a certain crash, their names changed to USTC and LUNC respectively. The system’s smart contract allowed for natural arbitrage. A user could mint $1 worth of LUNA by burning a UST and vice versa. This mechanism ensured the peg’s stability. For example, if UST was trading at $0.90, arbitrageurs could buy UST and convert it to $1 worth of LUNA, thus reducing supply and restoring the peg. Conversely, if the peg increased in value, arbitrageurs could buy LUNA, convert it to UST at a profit, and thus increase UST supply, reducing its price. Sounds perfect, doesn’t it?

However, things took a turn. Both UST and LUNA experienced rapid growth and then a sudden crash. At the start of 2021, LUNA’s price was around $0.65, which soared to $119 by April 2022. Likewise, the total supply of UST increased from about 180 million at the start of 2021 to 18.8 billion by May 2022. To comprehend this, we must discuss some key players.

First, the Anchor protocol was a lending/borrowing platform for UST, offering around 20% APR to UST lenders. By May 2022, it held 17 billion UST in total value locked (TVL), with UST’s total supply at about 18.8 billion. This meant that 90% of all UST was stored in Anchor to earn 20% APR. However, only 3 billion UST was borrowed from Anchor. It became evident that the interest rates paid by borrowers wouldn’t cover the yields meant for lenders. On March 13th, Bybit predicted that Anchor’s yield reserves would deplete in approximately 13 days, given its current reserves and borrowing/lending rates. Still, the decline didn’t commence with this Bybit assessment.

The second player, Luna Foundation Guard (LFG), aimed to nurture the Terra Ecosystem by providing grants to new projects. LFG also maintained a reserve to safeguard UST during depegging events, holding assets primarily in Bitcoin, with some in AVAX and LUNA. Now familiar with these actors, we can delve into the crash.

On the evening of May 7th, Terraform Labs withdrew 150 million UST from the UST-3pool on Curve, which comprises stablecoins like USDC, USDT, and DAI. They intended to relocate these funds to another pool, inadvertently increasing the pool’s volatility. Within an hour, two traders took advantage of this change, selling 185 million UST via the UST-3pool. Terraform Labs then removed another 100 million UST, hoping to realign the UST balance with other stablecoins. However, several transactions had already disrupted UST’s peg by this point. To counteract this, three anonymous UST supporters traded a combined $480 million USDT for UST between May 7th and 9th. On May 9th, LFG liquidated a significant portion of its Bitcoin reserves for UST. But by May 10th, LFG’s reserves were depleted, and UST’s peg was again threatened.

UST’s main liquidity pool was quickly running low. In the 3pool, the ratio of UST to 3CRV was approaching a 95% to 5% split, a far cry from the ideal 50–50 balance. A final method remained for maintaining value: a UST owner could convert one UST into an equal value of LUNA. This led to a vast amount of UST being burned, resulting in a spike in LUNA’s supply. Consequently, LUNA’s value tanked, its supply reached the trillions, and its price fell to fractions of a penny. Once LUNA’s market capitalization dipped below UST’s, the irreversible harm was clear. Later, investors dumped their assets at constantly lower values, pushing UST’s worth down to just above one cent. In the end, the algorithmic stablecoin collapsed.

The market cap of UST had seen significant growth, rising from 180M to 18B in just 16 months. This surge was made possible due to the UST-LUNA relationship. However, the continuous minting of UST added to the system’s liabilities. If the only way users could convert assets was from UST to LUNA, the situation would have surely been different. As Terraform labs were the only entity permitted to mint UST, their growth would have been incremental, based on LFG’s funds.

USDD: The system underlying USDD changed in a particular manner. USDD was an algorithmic stablecoin that operates on the Tron network. The relationship between TRX, Tron’s native token, and USDD mirrored that of LUNA-UST. However, after the collapse of UST, only Tron DAO members retained the rights to mint and burn USDD. Furthermore, after certain modifications, TRX tokens used to mint USDD are no longer burned. Instead, they are sent to the DAO wallet. This change is questionable. Notably, unlike other DAOs, members of the Tron DAO are not TRX holders but are instead seven blockchain companies. With all that changes USDD is now backed by a reserve held by the Tron DAO, termed the Tron DAO Reserve (TDR). This reserve holds both TRX and BTC, with a collateralization ratio currently around 170%. However, if USDD deviates from its peg, TRX could also lose its value, similar to the LUNA crash. If you exclude TRX from the TDR, the collateralization ratio drops to about 50%, which is alarming. The presence of BTC in the reserve is also contentious. Justin Sun, the founder of the Tron network, is also the owner of Huobi, a centralized exchange. The wallet that Tron DAO claims holds the BTC from the reserve is also claimed by Huobi. This situation is unclear, as it’s uncertain if those assets belong to the reserve or to Huobi’s customers. In my view, USDD stands in stark contrast to LUSD; it’s significantly centralized and lacks robustness.

Hybrid Stablecoins

So far, we have explored three types of stablecoins: fiat-backed, crypto-backed, and algorithmic. There are hybrid stablecoins that combine elements from these types to create more resilient systems. UXD is such a hybrid stablecoin. While the first version of UXD might be seen as algorithmic, the current version is undeniably hybrid.

UXD & delta-neutral positions: UXD operates on the principle of delta-neutral positions. These positions remain unaffected by price fluctuations, making them commonly used in hedging strategies. A classic example of a delta-neutral position involves holding a spot asset while simultaneously holding a short position in perpetual futures. For instance, if you possess 1 spot ETH priced at 1500 USD and you establish a short perpetual futures position for the same amount, your balance remains stable in terms of USD value. If the ETH price jumps from 1500 to 1650, your spot balance would increase by 10%, but your short position would decrease by the same percentage. Thus, the total remains 1650–150 = 1500. If ETH’s price drops, the spot balance’s value declines, but profits from the short position offset this loss. It’s essential to recognize that there’s a fee system, often termed “funding rates,” for maintaining futures positions. Sometimes, short position holders pay long position holders, and other times, the reverse is true. The purpose behind this is to align future prices with spot prices. If the future price surpasses the spot price, those with long positions pay those with short positions. Conversely, if the future price is less than the spot price, those with short positions pay those with long positions. Generally, these payment intervals are set at 8 hours, though this can vary across exchanges.

The UXD Protocol issues its stablecoin, UXD, using delta-neutral positions. For example, if a user provides the protocol with $500 worth of SOL, the protocol holds onto that and creates a corresponding short perpetual futures position. The protocol then mints 500 UXD to give to the user, ensuring that this 500 UXD is always backed by a delta-neutral position valued at $500.

While the underlying position’s value remains stable, there are challenges to consider. For instance, scalability is contingent on the trading volume of decentralized exchanges (DEXs). To maintain decentralization, any exchange used to hold short positions must be decentralized. These DEXs must have sufficient volume to ensure that the protocol’s perpetual short positions don’t dominate the market. During significant market downturns or “black swan” events, long position holders may wish to close out. However, these positions are held until users choose to burn their UXD and claim the underlying collateral. If the protocol’s positions dominate the perpetual market, this could lead to a large number of forced liquidations. Another point of consideration is that the system is dependent on the DEXs it uses, which come with inherent risks like potential hacks.

For several reasons, the UXD Protocol introduced the Asset Liability Management Module (ALMM) on the 21st of September 2021. ALMM permits the minting of UXD by offering USDC, similar to MakerDAO’s Peg Stability Module. The ALMM also facilitates the creation of CDP positions to produce UXD. Additionally, they allocate UXD to various lending platforms and invest in real-world assets (RWA). Through CDPs, loaned assets, and RWAs, they generate revenue that is then used to repurchase their governance tokens.

Mango Market exploitation: Three weeks after the ALMM was announced, Mango Markets, which the UXD Protocol utilized, lost assets valued at $116M due to an exploit. The story goes like this: Mango Markets is a decentralized exchange (DEX) with an order book, but it also features a borrowing module. The entire incident took place within minutes, orchestrated through two accounts. With account “A”, the attacker used 5 million USDC to buy 483 million MNGO tokens, subsequently taking a short position on them. With account “B”, the same amount was spent on an identical quantity of MNGO, resulting in a total expenditure of 10 million USDC. This essentially set up a delta-neutral position. The trader then further invested in spot MNGO tokens, pushing its price from a mere 2 cents to an astonishing 91 cents in just ten minutes. This manipulation was feasible due to MNGO’s low trading volume and liquidity. With the value of spot MNGO skyrocketing, nearly $420 million in unrealized gains accrued in the trader’s “B” account. Using this $420M worth of MNGO as collateral, the attacker subsequently withdrew over $116 million from Mango’s liquidity pool.

Despite this exploit at Mango Markets, the UXD Protocol wasn’t severely impacted and managed to recover their funds post-incident. Even if they hadn’t been able to retrieve the funds, their insurance pool had ample capital to cover the losses. After the event, the UXD Protocol ceased creating delta-neutral positions on Mango. Now, UXD coins are solely backed by ALMM strategies. The UXD Protocol has also announced its expansion into the Ethereum ecosystem through both Arbitrum and Optimism. UXD coins minted on these networks will be supported by delta-neutral positions and other ALMM strategies.

FRAX & Curve wars: Another example of a hybrid stablecoin is FRAX. While some view Frax as fully algorithmic, I see its structure as somewhat hybrid. It’s important to recognize that the Frax ecosystem goes beyond just a USD-pegged stablecoin. The ecosystem includes a suite of DeFi tools:

  • Fraxbridge: Allows FRAX and FXS tokens to move between chains where FRAX Finance operates.
  • Fraxswap: An AMM with a constant product formula.
  • Fraxlend: A lending market developed by Frax Finance.
  • Frax Ether: A Liquid Staking Derivative (LSD) product for ETH.
  • Frax Ferry: A slower, but more secure way to bridge tokens.

Frax also played a role in the Curve wars, a contest to control Curve. Curve rewards LPs with CRV tokens in addition to trading fees. But not all LPs receive these inflationary CRVs equally. veCRV holders, who lock in their CRV tokens for up to four years to obtain voting rights, determine which pools receive CRV tokens as incentives. Protocols that collaborate with Curve aim to incentivize pools containing their tokens, as increased incentives generally lead to greater liquidity. Thus, several protocols, including Convex, Yearn, Frax, Redacted Cartel, Olympus DAO, and StakeDAO, vied for these CRV tokens. We’ll delve deeper into the Curve Wars when discussing the Curve-Convex structure later in the post.

Despite these aspects, Frax Finance’s primary aim is the stablecoin. The platform has three distinct stablecoins: FRAX, FPI, and frxETH. FRAX is pegged to the USD. FPI (FRAX Price Index) corresponds to a basket of real-world consumer items, defined by the US CPI-U average. frxETH is pegged to 1 ETH, similar to wETH. Though the foundations of FPI and frxETH are intriguing, our focus here is on the FRAX token.

FRAX is a fractional-algorithmic stablecoin, meaning it’s partially collateralized. USDC is the collateral used to mint FRAX. Its structure seems to combine elements of the UST-LUNA system and Maker’s Peg Stability Module (PSM). The Collateralization Ratio (CR) is crucial in determining the blend. For example, if the CR is at 100%, to mint 1 FRAX, Alice would require USDC equivalent to 1 dollar. At an 80% CR, Alice needs $0.8 in USDC and FXS worth $0.2. When Alice offers these assets to produce FRAX, USDC tokens are held as a reserve and FXS tokens are burned. The redemption process mirrors this. For a 1 FRAX token, Alice would receive a combination of USDC and freshly minted FXS, totaling $1 based on the current CR. The provided FRAX token is then destroyed. In an extreme scenario where the CR hits 0%, the mechanism mirrors the Terra UST-LUNA system. The crux is the CR value, which shifts algorithmically. If the FRAX token’s value rises, say to $1.04, the smart contract automatically decreases the CR, essentially relaxing the supply. If FRAX’s value dips, the CR rises, bolstering the system. When FRAX was initially introduced, its CR stood at 100%, and then market conditions decided the value.

The explanation provided above pertains to Frax Finance v1. In v2, Frax Finance introduced a new concept: Algorithmic Market Operations (AMOs). Traditionally, central banks use “Open Market Operations” to mint currency and intervene in the market when necessary, much like the Fed’s actions during the COVID crisis. Frax, in a similar vein, offers flexibility. Anyone can propose an AMO strategy via its governance system. If the strategy proves beneficial to the Frax community, it can be adopted.

One such strategy involves minting FRAX for a Curve pool to stabilize its value. This is akin to a central bank printing money without backing it with reserves to ensure market equilibrium. Another tactic might be to mint FRAX to boost liquidity on platforms like Compound. If a strategy is financially robust or addresses a particular societal need, FRAX can be minted as needed through an AMO. But, if an AMO results in diminished trust in FRAX (indicated by a decline in its value), the strategy can be automatically reverted based on the established algorithm.

Previously, Frax Finance was wary regarding the algorithmic support behind FRAX. The lowest CR they accepted was 82%. However, after witnessing challenges encountered by the Luna-Terra ecosystem and other similar crypto projects, they revised their strategy. The Frax team sought to instill greater confidence in users holding FRAX over extended periods. The primary goal was to strengthen FRAX’s financial properties, aiming specifically for a 100% CR. To achieve this, they suggested reinvesting a more significant chunk of the protocol’s profits as it expanded. This would increase the protocol’s assets and eliminate the need for FXS emissions for locked liquidity. Additionally, the protocol’s overseers were permitted to swap up to $3 million of protocol assets for frxETH every month. Consequently, on February 23rd, 2023, a vote cemented the full collateralization of their primary stablecoin, terminating their previous partial collateralization system.

Setting the CR at 100% diminishes the potential for under-collateralization. However, it does heighten the risks tied to USDC dependency. Recent insights have revealed that the Frax team is devising ways to counter these risks in v3. As of September 2023, no official announcement regarding v3 has been made. But it’s known that with v3, the FRAX token won’t rely on any fiat-backed tokens. Kazemian informed The Defiant, “FRAX v3 possesses a novel approach to managing its off-chain risks, a system never before implemented. Our RWA (Real World Asset) strategy, combined with our exclusive BAMM (Borrow AMM) loans and debt structure, means that continual redemptions of real-world fiat or treasuries aren’t essential to maintain FRAX v3’s stability.” This revelation is indeed intriguing, and I’m keenly anticipating the official declaration. For now, Frax continues to employ USDC through AMOs. Before the DAO’s decision to fix the CR at 100%, the FRAX token was moving on the triangle of stablecoin trilemma. But the question remains: what exactly is the stablecoin trilemma?

Stablecoin Trilemma

The Stablecoin Trilemma states that a stablecoin cannot simultaneously be decentralized, capital efficient, and maintain a stable price. The design of a stablecoin determines which of these elements it prioritizes and which it lets go. For instance, centralized stablecoins opt for price stability and capital efficiency at the cost of decentralization.

Now, you might wonder, what does “capital efficiency” mean? Capital efficiency is crucial for a stablecoin’s scalability. A stablecoin is considered capital efficient if the value of the capital required to produce one unit of the stablecoin is less than or equal to $1. For example, to create 1 USDT, you need $1, making USDT capital efficient. However, producing 1 DAI requires more than $1 because of DAI’s overcollateralized design. This means that DAI, along with other CDP-backed stablecoins, is capital inefficient.

To better understand this concept, let’s visualize the trilemma using the stablecoins we’ve discussed.

As mentioned earlier, centralized stablecoins such as USDT, USDC, BUSD, and TUSD prioritize price stability and capital efficiency. They achieve this because each unit is typically minted in exchange for 1 USD. However, it’s worth noting that their processes might not be fully transparent. CDP-backed stablecoins, on the other hand, are decentralized and maintain price stability, but they lack capital efficiency. Algorithmic stablecoins often face challenges in ensuring price stability.

FRAX is unique among stablecoins because it’s positioned inside the trilemma triangle. Its design allows it to sit between UST and USDC. This means FRAX can function as a fully algorithmic stablecoin (i.e., CR = 0%) but at the risk of losing its peg. Conversely, it can also be fully centralized (i.e., CR = 100%), thus protecting itself from that risk.

UXD is another noteworthy stablecoin. It’s both capital efficient and decentralized. However, it grapples with price stability, primarily because it relies on other DEXs to establish a delta-neutral position. If any of these platforms are compromised, UXD’s price could be significantly impacted. A prime example is the Mango Markets exploit. Yet, this isn’t UXD’s sole challenge. Given current market conditions, it’s nearly impossible to scale a stablecoin based on delta-neutral positions. For context, GMX, the largest DEX on Arbitrum that allows users to create perpetual positions, has a total short position value of around $17M. Scaling UXD would require considerably more volume on DEXs.

In conclusion, there’s no one-size-fits-all solution when it comes to stablecoins. Each has its advantages and drawbacks. Ultimately, users bear the responsibility of deciding which stablecoin best fits their needs. In this post, we’ve touched on the importance of stablecoins, what’s expected from them, and mechanisms that protect their pegs. We also delved into the different types of stablecoins, key players in each category, and noteworthy events in the stablecoin realm. We wrapped up our discussion by examining the stablecoin trilemma, underscoring the point that no stablecoin is without flaws. Stay tuned for our upcoming posts, where we delve deeper into these complex, yet fascinating aspects of the DeFi world.

--

--