Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
The Deepest Stablecoin Knowledge Base
stablecoin-bible.com
LATEST
Hong Kong's Stablecoin License: 36 Applied, Only 2 Approved — Why HSBC and the Standard Chartered Venture Made the Cut, and What the FRS Regime Actually Requires  ·  Why Swapping USDT for USDC Costs Almost Nothing, But Swapping to ETH Doesn't: Inside the StableSwap Algorithm  ·  AI Agents Made 8.7 Million Stablecoin Transfers in One Week — Worth Just $367,950 Total: x402's 2026 Record High, and Why the Dollar Value Didn't Follow  ·  Idle Stablecoins Are a Waste: Comparing Six Low-Risk Ways to Earn Interest  ·  Tether Earned $1.5 Billion in a Quarter, Yet Its Safety Cushion Was Cut in Half: Two Numbers, Same Quarter, Telling Completely Different Stories  ·  No Token, No Hype Play: Why Stripe and Paradigm Built a "Boring" Stablecoin Settlement Chain
Glossary · DeFi Applications

StableSwap Invariant

DeFi Applications intermediate

30-Second Version · For the impatient
An automated-market-maker pricing formula invented by Curve that blends constant-sum and constant-product models, keeping the trading curve nearly flat when pool balances are near equilibrium — dramatically reducing slippage on stablecoin swaps.
Full Explanation +
01 · What is this?

What is StableSwap, and how does it differ from the constant product formula used by general AMMs?

StableSwap is an automated-market-maker pricing algorithm invented by Curve Finance, purpose-built for asset pairs that are theoretically supposed to hold the same value — stablecoin pairs like USDC/USDT/DAI, or highly correlated assets like stETH/ETH. Unlike the constant product formula (x × y = k) used by general AMMs such as Uniswap, StableSwap blends a constant sum formula (x + y = D) together with the constant product formula, controlling the mix between the two through a parameter called the amplification coefficient (A).

The core difference: a constant product formula assumes relative prices between assets can swing widely with supply and demand — reasonable for a volatile pair like ETH/USDC. Applying that same formula to a stablecoin pair produces unnecessary price movement the moment pool ratios become even slightly imbalanced. StableSwap is mathematically optimized around the property that the assets should hold the same price, keeping the trading curve nearly flat across the critical range so large trades barely move the price.

02 · Why does it exist?

Why did anyone bother inventing StableSwap instead of just using an off-the-shelf constant product formula?

Stablecoin trading volume in DeFi is enormous — Curve's 3pool alone can see $50–200 million in daily volume. If every large stablecoin swap had to absorb the high slippage a constant-product formula produces, that would be a persistent, substantial hidden cost for institutions, market makers, and any protocol that frequently rebalances positions — effectively forcing traders to pre-pay for volatility risk in a market that isn't supposed to have much volatility to begin with.

StableSwap's core reason for existing is eliminating that unnecessary cost. By recognizing that stablecoins are supposed to hold the same price, it mathematically flattens the trading curve across the critical range, so large trades only bear the risk that's actually real — the possibility of a genuine depeg — rather than paying for volatility that doesn't exist under normal market conditions. This is also why Curve has maintained market share and volume in stablecoin swaps far above general-purpose DEXs for years.

03 · How does it affect your decisions?

How does StableSwap actually work, and what role does the amplification coefficient play?

StableSwap's core formula blends the constant sum and constant product models onto a single curve: when pool balances are near equilibrium — each asset holding roughly equal share, both near $1 — the curve behaves close to a constant sum formula, nearly a flat line, meaning large trades barely move the price. Only when the pool becomes imbalanced past a safe range does the curve gradually shift back toward a constant-product shape, ensuring the algorithm still functions — rather than being drained in one direction — when assets genuinely diverge from their peg.

The amplification coefficient (A) is the key parameter controlling how wide that flat range stays: a higher A widens the flat range, letting the pool absorb larger trades without visibly moving off $1; a lower A causes the curve to start behaving like a constant product formula sooner. This parameter isn't fixed — it's set through Curve's DAO governance vote, and the major 3pool (USDC/USDT/DAI) currently runs A=2000. There was even a past governance proposal to raise A to 5000, which ultimately failed over concerns it would amplify risk during a depeg.

04 · What should you do?

What does StableSwap mean for ordinary users, and what should you watch out for when using it?

For anyone regularly converting between stablecoins, StableSwap's practical benefit is dramatically lower slippage cost — the same $1 million USDC-to-USDT swap runs about 0.008% slippage (roughly $80) through a StableSwap venue like Curve's 3pool, versus potentially 0.127% or more (over $1,200) through a general AMM pool. Most aggregators (1inch, Matcha, CoW Swap) automatically route to StableSwap pools, so ordinary users don't need to compare manually, but understanding the mechanism helps in reading unusual signals.

One thing worth watching: StableSwap's low slippage rests on the assumption that assets hold their peg — an assumption that holds under normal conditions but is most fragile exactly during a crisis. During the March 2023 Silicon Valley Bank crisis, USDC briefly traded near $0.88 on some venues, and StableSwap's amplification coefficient lost its ability to suppress the price deviation, sharply widening slippage. If you see slippage on a stablecoin swap suddenly running far higher than usual, that's usually not simple illiquidity — it often means the market has already started pricing in depeg risk for one of the assets, worth investigating before pushing through the elevated cost.

Sources: How Does Curve Finance Work? Complete Guide to DeFi's Stablecoin DEX - LedgerMind, What is Curve (CRV)? - Bitstamp
Real-World Example +

On the same $1 million USDC-to-USDT swap, Curve's 3pool (running StableSwap, A=2000) produces roughly 0.008% slippage — about $80 — while executing the identical trade through a Uniswap V3 general pool runs roughly 0.127% slippage, over $1,200 — a difference of more than 10x.

Common Misconceptions +
✕ Misconception 1
× Misconception: StableSwap guarantees stablecoin swaps are always low-slippage, when actually: low slippage rests on the assumption that assets hold their peg — once an asset genuinely depegs (as USDC briefly did to $0.88 in 2023), the amplification coefficient loses its ability to suppress price deviation, and slippage widens sharply rather than staying at normal levels
✕ Misconception 2
× Misconception: any exchange offers roughly the same slippage for a stablecoin pair, when actually: general AMMs (like Uniswap's constant product formula) typically produce slippage more than 10x higher than a StableSwap pool for the same pair — the gap comes from whether the algorithm itself is mathematically optimized around the fact that the assets should hold the same price, not from branding
The Missing Link +
Direct Impact

StableSwap's advantage is dramatically lowering slippage cost for swaps between assets that should hold the same value under normal conditions, keeping real-world costs on large stablecoin trades far below general AMMs; the drawback is that this optimization rests entirely on the assumption that the assets should be worth the same — once an asset genuinely depegs, the amplification coefficient rapidly loses effectiveness, and slippage can widen even more sharply than on a general AMM, because the volatility risk the pool had been compressing gets released all at once.

Ask a Question
Please enter at least 10 characters
More Related Topics