ChainScore Labs
LABS
Guides

Stablecoin Design Flaws: Historical Case Studies

A technical post-mortem of major stablecoin failures and vulnerabilities, analyzing the root causes and systemic risks in their design.
Chainscore © 2025
core_flaw_categories

Taxonomy of Stablecoin Vulnerabilities

An overview of critical design flaws and systemic risks in stablecoin mechanisms, illustrated by historical failures and near-collapses that highlight the fragility of maintaining a stable peg.

01

Collateral Liquidation Crisis

Collateral volatility and liquidation spirals occur when the backing assets of a stablecoin plummet in value, forcing rapid, large-scale sales that depress prices further and threaten the peg. This creates a death spiral where liquidations beget more liquidations.

  • Feature: Over-reliance on a single, volatile asset class like a proprietary token.
  • Example: The 2022 collapse of TerraUSD (UST), whose algorithmic stability depended on burning its sister token LUNA, which entered a fatal downward spiral.
  • Why this matters for users: Can lead to a complete and rapid de-pegging, resulting in catastrophic, overnight losses for holders.
02

Centralized Reserve Failure

Custodial and transparency risks emerge when a stablecoin issuer holds reserves with opaque or risky third parties, or engages in improper asset management, making the stablecoin vulnerable to a bank run if trust evaporates.

  • Feature: Lack of real-time, audited proof of reserves for fiat-backed stablecoins.
  • Example: The temporary de-peg of USDC in March 2023 following the Silicon Valley Bank collapse, which held a portion of its cash reserves.
  • Why this matters for users: Users bear the counterparty risk of the issuer's banking partners and internal governance, which can freeze funds or break the peg.
03

Algorithmic Design Flaw

Reflexivity and incentive misalignment in algorithmic stablecoins create feedback loops where the stability mechanism itself becomes the primary source of instability, especially during market stress when arbitrage incentives break down.

  • Feature: Peg maintenance relies on minting and burning secondary tokens based on market price.
  • Example: The Iron Finance (IRON) collapse in 2021, where a "bank run" dynamic overwhelmed its partial-collateral model and algorithmic rebalancing.
  • Why this matters for users: These models are untested at scale during crises and can fail spectacularly, as they often lack a fundamental asset floor.
04

Smart Contract Exploit

Code vulnerabilities and governance attacks target the smart contracts that manage minting, burning, and upgrades. Flaws or centralized admin keys can allow attackers to mint unlimited tokens or drain collateral reserves.

  • Feature: Critical functions controlled by a multi-sig wallet or upgradeable proxy contracts.
  • Example: The 2017 Parity wallet freeze, which inadvertently locked millions in ETH, and various DeFi hacks impacting stablecoin pools.
  • Why this matters for users: Even well-collateralized stablecoins can become worthless or frozen if their underlying code is compromised, losing all user funds.
05

Regulatory & Legal Risk

Compliance uncertainty and enforcement actions pose an existential threat, as regulators may deem a stablecoin an unregistered security, sanction its reserves, or restrict its use, leading to forced redemptions or operational shutdown.

  • Feature: Operating in a legal gray area regarding securities, money transmission, and banking laws.
  • Example: The ongoing regulatory scrutiny of Tether (USDT) by the NYAG and other authorities, resulting in fines and operational constraints.
  • Why this matters for users: Sudden regulatory action can limit access, cause de-pegging due to panic, or lead to a protracted legal process freezing assets.

Case Study: The TerraUSD (UST) Death Spiral

A step-by-step deconstruction of the algorithmic stablecoin's collapse, analyzing the critical design flaws and market mechanics that led to its failure.

1

Foundations of the Terra Ecosystem

Understanding the core mint/burn mechanism and the dual-token model.

Detailed Instructions

The Terra ecosystem was built on a dual-token model consisting of the stablecoin TerraUSD (UST) and its governance/staking token, Luna (LUNA). The stability of UST was maintained not by fiat collateral but by an algorithmic mint-and-burn mechanism. This system allowed users to always swap $1 worth of LUNA for 1 UST, and vice versa, through the Terra blockchain's on-chain market module. The protocol's stability relied entirely on the market price of LUNA and the arbitrage incentives it created.

  • Key Mechanism: When UST traded above $1, arbitrageurs could burn $1 of LUNA to mint 1 UST, selling it for a profit, increasing UST supply and pushing the price down.
  • Counter Mechanism: When UST traded below $1, arbitrageurs could burn 1 UST to mint $1 worth of LUNA, reducing UST supply and pushing the price up.
  • Critical Dependency: This created a reflexive loop where UST's stability was directly tied to LUNA's market capitalization, which needed to be significantly larger than UST's to absorb volatility.

Tip: The Anchor Protocol, offering ~20% APY on UST deposits, was a major driver of demand but also created unsustainable yield expectations that masked the underlying fragility.

2

The Initial Depeg and Negative Feedback Loop

Analyzing the trigger event and the start of the death spiral.

Detailed Instructions

In early May 2022, large, coordinated withdrawals from the Anchor Protocol began, removing billions in UST liquidity. This caused UST to depeg slightly below $1. According to the protocol's design, this should have triggered a stabilizing arbitrage: users burning UST to mint discounted LUNA. However, the scale of the sell-off overwhelmed this mechanism. As UST was burned, new LUNA was minted at an accelerating rate, dramatically increasing its supply.

  • The Trigger: On May 7th, a single wallet withdrew 150 million UST from Anchor, initiating a cascade. By May 9th, over $2 billion in UST was withdrawn.
  • Failed Arbitrage: The burning of UST minted LUNA so rapidly that its price began to plummet, destroying the value backing the stablecoin system.
  • Feedback Loop Initiated: The falling LUNA price meant that burning 1 UST yielded less dollar value of LUNA, reducing the arbitrage incentive and further eroding confidence in the peg.

Tip: The Luna Foundation Guard (LFG) attempted to defend the peg using its Bitcoin reserves, but its market sells contributed to broader crypto market declines, exacerbating the panic.

3

Hyperinflation of LUNA and Total Collapse

Examining the runaway minting process and the breakdown of the core mechanism.

Detailed Instructions

As panic spread, the system entered a terminal feedback loop, often called the death spiral. The more UST was sold, the more it depegged. The more it depegged, the more UST was burned for LUNA. The more LUNA was minted, the faster its price fell. The falling LUNA price made the backing for UST evaporate, causing further depeg. The protocol's minting logic had no circuit breakers for this scenario.

  • Runaway Minting: At the peak, the LUNA supply inflated from about 345 million tokens to over 6.5 trillion in less than a week, rendering individual tokens nearly worthless.
  • Broken Peg Mechanism: The arbitrage equation amount_luna = amount_ust / luna_price meant that as luna_price approached zero, the amount of LUNA minted approached infinity.
  • On-Chain Evidence: Blockchain data shows the Terra mint module address (terra1dp0tajsruausn4cz2gq0upmc4k5tyjv4a9u0fa) minting trillions of LUNA tokens in a continuous stream, as seen in commands like:
bash
terrad query bank total --node https://terra-rpc.polkachu.com

Tip: This hyperinflation permanently destroyed the tokenomics, as the market cap of LUNA could no longer conceivably support the outstanding UST supply, even if confidence returned.

4

Aftermath and Key Design Lessons

Reviewing the consequences and the fundamental flaws exposed.

Detailed Instructions

The collapse erased over $40 billion in market value within days. The ecosystem was halted and eventually rebranded as Terra 2.0, with a new LUNA token that did not include the algorithmic stablecoin. The event highlighted critical algorithmic stablecoin design flaws and triggered a regulatory reckoning.

  • Flaw 1: Reflexivity: The system's stability depended on the market value of its own governance token, creating a circular and unstable foundation.
  • Flaw 2: Lack of Hard Backstop: There was no sufficient, non-correlated asset reserve (like USD cash or Treasuries) to absorb a loss of confidence. LFG's Bitcoin reserves were insufficient and themselves volatile.
  • Flaw 3: Speed of Digital Bank Runs: On-chain mechanisms allow for instantaneous, global withdrawals that can outpace any stabilizing response.
  • Flaw 4: Incentive Misalignment: The high Anchor yield attracted short-term, yield-sensitive capital that fled at the first sign of trouble, rather than long-term believers in the protocol.

Tip: This case study serves as a paramount example of the risks when a stablecoin's stability is derived from market sentiment and arbitrage alone, without robust, exogenous collateral.

Comparative Analysis of Major Depegging Events

Comparison of design flaws and outcomes from key stablecoin depegging incidents.

Event / CoinDatePrimary Design FlawMax. Depeg (%)Recovery TimeCollateral Type

TerraUSD (UST)

May 2022

Algorithmic (death spiral via LUNA mint/burn)

-99.9%

Did not recover

Algorithmic

Iron Finance (IRON)

June 2021

Partial collateralization & bank run mechanism

-80%

Did not recover

Partial (USDC & IRON TITAN)

USD Coin (USDC) on Silicon Valley Bank

March 2023

Centralized cash reserve exposure

-13%

~2 days

Cash & Treasuries

DAI (MakerDAO, Black Thursday)

March 2020

Auction congestion & network fees

-12%

~2 days

Multi-asset (ETH, USDC, etc.)

Frax Finance (FRAX)

March 2023

Algorithmic (AMM pool imbalance)

-8%

~1 day

Hybrid (Collateral + Algorithmic)

TrueUSD (TUSD) on Prime Trust

June 2023

Centralized custodian insolvency risk

-5%

~1 week

Cash & Equivalents

The Inherent Trade-Offs in Stablecoin Design

Understanding the Core Dilemma

At its heart, stablecoin design is a balancing act between three key properties: decentralization, capital efficiency, and price stability. You can rarely optimize for all three at once. A stablecoin that is highly decentralized and stable, like DAI, may require over-collateralization, making it capital inefficient. A stablecoin that is capital efficient and stable, like USDC, relies on centralized entities, sacrificing decentralization.

Key Trade-Offs Explained

  • Decentralization vs. Stability: A truly decentralized stablecoin depends on volatile crypto collateral. If that collateral's value crashes (like in the Terra/LUNA collapse), the peg can break.
  • Capital Efficiency vs. Security: To be efficient (e.g., 1:1 backing with minimal collateral), a stablecoin often needs a central custodian, creating a single point of failure and regulatory risk.
  • Stability vs. Scalability: Maintaining a peg under stress often requires active intervention, like MakerDAO's Stability Fee adjustments or Frax Finance's algorithmic market operations, which can be slow or complex to scale.

Real-World Example

When the TerraUSD (UST) algorithmic stablecoin lost its peg in May 2022, it demonstrated the fragility of designs that prioritize capital efficiency and decentralization without a robust, fallback stabilization mechanism. Its sister token, LUNA, was meant to absorb volatility, but a bank run caused a death spiral.

Case Study: DAI on Black Thursday 2020

A technical walkthrough of the cascade of events and design flaws that led to the DAI stablecoin losing its peg during the March 12, 2020, market crash.

1

Market Collapse and Liquidation Onslaught

The initial market crash triggers a massive wave of undercollateralized positions in the MakerDAO system.

Detailed Instructions

On March 12, 2020 ("Black Thursday"), the price of Ethereum (ETH) collapsed by over 40% in under 24 hours. This rapid devaluation caused a significant portion of the Collateralized Debt Positions (CDPs) backing DAI to fall below the 150% collateralization ratio. The MakerDAO system's automated liquidation engine was activated en masse to auction off this undercollateralized ETH to cover the outstanding DAI debt.

  • Sub-step 1: Identify the trigger: Monitor the ETH/USD price feed from the Maker Oracle Security Module (OSM). On March 12, the price plummeted from ~$190 to ~$90.
  • Sub-step 2: Assess system stress: Check the Global Debt Ceiling and Total DAI Supply. At the time, over $4 million DAI was at immediate risk from undercollateralized vaults.
  • Sub-step 3: Activate liquidations: The system's Liquidation Ratio was breached for thousands of vaults, queuing them for the Collateral Auction process.

Tip: The severity was compounded by network congestion, causing critical price feed updates and liquidation transactions to be severely delayed.

2

Auction Mechanism Failure and Zero-DAI Bids

Critical flaws in the auction design allowed liquidators to win collateral for zero DAI bids, creating bad debt.

Detailed Instructions

The collateral auction process, designed to recoup the system's DAI, catastrophically failed. The Dutch auction model started with a high price that decreased over time. However, due to extreme network congestion and a flawed minimum bid (dust) parameter, keepers (liquidator bots) were able to submit winning bids of 0 DAI for large batches of ETH. This meant the system received no payment for the sold collateral, but the corresponding DAI debt was still considered "covered," creating bad debt.

  • Sub-step 1: Analyze auction parameters: Review the bite and flip contract logic. The beg (minimum bid increase) was a small percentage, and the ttl (auction duration) was too short for the congested network.
  • Sub-step 2: Examine a failed auction: Query the Flip auction contract (e.g., 0xf543...) for events. Look for LogNote events where bid value is 0.
  • Sub-step 3: Calculate the bad debt: The system accrued approximately $5.6 million in bad debt from these failed auctions, as the protocol sold ETH but did not burn the equivalent DAI.

Tip: The gasPrice during this period exceeded 1000 Gwei, making it economically non-viable for many keepers to participate fairly, leaving the field open for exploitative bots.

3

DAI Supply Shock and Peg Breakdown

The combination of liquidations and auction failures created a severe supply shock, breaking DAI's $1 peg upwards.

Detailed Instructions

As vaults were liquidated, the associated DAI debt was supposed to be burned, reducing supply. However, the bad debt from zero-DAI auctions meant this DAI was not burned. Simultaneously, the urgent need for users to recollateralize their positions or repay loans to avoid liquidation created massive buy-side demand for DAI. This imbalance—stagnant supply against soaring demand—caused the DAI price to spike far above its $1 peg, reaching up to $1.10 on secondary markets.

  • Sub-step 1: Track the peg: Monitor the DAI/USDC price on decentralized exchanges like Uniswap (e.g., pool address 0xAE46...). The price deviated significantly from the Target Price of 1.00.
  • Sub-step 2: Analyze supply metrics: Use the vat contract to call daiSupply(). The total DAI supply remained artificially high due to the unburned debt.
  • Sub-step 3: Assess market dynamics: The Dai Savings Rate (DSR) was at 0%, providing no incentive to lock DAI in the contract and reduce circulating supply during the crisis.

Tip: This positive price deviation is a rare failure mode for an overcollateralized stablecoin, highlighting the critical importance of robust liquidation mechanisms.

4

Emergency Shutdown & Post-Mortem Reforms

The Maker community's emergency response and the subsequent protocol upgrades to prevent future failures.

Detailed Instructions

Facing systemic insolvency, the MakerDAO Risk Core Unit and MKR token holders enacted an Emergency Shutdown vote. This was ultimately avoided by passing an executive vote to mint new MKR tokens and auction them to recapitalize the system, covering the $5.6M bad debt. This debt auction (flap) introduced dilution for MKR holders but restored solvency. The event triggered a comprehensive overhaul of the protocol's risk parameters and mechanisms.

  • Sub-step 1: Execute the debt settlement: The vote passed, allowing the end and vow contracts to mint 30,000 MKR for a Surplus Auction.
  • Sub-step 2: Implement critical upgrades: Key changes included introducing the Circuit Breaker module, switching from flip to collateral auction (clip) modules with a linear price decay, and adding Auction Price Multipliers.
  • Sub-step 3: Adjust risk parameters: The Debt Ceiling for individual collateral types was reduced, Liquidation Penalties were increased, and the Oracle Security Module delay was optimized.

Tip: The reforms, especially the new auction design, were rigorously tested using collateral auction simulations (Clipper) to ensure they could withstand similar volatility shocks in the future.

Mitigation Strategies & Future-Proof Design

Algorithmic stability mechanisms must be supplemented with robust, verifiable collateral and fail-safes. The collapse of UST, which lost its $1 peg in May 2022 and erased nearly $40 billion in market value, demonstrated the peril of relying solely on a reflexive mint-and-burn algorithm with a volatile sister token (LUNA).

  • Over-collateralization with diversified assets provides a tangible buffer against market stress.
  • Real-time, on-chain transparency of reserves allows for constant public audit.
  • Circuit breakers and redemption pauses can halt a death spiral, giving time for managed intervention.

Future designs should incorporate hybrid models, like Frax Finance's partial collateralization, and stress-test scenarios far beyond historical volatility.