Skip to content

Stable pools: Curve StableSwap, Curve v2, and Orbital

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 AA 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.

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.

Scenario: a two-coin USDC/USDT pool holding 1,000,000 of each with amplification A=100A = 100, no fee. A trader sells 100,000 USDC.

  1. Before: reserves (1,000,000 USDC, 1,000,000 USDT); the invariant’s D=2,000,000D = 2{,}000{,}000 (the total coins at equal prices); spot price 1.0000.
  2. Trader deposits 100,000 USDC: USDC reserve becomes 1,100,000. The contract solves the StableSwap equation for the USDT reserve yy that keeps DD fixed, by Newton iteration.
  3. After: y=900,050.22y = 900{,}050.22, 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).
  4. 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.
  5. 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).
  • 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 AA is always better. Reality: higher AA 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 A=85A = 85 (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.

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.

For nn coins with reserves xix_i and DD the total number of coins when all are equally priced (Egorov 2019):

constant sum: ixi=D,constant product: ixi=(Dn)n.\text{constant sum: } \sum_i x_i = D, \qquad \text{constant product: } \prod_i x_i = \Big(\frac{D}{n}\Big)^n.

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 χDn1\chi D^{n-1} and adds the product invariant:

χDn1ixi+ixi=χDn+(Dn)n,\chi D^{n-1}\sum_i x_i + \prod_i x_i = \chi D^n + \Big(\frac{D}{n}\Big)^n,

which is constant product when χ=0\chi = 0 and constant sum when χ\chi \to \infty. To keep liquidity at every price, χ\chi is made dynamic—equal to a constant AA at perfect balance and falling to zero as the pool becomes imbalanced:

χ=Aixi(D/n)n.\chi = \frac{A \prod_i x_i}{(D/n)^n}.

Substituting gives the StableSwap invariant:

Annixi+D=ADnn+Dn+1nnixi.A n^n \sum_i x_i + D = A D n^n + \frac{D^{n+1}}{n^n \prod_i x_i}.

AA is the amplification coefficient: “the lower it is, the closer the invariant is to the constant product”; A=100A = 100 is “somewhat comparable to using Uniswap with 100x leverage.” The price of coin jj in coin ii is dxi/dxj-dx_i/dx_j along the invariant; near balance it is close to 1 and it degrades as reserves drift. There is no closed form for DD given reserves, or for the output xjx_j 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).

Robinson (2021) shows that a StableSwap curve with constant χ\chi has a flat liquidity fingerprint between two prices and is therefore a single Uniswap v3 position with bounds that depend on χ\chi; Curve’s dynamic χ\chi produces a bell-shaped fingerprint with no closed form. AA trades width for depth exactly as a v3 range does (see concentrated liquidity).

Simulating DAI/USDC/USDT on exchange price feeds over May–October 2019 with $30,000 of liquidity, the whitepaper reports optimal A=85A = 85, 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.

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).

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 K=AK0γ2/(γ+1K0)2K = A K_0 \gamma^2 / (\gamma + 1 - K_0)^2 with K0=xinn/DnK_0 = \prod x_i\, n^n / D^n in place of the constant AA, so that the curve is StableSwap-flat only in a neighbourhood whose width γ\gamma 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).

Robinson, Moallemi and White (Paradigm, 2025-06) start from a sphere AMM for nn stablecoins,

i=1n(rxi)2=r2,\sum_{i=1}^{n} (r - x_i)^2 = r^2,

whose reserves range from 0 to rr in each coin and whose marginal price of coin ii in coin jj is (rxi)/(rxj)(r - x_i)/(r - x_j)—equal to 1 at the equal price point xi=r(11/n)x_i = r(1 - 1/\sqrt{n}). 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 nn by tracking xi\sum x_i and xi2\sum x_i^2, 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).

Two-coin pool, 1,000,000 USDC and 1,000,000 USDT, D=2,000,000D = 2{,}000{,}000, no fee. With n=2n = 2 the invariant is 4A(x+y)+D=4AD+D3/(4xy)4A(x + y) + D = 4AD + D^3/(4xy); fix xx after the trade and solve for yy by Newton’s method (the contract does the same in integers).

SellA=1A = 1A=10A = 10A=100A = 100A=1000A = 1000constant product
100,000 USDC → USDT96,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 → USDT422,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=100A = 100 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 AA approaches constant product, higher AA approaches one-for-one. The cost appears in the depeg case: after the 500,000 trade at A=100A = 100 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.

  • 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.
  • 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
  • Curve pool reentrancy, 2023-07-30, ≈$62M. Vyper compiler versions 0.2.15, 0.2.16 and 0.3.0 broke the @nonreentrant lock (storage slots were allocated per decorator, ignoring the key), so pools sending native ETH via raw_call could be re-entered during add_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 AA changes every LP’s exposure; a high AA 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.
  • Choosing and changing AA. Egorov’s 2019 simulation gave A=85A = 85 for a three-stablecoin pool; there is no principled rule that ties AA 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 nn-dimensional pool beats a graph of two-coin pools with routing (see routing and aggregation) depends on how correlated depegs are.
AspectEthereumSolana
Canonical stable AMMCurve StableSwap (2020), StableSwap-NG, Curve v2Saber (Curve-style), Meteora DAMM v1 stable pools, CLMM 0.01% tiers
InvariantAnnxi+D=ADnn+Dn+1/(nnxi)A n^n \sum x_i + D = A D n^n + D^{n+1}/(n^n \prod x_i)same family (Saber, Meteora AMP) plus tick-based stable pairs
Multi-asset poolsup to 8 tokens (StableSwap-NG); Orbital proposed for nnmostly two-coin pools; multi-token largely via routing
Yield-bearing pegswstETH/sDAI/stETH via rate oraclesSOL/LST pools with virtual-price accounting (Meteora)
Largest incidentVyper reentrancy 2023-07-30, ~$62Mnone 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 nn.

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)

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 xi=const\sum x_i = \text{const} (price always 1, fails in a fluctuating market), the Uniswap invariant xy=constxy = \text{const} and Balancer’s xiwi\prod x_i^{w_i}, and notes that constant product is unsuitable for pegged assets because slippage is “enormous” and returns “tiny.” Figure 1 plots the three invariants for x=y=5x = y = 5; Figure 2 shows price slippage for Uniswap versus StableSwap at A=100A = 100. Constructing the StableSwap invariant derives the formula: generalise constant sum (xi=D\sum x_i = D) and constant product (xi=(D/n)n\prod x_i = (D/n)^n) with DD “the total amount of coins when they have an equal price”; introduce leverage χ\chi (constant product is zero leverage, constant sum infinite); combine as χDn1xi+xi=χDn+(D/n)n\chi D^{n-1}\sum x_i + \prod x_i = \chi D^n + (D/n)^n; make χ\chi dynamic, χ=Axi/(D/n)n\chi = A\prod x_i / (D/n)^n, so it equals AA at balance and vanishes when imbalanced; substitute to obtain Annxi+D=ADnn+Dn+1/(nnxi)A n^n\sum x_i + D = A D n^n + D^{n+1}/(n^n\prod x_i), solved iteratively for DD on deposit and for xjx_j 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 A=85A = 85, 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.

  • “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)

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 χ=Axi/(D/n)n$intotheleveragedinvariant:multiplythroughby\chi = A\prod x_i/(D/n)^n\text{\textdollar} into the leveraged invariant: multiply through by (D/n)^n/\prod x_iandsimplify,rememberingthatand simplify, remembering that\prod x_i = (D/n)^nexactlyatbalancesoexactly at balance so\chi = A\text{\textdollar} there. Then convince yourself that as any xi0x_i \to 0, χ0\chi \to 0 and the equation collapses to constant product, which is why the pool can never be emptied.

  • 2020-01: Curve launches on Ethereum with the Vyper implementation; metapools and gauges follow.
  • 2021-06: Robinson shows constant-χ\chi 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 nn-stablecoin concentrated liquidity.
  • On Solana, Saber ported the design; Meteora’s stable pools and CLMM 0.01% tiers now share the role.

Orbital — Dan Robinson, Ciamac Moallemi, Dave White (Paradigm), 2025-06-02. https://www.paradigm.xyz/writing/orbital

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 (nn 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 (rxi)2=r2\sum(r - x_i)^2 = r^2, derives prices from its gradient, locates the equal price point at xi=r(11/n)x_i = r(1 - 1/\sqrt{n}), 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 kk 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 kk 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 n=5n = 5). 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.”

  • “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)

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.

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.

  1. Dan Robinson, Uniswap v3: The Universal AMM (2021-06) — read if you want StableSwap as a v3 position.
  2. Curve, StableSwap Exchange: Overview and StableSwap-NG docs — read if you integrate with plain pools, metapools or rate-oracle tokens.
  3. Curve technical docs, CryptoSwap / twocrypto-ng overview — read if you need v2’s invariant, oracle and repeg parameters.
  4. LlamaRisk, Curve Pool Reentrancy Exploit Postmortem (2023-07) — read if you want the incident accounting.
  5. Meteora, DAMM v1 stable pools docs — read if you build stable pools on Solana.