LibraryMarkets2019Design paperCorpus record
StableSwap — efficient mechanism for Stablecoin liquidity
Curve. Michael Egorov.
Egorov's 2019 invariant for pools of assets that should trade near parity. The curve is flat around the peg, where most stablecoin trades happen, and bends toward a constant-product tail when the pool is pushed off parity.
StableSwap shapes the curve so that similarly priced assets trade near one-to-one with low slippage, and the pool steepens into a normal product curve if the price runs away.
The five-minute read
Constant product is wasteful for stablecoins
A dollar-for-dollar pair does not need liquidity at a price of ten. The paper concentrates the curve around one.
The amplification parameter is the shape
A higher A makes the pool flatter near the peg and more violent away from it. A is the product decision. It is not a minor constant.
The invariant blends two curves
Near equality, the pool behaves like a constant sum, which has no slippage and no rebalancing force. Far away, it behaves like a constant product, so it cannot be drained of one asset for nothing.
The peg is an assumption the pool does not create
The mathematics serves assets that ought to be worth the same. If one of them breaks, the pool will sell the good asset for the bad one all the way along that flat region.
Liquidity providers are betting on the peg
They earn fees from tight spreads and they warehouse the asset that loses the peg. The paper's efficiency and this warehouse risk are the same design.
One action, walked through
- Providers deposit the stable assets in whatever shares the pool allows and receive pool tokens.
- A trader swapping one dollar token for another moves along the flat part of the curve and pays a small fee, while A is large and balances are close.
- If one asset's external price falls and traders keep selling it into the pool, balances tilt.
- As the tilt grows, the invariant steepens. Further sales move the internal price more, which is the pool's way of stopping a complete drain.
- Providers who withdraw during the tilt receive more of the impaired asset. The fee income is what they hoped would pay for that.
The argument, unpacked
Flat means generous, which means exposed
The reason a stable swap is cheap is that the pool does not defend a price of one with slippage. Defence has been turned down on purpose. Anyone citing the tight spread should cite the depeg loss in the same sentence.
A is a governance surface
Raising A makes trading nicer and makes a depeg more expensive for providers. Who may change A, and how fast, is part of the risk. The paper introduces the parameter. Deployments decide who turns the dial.
The pool is not an oracle of the peg
A flat internal price says the pool is balanced, or that A is high, not that each token can be redeemed for a dollar in a bank. External redemption is outside the invariant.
What has to be true
- The assets are meant to track the same value most of the time. The curve is a bad fit for uncorrelated coins.
- Arbitrage against a redemption market exists. Without it the internal price is only a ratio of inventory.
- A is set by someone whose incentives a provider understands.
- Tokens do not rebase or charge hidden transfer fees that desynchronise the balances.
What happened after the paper
Curve deployed StableSwap for dollar stablecoins and later generalised it. Several depegs showed the warehouse risk in public, including events where the pool became a large holder of the impaired asset. The paper's math did what it said. The losses came from the peg assumption failing, which the design does not prevent.
What to check before you use the idea
- What is A, and who can change it?
- Is there a redemption market outside the pool for each asset?
- What does a provider hold if one asset gaps down by 20 percent?
- Is the internal price being used as proof that a token is worth a dollar?
Terms
- Amplification
- The parameter A. Higher means a flatter curve near equal balances.
- Stable invariant
- A blend of constant-sum and constant-product so pegged assets trade tightly until they diverge.
- Depeg
- One asset leaving the shared price. The pool then accumulates it, because that is where the flat curve is generous.
- Warehouse risk
- The provider's exposure to ending up holding more of the asset that failed.
The problem the paper names
A constant-product pool of two stablecoins quotes a meaningful spread even when both claim to be worth the same unit. That spread is a tax on the common case. A constant-sum pool quotes no spread and then goes bankrupt in inventory the moment the peg slips.
What the design proposes
- An amplification parameter blends a constant-sum region with a constant-product tail.
- The pool is for assets that share a unit of account, not for unrelated volatile pairs.
- The invariant is explicit. Changing the amplification changes the risk, and the paper treats it as a parameter with consequences.
How the mechanism is specified
- Near parity, a trader moves along a nearly flat price. Liquidity is concentrated where those traders are.
- Far from parity, the curve steepens so the pool does not sell the last of the stronger asset at the peg price.
- Later Curve gauges, voting and factory pools are not this note.
What this page does not treat as proven
- The math assumes the assets ought to be near parity. If that assumption is false, the flat region is a source of loss, not efficiency.
- Amplification is a risk setting. Higher is not 'better'.
- The paper is not a claim about any stablecoin's reserves.
Why a venture studio still reads it
This is the first document we ask for when a venture designs a pool of assets 'that should be worth the same'. If they cannot say what happens when the assets stop being worth the same, they have not finished the design.
This is Blockchain Lab's reading of a public design paper. It is not the paper, not a copy of it, and not an offer of tokens, equity, custody or a partnership. Later network behaviour can diverge from the text. Nothing here is investment, legal or technical advice.
Research status: Design paper. Last reviewed: 1 October 2026. This is a reading of a public paper, not investment, legal or security advice.
