Stable pools: Curve StableSwap, Curve v2, and Orbital
1. TL;DR
Section titled “1. TL;DR”Assets that should trade at a fixed ratio—USDC/USDT, ETH/stETH—waste almost all of a constant-product pool’s capital, so Curve’s StableSwap invariant adds a constant-sum term scaled by an amplification coefficient that flattens the curve near balance and reverts to constant product as the pool becomes lopsided. The result is slippage “typically 100 times smaller” than Uniswap (Egorov, 2019), at the cost that a depegging coin is absorbed into the pool. Curve v2 extends the idea to volatile pairs with an internal oracle that re-pegs the curve’s centre, and Paradigm’s Orbital (2025) generalises Uniswap v3-style ticks to pools of three or ten thousand stablecoins.
2. Explain it simply
Section titled “2. Explain it simply”Analogy
Section titled “Analogy”A bureau de change between euros and “euro coupons” that are supposed to be worth exactly one euro each. A plain swap booth charges more for every extra coupon you buy, even though everyone agrees they are worth a euro. A stable booth instead promises to trade one-for-one as long as its drawers stay roughly balanced, and only starts adjusting the rate when it is nearly out of one side. The amplification setting is how far the drawers can drift before the rate worsens. If coupons stop being worth a euro, the booth keeps buying them near par until its drawer is full of coupons—the price of its generosity.
Some coins are supposed to be worth the same as each other, like two kinds of dollar. An ordinary swap box makes every extra coin cost more, which is silly when the coins are meant to be equal. A stable swap box is tuned to trade one-for-one while it still holds a fair amount of both coins, and only gets stingy when it is close to running out of one. A knob sets how flat the box is. If one coin suddenly stops being worth a dollar, traders dump it into the box at almost a dollar each, so the people who filled the box end up holding mostly the bad coin.
Step-by-step walkthrough
Section titled “Step-by-step walkthrough”Scenario: a two-coin USDC/USDT pool holding 1,000,000 of each with amplification , no fee. A trader sells 100,000 USDC.
- Before: reserves (1,000,000 USDC, 1,000,000 USDT); the invariant’s (the total coins at equal prices); spot price 1.0000.
- Trader deposits 100,000 USDC: USDC reserve becomes 1,100,000. The contract solves the StableSwap equation for the USDT reserve that keeps fixed, by Newton iteration.
- After: , so the trader receives 99,949.78 USDT, an average price of 0.99950. A constant-product pool with the same reserves would have paid 90,909.09 (average 0.9091).
- Bigger order: selling 500,000 USDC returns 498,355 USDT (average 0.99671) versus 333,333 from constant product; the pool is now 1,500,000 / 501,645 and its curve is visibly bending toward constant product.
- Depeg case: if USDC really were worth 0.90 elsewhere, arbitrageurs would keep selling USDC to the pool at near 1.00 until the marginal price fell to 0.90—LPs end up long the depegged coin, which is exactly what happened to Curve’s 3pool in March 2023 (§6).
Common misconceptions
Section titled “Common misconceptions”- Myth: a stable pool pegs the price at 1. Reality: it only concentrates liquidity around 1; “at any price, this invariant, just like a constant-product one, would provide some liquidity” (Egorov 2019), so the price can and does move when a coin depegs.
- Myth: higher is always better. Reality: higher means less slippage near balance but a larger position in whichever coin is losing its peg before the curve resists; Egorov’s optimum in simulation was (as of 2019-11) and the parameter is chosen per pool.
- Myth: StableSwap is a different kind of AMM from Uniswap. Reality: with constant amplification it is “exactly equivalent to a single Uniswap v3 position” between two prices (Robinson 2021); it is a particular liquidity shape, not a new mechanism.
- Myth: Curve v2 is StableSwap for volatile assets. Reality: v2 moves the curve’s centre with an internal price oracle and repegs only when doing so does not give up more than half of accumulated profit; the invariant is different and the pool actively rebalances.
If you only remember one thing
Section titled “If you only remember one thing”StableSwap is constant product with a tunable dose of constant sum: the amplification coefficient buys near-zero slippage around the peg by agreeing to absorb whichever coin breaks it.
3. How it works
Section titled “3. How it works”From constant sum to StableSwap
Section titled “From constant sum to StableSwap”For coins with reserves and the total number of coins when all are equally priced (Egorov 2019):
Constant sum has zero slippage (price always exactly 1) but runs out of a coin; constant product never runs out but has “enormous” slippage for pegged assets. Egorov multiplies the constant-sum invariant by a leverage and adds the product invariant:
which is constant product when and constant sum when . To keep liquidity at every price, is made dynamic—equal to a constant at perfect balance and falling to zero as the pool becomes imbalanced:
Substituting gives the StableSwap invariant:
is the amplification coefficient: “the lower it is, the closer the invariant is to the constant product”; is “somewhat comparable to using Uniswap with 100x leverage.” The price of coin in coin is along the invariant; near balance it is close to 1 and it degrades as reserves drift. There is no closed form for given reserves, or for the output given the other reserves, so both are found by Newton iteration on-chain in integer arithmetic (the original implementation is in Vyper). Curve offers it as plain pools (2+ tokens) and metapools (a token paired against another pool’s LP token).
Reading A as a liquidity shape
Section titled “Reading A as a liquidity shape”Robinson (2021) shows that a StableSwap curve with constant has a flat liquidity fingerprint between two prices and is therefore a single Uniswap v3 position with bounds that depend on ; Curve’s dynamic produces a bell-shaped fingerprint with no closed form. trades width for depth exactly as a v3 range does (see concentrated liquidity).
Egorov’s simulation parameters
Section titled “Egorov’s simulation parameters”Simulating DAI/USDC/USDT on exchange price feeds over May–October 2019 with $30,000 of liquidity, the whitepaper reports optimal , optimal fee 0.06% and 312% APR for LPs assuming traders arbitrage every price change (as of 2019-11)—simulation outputs on a tiny pool, not live returns.
StableSwap-NG and rate oracles
Section titled “StableSwap-NG and rate oracles”Curve’s next-generation implementation supports up to eight tokens per plain pool and two per metapool, handles rate-oracle tokens (wstETH), ERC-4626 vaults (sDAI) and rebasing tokens (stETH) by scaling balances so the invariant sees “underlying” amounts, requires WETH rather than native ETH, and ships built-in moving-average oracles (Curve docs, accessed 2026-08).
Curve v2 (CryptoSwap) in brief
Section titled “Curve v2 (CryptoSwap) in brief”For volatile pairs Curve (Egorov, 2021) keeps a StableSwap-like invariant but concentrates liquidity around a movable price scale rather than 1. The invariant uses a coefficient with in place of the constant , so that the curve is StableSwap-flat only in a neighbourhood whose width sets, and constant-product elsewhere; an exponential moving-average oracle of traded prices tracks the market, and the pool “repegs” its price scale toward the oracle only when the resulting loss in pool value stays below half of the profit it has accumulated (tracked as xcp_profit). Fees rise from mid_fee at balance to out_fee as the pool becomes imbalanced (Curve technical docs, accessed 2026-08). Curve v2 is thus a self-rebalancing concentrated pool (see IL vs LVR).
Orbital: ticks on a sphere
Section titled “Orbital: ticks on a sphere”Robinson, Moallemi and White (Paradigm, 2025-06) start from a sphere AMM for stablecoins,
whose reserves range from 0 to in each coin and whose marginal price of coin in coin is —equal to 1 at the equal price point . A tick is the cap of the sphere within a fixed distance of that point, cut by a plane orthogonal to the diagonal; ticks are nested, “interior” while reserves sit inside and “boundary” once prices diverge enough to pin reserves to the edge. Because a tick never pays out reserves for extreme depegs, its LP gets virtual reserves and v3-style capital efficiency: in a five-asset pool a tick sized for a depeg to $0.90 gives about 15× and one sized to $0.99 about 150× (as of 2025-06). Interior ticks consolidate into one sphere and boundary ticks into one lower-dimensional sphere; combined they form a torus, a single global trade invariant that is a quartic solved by Newton’s method in constant time in by tracking and , with trades segmented whenever a tick crosses between states. Unlike Curve’s uniform curve, LPs choose their own tick size, and “even if one stablecoin depegs to 0, an Orbital tick can still trade the others at fair prices.” Orbital was a design, not a deployment (as of 2025-06).
4. Worked numeric example
Section titled “4. Worked numeric example”Two-coin pool, 1,000,000 USDC and 1,000,000 USDT, , no fee. With the invariant is ; fix after the trade and solve for by Newton’s method (the contract does the same in integers).
| Sell | constant product | ||||
|---|---|---|---|---|---|
| 100,000 USDC → USDT | 96,760.7 (0.9676) | 99,521.8 (0.9952) | 99,949.8 (0.9995) | 99,994.9 (0.99995) | 90,909.1 (0.9091) |
| 500,000 USDC → USDT | 422,649.7 (0.8453) | 485,244.4 (0.9705) | 498,355.2 (0.9967) | 499,833.6 (0.9997) | 333,333.3 (0.6667) |
At a trade equal to 10% of one reserve costs 5 basis points of slippage instead of 9.1%, and even half the reserve costs only 0.33%; lower approaches constant product, higher approaches one-for-one. The cost appears in the depeg case: after the 500,000 trade at the pool holds 1,500,000 USDC against 501,645 USDT with a marginal price still near 1, so if USDC keeps falling elsewhere arbitrageurs keep feeding it in. A fee of a few basis points (Egorov’s optimum was 0.06%) barely changes the outputs but is the LP’s entire compensation.
5. Where it’s used
Section titled “5. Where it’s used”Ethereum
Section titled “Ethereum”- Curve StableSwap pools — the 3pool (DAI/USDC/USDT) held over $510M when its balance broke in March 2023 (The Block, secondary, as of 2023-06); plain pools, metapools and StableSwap-NG with up to eight tokens and rate oracles. Curve docs
- Uniswap v3 stable pairs — narrow positions on low-fee tiers are v3’s answer to StableSwap; Paradigm measured ~5.5× more USDC/USDT depth on v3 than Binance (as of 2022-03). See concentrated liquidity.
Solana
Section titled “Solana”- Saber — “designed for extremely efficient trading between similarly priced (pegged) assets”: USD stablecoins, bridged assets and staking derivatives such as Marinade SOL (Saber docs, accessed 2026-08). docs
- Meteora DAMM v1 stable pools — “designed for token pairs that are expected to trade close to a known relationship,” with an amplification factor
AMP(“higher AMP means tighter pricing and lower slippage near the target”) and permissioned SOL/LST pools that use virtual-price accounting (Meteora docs, accessed 2026-08). docs - Orca Whirlpools and Raydium CLMM — stable pairs use the lowest fee tier and tightest tick spacing (Raydium: 0.01% with tick spacing 1; Orca: tiers from 0.01%), i.e. the v3-style answer. Raydium docs
- Jupiter — routes stable-to-stable swaps across these venues and its RFQ market makers, and lists its own BUIDL-backed stablecoin JupUSD (as of 2026-08 docs). docs
6. Risks, attacks, and incidents
Section titled “6. Risks, attacks, and incidents”- Curve pool reentrancy, 2023-07-30, ≈$62M. Vyper compiler versions 0.2.15, 0.2.16 and 0.3.0 broke the
@nonreentrantlock (storage slots were allocated per decorator, ignoring the key), so pools sending native ETH viaraw_callcould be re-entered duringadd_liquidity/remove_liquidity. Drained: pETH/ETH (6,106.65 WETH,$11M), msETH/ETH ($3.4M), alETH/ETH ($22.6M) and CRV/ETH ($24.7M); LlamaRisk totals ~$61.7M, other trackers $52M–$69M; a whitehat returned 2,879.65 ETH. The eDAO could freeze gauges but not pause pools (Vyper and LlamaRisk post-mortems). The invariant was never at fault; the compiler was. - Depeg absorption, March 2023. During the Silicon Valley Bank weekend, traders sold USDC and USDC-backed DAI into the 3pool until USDT’s share fell “to less than 7% while USDC and DAI had ballooned to over 46% apiece” (The Block, secondary); LPs were left long the two coins under stress. In June 2023 the reverse happened with USDT rising above 70% of the pool.
- Governance of A. Ramping changes every LP’s exposure; a high on a doubtful peg is a standing offer to buy the doubtful coin near par.
- Metapool contagion. A base-pool problem propagates to every metapool built on it; the 2023 exploit did not hit 3pool, which bounded the damage.
7. Open problems
Section titled “7. Open problems”- Choosing and changing . Egorov’s 2019 simulation gave for a three-stablecoin pool; there is no principled rule that ties to depeg probability, and Orbital’s tick-size parameter is the first attempt to let each LP pick their own answer (Paradigm, 2025-06).
- Many stablecoins, one pool. Orbital’s premise is that “the future holds a million stablecoins”; whether one -dimensional pool beats a graph of two-coin pools with routing (see routing and aggregation) depends on how correlated depegs are.
8. Ethereum vs Solana
Section titled “8. Ethereum vs Solana”| Aspect | Ethereum | Solana |
|---|---|---|
| Canonical stable AMM | Curve StableSwap (2020), StableSwap-NG, Curve v2 | Saber (Curve-style), Meteora DAMM v1 stable pools, CLMM 0.01% tiers |
| Invariant | same family (Saber, Meteora AMP) plus tick-based stable pairs | |
| Multi-asset pools | up to 8 tokens (StableSwap-NG); Orbital proposed for | mostly two-coin pools; multi-token largely via routing |
| Yield-bearing pegs | wstETH/sDAI/stETH via rate oracles | SOL/LST pools with virtual-price accounting (Meteora) |
| Largest incident | Vyper reentrancy 2023-07-30, ~$62M | none in the sources reviewed |
The mathematics is chain-agnostic; Solana’s stable venues are ports of Curve’s idea (Saber) or Uniswap v3’s (Orca, Raydium). What differs is scale and integration: Ethereum’s Curve pools are systemic infrastructure where stablecoin pegs are actually tested, with metapools stacking on a shared base pool, whereas Solana’s stable liquidity is spread across protocols and reached through Jupiter routing. Newton-iteration invariants also cost real gas per swap on Ethereum, which is one reason designs like Orbital are pitched as constant-time in .
9. Reference doc
Section titled “9. Reference doc”The reference
Section titled “The reference”StableSwap – efficient mechanism for Stablecoin liquidity — Michael Egorov, 2019-11-10. https://berkeley-defi.github.io/assets/material/StableSwap.pdf (also linked from Curve’s developer docs)
Summary of the reference
Section titled “Summary of the reference”The six-page whitepaper describes itself as “a brief version which doesn’t show all the details.” Abstract and Introduction pitch StableSwap as “Uniswap with leverage”: stablecoins (USDC, USDT, BUSD, PAX, TrueUSD, DAI) lacked liquidity, converting DAI to USDC was expensive for arbitrage between MakerDAO and Compound rates, and yield-seeking holders wanted a “fiat savings account.” The claims: slippage “typically 100 times smaller” than Uniswap and, by simulation, up to 300% APR for LPs from arbitrage flow. How it works introduces the linear invariant (price always 1, fails in a fluctuating market), the Uniswap invariant and Balancer’s , and notes that constant product is unsuitable for pegged assets because slippage is “enormous” and returns “tiny.” Figure 1 plots the three invariants for ; Figure 2 shows price slippage for Uniswap versus StableSwap at . Constructing the StableSwap invariant derives the formula: generalise constant sum () and constant product () with “the total amount of coins when they have an equal price”; introduce leverage (constant product is zero leverage, constant sum infinite); combine as ; make dynamic, , so it equals at balance and vanishes when imbalanced; substitute to obtain , solved iteratively for on deposit and for on trade. Simulations and performance report the optimisation on DAI/USDC/USDT with exchange price feeds over six months of 2019 and $30,000 of liquidity: optimal , optimal fee 0.06%, LP profit 312% APR. Implementation notes a Vyper contract solving the equations in integer arithmetic and a client-side JavaScript UI (Figure 3). Other applications anticipates interest-bearing tokens (cDAI) and tokenised stake.
Key quotes
Section titled “Key quotes”- “StableSwap provides a mechanism to create cross-markets for stablecoins in a way which could be called ‘Uniswap with leverage’.” (Abstract)
- “The StableSwap invariant has an ‘amplification coefficient’ parameter: the lower it is, the closer the invariant is to the constant product.” (How it works)
- “A ‘zero slippage’ invariant would correspond to infinite leverage. However, the zero-slippage invariant is a constant-price, or constant-sum one!” (Constructing the StableSwap invariant)
- “At any price, this invariant, just like a constant-product one, would provide some liquidity (unlike the constant-sum invariant).” (How it works)
- “When a portfolio of coins {x_i} is loaded up, we need to calculate D, and we need to hold this equation true when we perform trades” (Constructing the StableSwap invariant)
How to read the original
Section titled “How to read the original”Background: the constant-product formula and why price is the slope of the reserve curve (see CFMM math). Read “How it works” and the construction section; they are the whole paper. Skip the simulation numbers on a first pass—they are 2019 backtests on $30k. The hardest step is the substitution of (D/n)^n/\prod x_i\prod x_i = (D/n)^n\chi = A\text{\textdollar} there. Then convince yourself that as any , and the equation collapses to constant product, which is why the pool can never be emptied.
What changed since
Section titled “What changed since”- 2020-01: Curve launches on Ethereum with the Vyper implementation; metapools and gauges follow.
- 2021-06: Robinson shows constant- StableSwap is one Uniswap v3 position.
- 2021: Curve v2 (CryptoSwap) generalises to volatile pairs with an internal oracle and repegging.
- 2023-03 and 2023-06: 3pool imbalances during the USDC and USDT scares show the depeg-absorption property live.
- 2023-07-30: Vyper reentrancy exploit drains ~$62M from four Curve pools; StableSwap-NG later rewrites the pools with rate oracles and built-in MA oracles.
- 2025-06: Paradigm’s Orbital proposes nested spherical ticks for -stablecoin concentrated liquidity.
- On Solana, Saber ported the design; Meteora’s stable pools and CLMM 0.01% tiers now share the role.
The reference
Section titled “The reference”Orbital — Dan Robinson, Ciamac Moallemi, Dave White (Paradigm), 2025-06-02. https://www.paradigm.xyz/writing/orbital
Summary of the reference
Section titled “Summary of the reference”Orbital is “an automated market maker for pools of 2, 3, or 10,000 stablecoins” that brings concentrated liquidity to higher dimensions. Overview contrasts Uniswap v3 (ticks, but two assets) with Curve ( stables, but one uniform curve for all LPs), then shows the idea visually: a 3D sphere of reserves, ticks as circles around the equal-price point, and a toroidal consolidated surface. Mechanism defines the sphere AMM , derives prices from its gradient, locates the equal price point at , and decomposes any reserve vector into components parallel and orthogonal to the diagonal (polar decomposition), so that fixing the parallel component leaves a lower-dimensional sphere. A tick is defined by a plane constant bounding that parallel component; the minimal tick is the equal-price point and the maximal tick is where one reserve hits zero. Tick reserve bounds derive minimum reserves via a quadratic, which become virtual reserves the LP need not deposit, and interpret as a maximum single-coin depeg price. Capital efficiency plots the gain against depeg limit (≈15× at $0.90 and ≈150× at $0.99 for ). Tick consolidation shows interior ticks add like spheres and boundary ticks like lower-dimensional spheres, giving the global trade invariant—a torus—computable in constant time from running sums; trades solve a quartic by Newton’s method. Crossing ticks normalises positions by tick radius, detects when the consolidated interior point crosses a boundary, and segments the trade there. The conclusion states Orbital “is just a design.”
Key quotes
Section titled “Key quotes”- “The future holds a million stablecoins. Today’s infrastructure isn’t ready.” (Introduction)
- “Orbital extends customizable concentrated liquidity to pools of three or more stables by drawing tick boundaries as orbits around the $1 equal price point.” (Overview)
- “Unlike in 2D concentrated liquidity, even if one stablecoin depegs to 0, an Orbital tick can still trade the others at fair prices.” (Overview)
- “in the 5-asset case, a depeg limit of $0.90 corresponds to around a 15x capital efficiency increase, while a limit of $0.99 corresponds to around a 150x capital efficiency increase.” (Capital Efficiency)
How to read the original
Section titled “How to read the original”Background: vector projections, the equation of a sphere, and Uniswap v3’s virtual reserves. Read Overview and Intuition, then Mechanism through Capital Efficiency; skip Global Trade Invariant and Crossing Ticks on a first pass (the authors themselves call it “extremely dense”). The hardest idea is why interior ticks consolidate: two spheres with the same price gradient must have parallel reserve vectors, so their reserves add and the sum is a larger sphere—no-arbitrage does the geometry for you.
What changed since
Section titled “What changed since”Nothing in the sources reviewed reports a deployment (as of 2026-08); Curve StableSwap-NG (up to eight tokens) remains the production multi-stable pool.
Secondary references
Section titled “Secondary references”- Dan Robinson, Uniswap v3: The Universal AMM (2021-06) — read if you want StableSwap as a v3 position.
- Curve, StableSwap Exchange: Overview and StableSwap-NG docs — read if you integrate with plain pools, metapools or rate-oracle tokens.
- Curve technical docs, CryptoSwap / twocrypto-ng overview — read if you need v2’s invariant, oracle and repeg parameters.
- LlamaRisk, Curve Pool Reentrancy Exploit Postmortem (2023-07) — read if you want the incident accounting.
- Meteora, DAMM v1 stable pools docs — read if you build stable pools on Solana.
10. Sources
Section titled “10. Sources”- StableSwap – efficient mechanism for Stablecoin liquidity — Michael Egorov — 2019-11-10 — https://berkeley-defi.github.io/assets/material/StableSwap.pdf
- Orbital — Dan Robinson, Ciamac Moallemi, Dave White (Paradigm) — 2025-06-02 — https://www.paradigm.xyz/writing/orbital
- Curve StableSwap Exchange: Overview — Curve docs — accessed 2026-08-29 — https://docs.curve.finance/developer/amm/legacy/stableswap-overview
- Twocrypto-NG pools overview (Curve v2) — Curve technical docs — accessed 2026-08-29 — https://docs.curve.finance/cryptoswap-exchange/twocrypto-ng/pools/overview/
- Uniswap v3: The Universal AMM — Dan Robinson (Paradigm) — 2021-06-07 — https://www.paradigm.xyz/writing/uniswap-v3-the-universal-amm
- Introducing Uniswap v3 — Uniswap Labs — 2021-03-23 — https://blog.uniswap.org/uniswap-v3
- The Dominance of Uniswap v3 Liquidity — Liao, Robinson (Paradigm) — 2022-05-05 — https://www.paradigm.xyz/writing/the-dominance-of-uniswap-v3-liquidity
- Vyper Nonreentrancy Lock Vulnerability Technical Post-Mortem Report — Vyper — 2023-08 — https://hackmd.io/@vyperlang/HJUgNMhs2
- Curve Pool Reentrancy Exploit Postmortem July 30th, 2023 — LlamaRisk — 2023-08 — https://llamarisk.com/research/curve-pool-reentrancy-exploit-postmortem
- Tether wobbles as Curve 3Pool becomes imbalanced — The Block (secondary) — 2023-06 — https://www.theblock.co/post/234822/tether-depeg-curve-3pool
- Saber documentation — Saber — accessed 2026-08-29 — https://docs.saber.so/
- DAMM v1 stable pools — Meteora docs — accessed 2026-08-29 — https://docs.meteora.ag/legacy-products/damm-v1/stable-pools.md
- CLMM fees — Raydium docs — accessed 2026-08-29 — https://docs.raydium.io/products/clmm/fees
- Orca Documentation — Orca — accessed 2026-08-29 — https://docs.orca.so/
- Jupiter User Docs — Jupiter — accessed 2026-08-29 — https://docs.jup.ag/
- Solana’s Proprietary AMM Revolution — Helius — 2025-08 — https://www.helius.dev/blog/solanas-proprietary-amm-revolution