Stablecoin Mechanics

Stablecoins are the most economically important class of DeFi token: USDT and USDC alone exceed $200B in circulating supply as of 2026, and the dollar values flowing through stablecoin contracts dwarf all other DeFi activity. Their security and stability assumptions differ fundamentally from other DeFi tokens, and auditing protocols that integrate them — or stablecoin protocols themselves — requires understanding their specific mechanics.

Stablecoin Categories

1. Fiat-Collateralized (Custodial)

Backed off-chain by USD reserves (cash, treasuries, commercial paper). Examples: USDT (Tether), USDC (Circle), PYUSD (Paypal/Paxos), FDUSD.

From an on-chain perspective, these are just ERC-20s with mint/burn controlled by the issuer. Their stability comes from off-chain redeemability, not from any on-chain mechanism.

Audit-relevant features:

  • Blacklist: USDC and USDT can freeze any address. Integrating contracts that hold significant balances can be frozen.
  • Upgradeability: USDC is upgradeable via proxy. Logic upgrades are controlled by the issuer.
  • Pause: the entire token can be paused, freezing all transfers.

2. Crypto-Collateralized (Overcollateralized)

Backed by on-chain crypto collateral worth more than the issued stablecoins. Examples: DAI (MakerDAO/Sky), LUSD (Liquity), sUSD (Synthetix), GHO (Aave), crvUSD (Curve), mkUSD/USDE.

The collateral mix evolves: DAI began as purely ETH-collateralized, then ETH + multi-collateral, and is now heavily backed by USDC (via PSM) and real-world assets. LUSD remains ETH-only with a 110% collateralization ratio.

These designs require liquidation to maintain solvency: as collateral value drops, undercollateralized positions are closed, with the collateral sold at a discount to cover the debt.

3. Algorithmic (Undercollateralized or Uncollateralized)

Maintain peg via algorithmic mechanisms rather than collateral. The 2022 collapse of UST/LUNA was the high-water mark of this category's failure: $40B+ in market cap vaporized in days. Pure algorithmic stablecoins are largely discredited; remaining experiments use hybrid models.

4. Hybrid / Synthetic

Combine multiple mechanisms. Examples: FRAX (originally fractional, increasingly collateralized), USDe (Ethena, delta-neutral perp hedging), USDD (TRON, mixed), GHO (with multiple discount/savings rate levers).

Ethena's USDe is particularly notable: backing is staked ETH + short ETH perpetual positions on centralized exchanges. The peg is maintained by the delta-neutral construction; the yield comes from staking yield + funding rate. CEX risk and funding-rate risk are first-order concerns.

5. CBDC and Bank-Issued Stablecoins (Emerging)

USDB (regulated bank-issued), various CBDCs in pilot. Not yet major in DeFi but expected to grow. Regulation-adjacent; legal exposure is part of the risk picture.

Mechanism Components

Peg Stability Module (PSM)

A direct-swap contract that converts one stablecoin to another at (near) 1:1, often with a fee.

Maker's PSM lets users swap USDC for DAI at essentially 1:1, with a small fee. This is how DAI maintains its peg above $1: when DAI is above peg, anyone can mint DAI by depositing USDC, increasing supply and pulling the price down.

GHO has a similar facility (with Aave-specific governance).

Audit concerns:

  • PSM fees and caps must prevent rapid drain.
  • USDC backing introduces issuer (Circle) risk to DAI.
  • PSM math is straightforward but historically has had rounding bugs.

Stability Fee / Interest Rate

Borrowers in a CDP-style stablecoin (DAI, LUSD's borrowing fee, crvUSD) pay interest on their debt. The rate is governance-controlled and used to balance supply vs. demand.

Savings Rate / DSR

DAI's "DAI Savings Rate" pays interest on deposited DAI, denominated in DAI. This is funded from stability fees and PSM income. Aave's GHO has analogous facilities.

Audit-relevant: the DSR rate is often a key parameter. Rate spikes mean depositor outflow and pegging stress; rate drops mean depositors leave for higher yield, which can also stress the peg.

Liquidation

CDP-style stablecoins must liquidate undercollateralized positions. Designs:

  • Auction-based (MakerDAO): the position is auctioned to bidders, with the keeper who triggers the auction earning a fee.
  • Stability-pool-based (Liquity): a fund (the Stability Pool) pre-deposits LUSD to cover liquidations, receiving collateral at a discount.
  • Direct-discount (Aave-style): liquidators repay the debt and take collateral at a configured discount.
  • Auto-deleverage (Synthetix): when undercollateralized, the system itself unwinds positions.

Each has bugs:

  • Auctions: keeper griefing, MEV in auction bids, parameter brittleness.
  • Stability pool: drain via cascading liquidations, depositor exit dynamics.
  • Direct-discount: bad-debt accumulation when collateral price gaps below liquidation price.

Emergency Shutdown / Settlement

DAI has Emergency Shutdown — a governance-triggered mode that pauses all activity and lets DAI holders redeem proportionally from the collateral pool. The shutdown trigger and the settlement math are both load-bearing and rarely-exercised audit surfaces.

LUSD has a "Recovery Mode" with stricter collateral requirements.

Specific Audit Concerns

1. Oracle Dependency in Liquidations

Stablecoin liquidations depend on a price oracle. All the oracle considerations from §4.15.4 apply with extreme intensity. A bad oracle = bad debt or premature liquidation.

Specific concerns:

  • Stalewness during volatile periods: during a market crash, oracles can lag; positions can become deeply undercollateralized before being marked as liquidatable.
  • Manipulation: for less-liquid collateral assets, oracle manipulation is feasible.
  • Sequencer downtime (L2): stablecoins on L2s need sequencer-uptime feeds.

2. Bad Debt Socialization

When a liquidation can't fully cover the debt (collateral was sold below the debt value), the protocol has bad debt. Designs differ in how this is handled:

  • MakerDAO: bad debt is covered by minting MKR (dilution).
  • Liquity: stability pool absorbs the loss; if depleted, debt is redistributed to remaining borrowers.
  • Aave/Compound: bad debt accumulates as protocol loss; can be paid down from reserves or simply written off.

The audit question: under what stress scenario does bad debt exceed the protocol's absorption capacity, and what happens then? This must be modeled, not assumed.

3. Redemption Mechanism

Liquity allows any holder to redeem 1 LUSD for $1 of ETH (minus a small fee). This is what enforces the lower-bound peg: if LUSD trades below $1, redeem and arbitrage.

For LUSD: redemptions take collateral from the riskiest borrowers (lowest CR). Borrowers at higher CR are unaffected, which incentivizes maintaining high CR.

Audit-relevant:

  • Redemption rate / fee dynamics.
  • Order of redemption (lowest CR first).
  • DoS via deliberately-low-CR positions.

4. Inflation Attacks on Vault Tokens

Stablecoin protocols often issue receipt tokens (sDAI, sUSDe, stkGHO). These are vault tokens subject to ERC-4626-style inflation attacks (§4.15.0). Initial-deposit donation attacks have been found in production stablecoin vaults; not theoretical.

5. Cross-Protocol Composition

Stablecoins are heavily used as collateral in other DeFi protocols. The composition creates cycles:

  • DAI is heavily backed by USDC (via PSM). USDC depeg → DAI depeg.
  • USDe is backed by ETH + perp positions. CEX failure (FTX-style) → USDe stress.
  • Aave's GHO is collateral-mintable. Aave bad debt → GHO supply concerns.

A protocol that accepts multiple stablecoins as collateral must understand the correlations: in a crisis, "diversified" stablecoin collateral may all move together.

6. Governance Risk

Most stablecoins have governance — parameters, mint authorities, oracle whitelists. Governance is a centralization vector:

  • MakerDAO's governance has historically been low-turnout; whale governance attacks are feasible (and have been attempted).
  • Newer stablecoins (USDe, FRAX v3) have varying degrees of governance decentralization.

Audit posture: enumerate governance powers, timelock delays, and what each parameter can do to user funds. "Governance can change the oracle" is a critical-class consideration, not a documentation footnote.

7. Regulatory / Off-Chain Risks

Centralized stablecoins (USDC, USDT) have material off-chain risks:

  • Blacklisting: any address can be frozen at the issuer's discretion. A DEX, lending pool, or other contract holding USDC can be frozen as a whole.
  • Issuer insolvency: Circle (USDC) held funds at SVB during its March 2023 collapse; USDC depegged briefly to ~$0.88 over the weekend.
  • Regulatory action: sanctions, court orders, regulatory directives can compel issuer action.

The 2026 regulatory environment (MiCA in EU, various US frameworks) adds compliance constraints. Audit reports should note where stablecoin selection has regulatory implications.

Audit Checklist

For a protocol that uses stablecoins:

  • Each integrated stablecoin's specific quirks are documented (blacklist, pause, transfer hooks, fee-on-transfer).
  • Protocol behavior under stablecoin depeg is modeled. Worst-case bad debt is quantified.
  • Oracle for the stablecoin uses market price, not assumed $1.
  • Liquidation parameters tolerate realistic stablecoin volatility.
  • Cross-stablecoin correlations are considered (multiple stablecoins are not independent in a crisis).

For a protocol that is a stablecoin:

  • Mint and burn authorities are correctly access-controlled.
  • Liquidation mechanism is robust under stress (modeled, not just unit-tested).
  • Oracle setup is appropriate for the collateral mix.
  • Bad-debt absorption mechanism is solvent under realistic scenarios.
  • Emergency shutdown / settlement is implemented and tested.
  • Governance powers are documented; sensitive parameters are timelocked.
  • PSM (if any) fee/cap parameters prevent rapid drain.
  • Redemption mechanism (if any) is fair and resistant to grief.

Closing

Stablecoins are deceptively complex. The on-chain code is often relatively small; the economic mechanics are vast. A surface audit that verifies "no re-entrancy, no integer overflow" misses the actual risks: oracle dependency, collateral correlation, governance, and the gap between the protocol's model and reality.

Audits of stablecoin-integrating protocols should treat the stablecoin layer as a first-class dependency with its own risk model, not as a fungible USD-equivalent token.