Jump to content
Chain Times

Markets, protocols, policy and people

Stableswap pools: Why balance changes the price

What is a stableswap pool in DeFi? It keeps trades near 1:1 for balanced pegged assets, then raises price impact as the pool becomes imbalanced.

The Chain Times Desk3 min read

Stableswap pools: Why balance changes the price

A stableswap pool prices swaps between pegged assets, such as USDC and USDT, close to 1:1 when the pool is balanced. It does this with an invariant that blends constant-sum and constant-product pricing, so trades have low price impact near the peg but can become costly as the pool gets imbalanced.

That difference matters when comparing pools or reading an aggregator quote. KyberSwap Aggregator can route a USDC-USDT trade through stableswap pools when they offer better output. For a related comparison, kyberswap vs 1inch looks at how KyberSwap and 1inch differ as swap aggregators.

How does StableSwap pricing differ from a regular AMM?

A constant-product AMM follows the invariant x*y=k, where x and y are the quantities of two assets in the pool. Each trade changes their ratio along a curve, so a larger trade moves the price further. This works for assets with floating prices, but can create more price impact than needed for tokens expected to stay near the same value.

Curve’s StableSwap whitepaper, published by Egorov in 2019, defines an invariant that combines constant-sum and constant-product behavior. Constant-sum pricing keeps the exchange rate near 1:1; constant-product pricing limits how far the pool can be pushed toward having none of one asset. The blend aims to keep prices close to 1:1 around balance while still responding to large imbalances.

The amplification coefficient, usually written as A, controls how flat the curve is near balance. A higher A makes the pool behave more like a constant-sum pool in that region. For a balanced pool of pegged assets, this can mean a large swap has less price impact than the same swap would face in a constant-product pool.

That low impact depends on the pool’s state. When one asset loses its peg, traders may sell the weaker coin into the pool and take out the stronger one. The pool then holds more of the weaker asset, moving it away from balance. As the imbalance grows, the curve behaves more like constant-product pricing and quotes become steeper. A rate that looked close to 1:1 for a small trade may therefore be poor for a large trade or a depegged pair.

For routing, the useful distinction is between a pool’s design and its current quote. A stableswap curve suits pegged pairs near balance; it does not guarantee a good rate at every trade size or during a depeg. An aggregator compares available routes and their expected output, so it can use a stableswap pool when that pool’s current pricing suits the swap.

Related questions

These related questions cover the pool’s pricing control and what imbalance can mean for liquidity providers.

What does the amplification coefficient A do?

The amplification coefficient A sets how flat the StableSwap curve is near balance. Higher A makes the pool act more like constant-sum pricing around the peg, while the curve still steepens as the pool becomes imbalanced.

Do stableswap LPs face impermanent loss?

Yes. If the assets’ relative prices diverge, the pool can end up holding more of the weaker asset than an LP would hold by keeping the original token mix. A depeg can drive that shift, so the same imbalance that raises swap impact can also matter to LP returns.

More stories

  1. 01DeFi transaction reversals and on-chain finality
  2. 02How to Back Up a Seed Phrase Before Your First Withdrawal
  3. 03How ERC-4626 vault share price grows over time: Interest and fees
  4. 04Base’s Challenge Period Explains Why Withdrawals Wait