On this page
StableSwap AMM: Low-Slippage Pools for Stable Pairs
A StableSwap Curve AMM is an automated market maker tuned for assets that should trade near a fixed ratio, such as two stablecoins both worth about one dollar. Introduced by Curve in 2019, it blends two pricing curves to give very low slippage when a pool is balanced.
Key Takeaways
- StableSwap blends a constant-sum and a constant-product curve to flatten pricing near a 1:1 ratio.
- An amplification coefficient A controls how flat the curve is around the balance point.
- It delivers low slippage for like-valued assets but reverts to high slippage if the peg breaks.
- It does not eliminate risk: a depegging asset still inflicts losses on liquidity providers.
Key Takeaways
- StableSwap blends a constant-sum and a constant-product curve to flatten pricing near a 1:1 ratio.
- An amplification coefficient A controls how flat the curve is around the balance point.
- It delivers low slippage for like-valued assets but reverts to high slippage if the peg breaks.
- It does not eliminate risk: a depegging asset still inflicts losses on liquidity providers.
What It Is
StableSwap is the automated market maker design behind Curve, described in a 2019 whitepaper by Michael Egorov. It targets a specific problem: trading assets that are supposed to be worth roughly the same, like two dollar-pegged stablecoins or a token and its wrapped version.
A plain constant-product pool charges meaningful slippage even on stable pairs, because its curve bends everywhere. StableSwap reshapes the curve so it is nearly flat in the middle, where balanced pools spend most of their time, while still behaving like a normal pool at the extremes.
The Intuition
Two pricing rules sit at opposite ends. A constant-sum curve, x + y = constant, holds price at exactly 1:1 and gives zero slippage, but it can be fully drained of one asset. A constant-product curve, x * y = k, never empties but charges slippage everywhere.
StableSwap mixes them. Near the balance point it behaves like the constant-sum curve, so swaps between equal-valued assets are cheap. As the pool drifts far from balance, it transitions toward the constant-product curve, so it can never be completely emptied and a depegging asset starts to cost real slippage. You get the best of both regimes where it matters and a safety net where it does not.
How the StableSwap Curve AMM Works
The StableSwap invariant for n coins is:
A * n^n * sum(x_i) + D = A * D * n^n + D^(n+1) / (n^n * prod(x_i))
Here x_i are the coin balances, D is the invariant value that equals the total balance when all coins are equal, and A is the amplification coefficient. A is the key dial. A higher A flattens the curve and pushes it toward constant-sum behavior, lowering slippage near balance. A lower A keeps it closer to constant-product behavior, which is safer if the assets might diverge.
When the pool is balanced, the design behaves like a constant-sum curve and slippage is tiny. As one asset's balance grows relative to the others, the amplification effect fades and the curve transitions toward constant-product pricing. That transition is automatic and built into the math.
A helpful way to picture A is as virtual leverage on the flat region. A high A concentrates the pool's effective depth into a narrow band around the 1:1 point, so the same capital quotes much deeper liquidity for balanced trades than a constant-product pool would. The cost of that concentration is exactly what it sounds like: outside the band, the pool has thinner protection, so a real divergence is absorbed quickly and painfully. The standard also supports pools of more than two assets, where the same invariant applies across three or more like-valued coins, which is common for baskets of dollar stablecoins.
Worked Example
Compare two pools, each holding 1,000,000 of stablecoin A and 1,000,000 of stablecoin B, both worth one dollar.
In a constant-product pool, buying 100,000 of A pushes the price noticeably because the curve bends, so you might receive meaningfully fewer than 100,000 of B. The slippage is the cost of the curve's shape.
In a StableSwap pool with a high amplification coefficient, the same 100,000 trade happens along the flat part of the curve, so you receive very close to 100,000 of B. The difference is small fractions of a percent. That low slippage is exactly why like-valued assets concentrate in StableSwap pools. The catch appears if stablecoin B loses its peg and falls to 90 cents. Then the pool fills up with the weak asset as arbitrageurs dump it, liquidity providers end up holding mostly the depegged coin, and the flat curve no longer protects anyone.
Common Mistakes
-
Assuming low slippage means low risk. StableSwap reduces slippage for balanced pools, not the risk that an asset depegs. A broken peg can hand liquidity providers a pool full of the worst asset.
-
Misreading the amplification coefficient. A high
Ais great while the peg holds and punishing if it breaks, because the flat curve absorbs the bad asset quickly. The rightAdepends on how confident you are in the peg. -
Using StableSwap for volatile pairs. The design assumes assets trade near a fixed ratio. Put two unrelated volatile tokens in such a pool and the flat region works against you.
-
Ignoring pool composition. A pool that has already drifted to mostly one asset is signaling stress. Depositing into an unbalanced stable pool can mean buying into a slow depeg.
-
Forgetting fees and rewards differ by pool. Returns come from swap fees plus any incentive tokens. Comparing only the headline yield without checking the fee tier and incentives gives a false picture.
Frequently Asked Questions
What is a StableSwap Curve AMM in simple terms? A StableSwap Curve AMM is an automated market maker built for assets that should trade near the same value, like two stablecoins. It uses a nearly flat pricing curve so swaps between them have very little slippage.
How does a StableSwap AMM affect investment decisions? For trading like-valued assets, a StableSwap pool gives far better rates than a constant-product pool, so it is the cheaper venue when pegs hold. For providing liquidity, the depeg risk means you should weigh the yield against the chance an asset breaks its peg.
What is a real-world example of a StableSwap AMM? A pool holding several dollar-pegged stablecoins that lets users swap between them at near 1:1 is the standard example. The flat curve keeps large stablecoin swaps cheap.
How can investors use StableSwap pools effectively? Check that the pool is balanced and that you trust each asset's peg before depositing, and favor pools with a sensible amplification coefficient for the assets involved. Avoid pools already skewed toward one asset.
How is StableSwap different from a constant-product AMM? A constant-product AMM bends its curve everywhere, charging slippage even on stable pairs. StableSwap flattens the curve near a 1:1 ratio for low slippage, then transitions back to constant-product behavior if the assets diverge.
Sources
- Egorov, M. (2019). "StableSwap: Efficient Mechanism for Stablecoin Liquidity." Curve whitepaper, via Curve Technical Docs. https://docs.curve.finance/references/whitepaper/
- Curve Technical Docs. "Understanding Curve Pools." https://resources.curve.finance/lp/understanding-curve-pools/
- Uniswap V3 Development Book. "Constant Function Market Maker." https://uniswapv3book.com/milestone_0/constant-function-market-maker.html
- Ethereum.org. "Decentralized Finance (DeFi)." https://ethereum.org/en/defi/
Disclaimer
This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.