# Curve StableSwap Amplification (A) & Depeg Convexity Math

> Derive Michael Egorov Curve StableSwap invariant, dynamic chi = A * prod(x_i) amplification, Newton-Raphson y-convergence gas, and depeg liquidity cliffs.

Canonical: https://nftvenueledger.com/protocols/curve-stableswap-amplification-coefficient-depeg-convexity
Last updated: 2026-11-14T19:52:38.203Z

**Publication:** NFTVenue Ledger
**Category:** Amm Clob Intent Dex Settlement
**Published:** 2026-11-14T03:45:25.915Z
**Author:** Dr. Devon Kurosawa, PhD (PhD in Distributed Systems & Cryptographic Protocol Verification)
**Reviewer:** Not recorded

## Answer-first summary

Curve StableSwap blends zero-slippage constant-sum curves with bankruptcy-proof constant-product asymptotes via dynamic amplification A—creating razor-thin peg spreads and sharp depeg cliffs.

## Key takeaways

- Curve StableSwap multiplies amplification A by the reserve balance ratio prod(x_i)/(D/n)^n, delivering (2A + 1)x depth near 1:1 parity while reverting smoothly to x*y=k during depegs.
- Over-amplifying fragile or algorithmic pegs (A >= 1,000) lets arbitrageurs drain ~88%–90% of good collateral at $0.999 before hitting the hyperbolic Depeg Cliff.
- StableSwap-NG introduces offpeg_fee_multiplier, automatically expanding swap fees up to 10x–20x as pool balances skew away from equilibrium to compensate LPs for LVR.
- Ramping A up or down requires a mandatory >=14-day timelocked linear schedule because instantaneous A changes alter marginal pool prices and would enable governance arbitrage.

## Related financial entities

- **Balancer Liquidity Bootstrapping Pool Standard** (BAL-LBP) — product: Smart contract pool that dynamically changes token weights over a set time window, allowing project teams to raise capital without massive initial liquidity.
- **Concentrated Liquidity AMM Mathematical Specification** (CL-AMM) — product: Algorithmic market-making protocol allowing liquidity providers to allocate capital within discrete price intervals, maximizing capital efficiency.
- **Loss-Versus-Rebalancing (LVR) Metric** (LVR) — product: Quantitative measure of adverse selection cost incurred by automated market maker (AMM) liquidity providers relative to a continuously rebalanced reference portfolio.

## Analysis

Trading `$10,000,000 USDC -> USDT` on a `$100M` constant-product `x * y = k` pool incurs a staggering **~18.2% price impact**, whereas a pure constant-sum `x + y = D` pool offers **0.00% slippage** right until the cheaper stablecoin drains `100%` of the vault's good reserves in a single block! Formulated by Michael Egorov (`2019`), **Curve StableSwap** dynamically interpolates between `sum x_i = D` (around equilibrium `x_1 = x_2 = D/2`) and `prod x_i = (D/n)^n` (in the tails) using dimensionless **Amplification Coefficient `A`** multiplied by balance-ratio term `prod x_i / (D/n)^n`.

Anchored inside our [concentrated AMM, CLOB & intent DEX master guide](/protocols/concentrated-liquidity-amm-clob-intent-dex-mev-guide-2026), tuning `A` (and `StableSwap-NG` dynamic off-peg fee multipliers) governs multi-billion-dollar stablecoin, LST (`stETH/ETH`), and LRT liquidity across Ethereum and multi-chain ecosystems in our [marketplaces directory](/marketplaces) like [Acala Swap](/marketplaces/acala-swap) and [Astroport](/marketplaces/astroport).

## The StableSwap Invariant & Why `chi` Vanishes Automatically During a Depeg

For `n` pegged assets with equilibrium invariant sum `D`, StableSwap enforces:
**`A * n^n * sum(x_i) + D = A * D * n^n + D^(n+1) / (n^n * prod(x_i))`**

Observe the elegance of dynamic leverage `chi = A * prod(x_i) / (D / n)^n`:
1. **At Exact Peg (`x_1 = x_2 = D / 2`)**: `prod(x_i) / (D/2)^2 = 1`, so effective amplification equals full `A` (e.g., `A = 2,000` for fiat `USDC/USDT`), compressing local curvature so the pool behaves like a constant-product pool **`2 * A + 1 = 4,001x` larger** in TVL!
2. **At Severe Depeg (`x_bad = 0.92 * D, x_good = 0.08 * D`)**: The balance product `(0.92 * 0.08) / 0.25 = 0.2944` shrinks automatically toward `0`, decaying `chi` rapidly back into hyperbolic constant-product curvature so `x_good` can **never** hit zero at any finite price—while instantaneously widening marginal slippage across the **"Depeg Cliff"**!

![Curve StableSwap-NG on-chain Newton-Raphson root solver and off-peg dynamic fee defense pipeline](/api/figure?type=flow&title=StableSwap-NG%20Invariant%20Solver%20%26%20Off-Peg%20Fee%20Gate&subtitle=Iterative%20256-bit%20uint%20Newton-Raphson%20convergence%20paired%20with%20imbalance-triggered%20fee%20expansion&steps=1.%20Normalize%20Rates%3A%3AScale%20rebasing%2Foracle%20LST%20rates%20%28wstETH%2FsDAI%29%20to%201e18%20parity%7C2.%20Solve%20D%20%26%20y_new%3A%3AConverge%20Newton-Raphson%20loop%20in%204-8%20iterations%20%28%20y_k%2B1%20-%20y_k%20%20%3C%3D%201%29%7C3.%20Offpeg%20Fee%20Boost%3A%3AMultiply%20base%20fee%20up%20to%20offpeg_fee_multiplier%20when%20pool%20skews!%7C4.%20EMA%20Price%20Oracle%3A%3AUpdate%20manipulation-resistant%20internal%20get_p%28%29%20EMA%20derivative&metrics=PEG%20DEPTH%20BOOST%3A%3A2*A%20%2B%201%20x%3A%3AA%3D2000%20gives%204%2C001x%20local%20depth%7CNEWTON%20ITERATIONS%3A%3A4%20to%209%20Loops%3A%3AQuadratic%20convergence%20in%20uint256%7COFFPEG%20MULTIPLIER%3A%3AUp%20to%2010x%20-%2020x%3A%3ATaxes%20depeg%20dumpers%20to%20shield%20LPs%7CADMIN%20A%20RAMP%3A%3A%3E%3D%2014%20Days%3A%3ABlocks%20instant%20A-manipulation%20attacks)

## The Governance Hazard of Setting `A` Too High (`UST / 3pool` Post-Mortem)

Choosing `A` is a high-stakes risk trade-off between **normal-regime aggregator volume share** and **catastrophic depeg inventory toxicity**:

- **Over-Amplification (`A = 2,000–5,000` on algorithmic/fragile pegs)**: Keeps price pinned at `0.9992` even after **`80%–88%`** of the pool has been drained of `USDC` and stuffed with failing token `X`! Honest LPs suffer near-total [Loss-Versus-Rebalancing](/protocols/loss-versus-rebalancing-lvr-black-scholes-amm-adverse) because arbitrageurs dump `85%` of pool depth at `$0.999` before the Depeg Cliff finally triggers!
- **Conservative Amplification (`A = 30–100` for `LSTs / Bridge Wrappers`)**: Inflects price downward early once reserve skew crosses `65/35`, preserving `USDC/ETH` collateral for LPs and broadcasting an early market warning signal—enhanced in **`StableSwap-NG`** via `offpeg_fee_multiplier` which spikes swap fees from `1 bps` up to `20–50 bps` automatically as `prod(x_i)` deviates from parity!

## Optimal `A` Calibration Matrix Across Pegged Asset Risk Classes

| Pegged Asset Archetype | Typical Curve `A` Parameter | 1:1 Peg Depth Multiplier (`2A + 1`) | Depeg Cliff Threshold (1% Price Drop) | Recommended `offpeg_fee_multiplier` |
| :--- | :--- | :--- | :--- | :--- |
| Tier-1 Fiat T-Bill Stablecoins (`USDC/USDT`) | `1,500 – 5,000` | `3,001x – 10,001x` | ~86%–91% single-sided reserve skew | `2x – 5x` (Base `1 bps -> 5 bps`) |
| Decentralized Overcollateralized (`USDS/crvUSD`) | `200 – 500` | `401x – 1,001x` | ~76%–82% single-sided reserve skew | `5x – 10x` (Base `2 bps -> 20 bps`) |
| Liquid Staking Tokens (`stETH/ETH` + Rate Oracle) | `30 – 100` | `61x – 201x` | ~64%–71% single-sided reserve skew | `5x – 10x` (Buffers slashing/queue discount) |
| Cross-Chain Bridged Assets / New LRTs | `10 – 30` | `21x – 61x` | ~58%–63% early-warning inflection | `10x – 20x` (Maximum LP depeg defense) |

![Reserve composition skew required to move StableSwap spot price below 0.990 across A=10, 100, 500, and 2000](/api/figure?type=bars&title=Depeg%20Cliff%20Sensitivity%3A%20Good-Asset%20Remaining%20at%20%240.990&subtitle=Percentage%20of%20safe%20USDC%20still%20remaining%20in%20a%202-coin%20pool%20when%20marginal%20price%20first%20hits%20%240.990&steps=A%20%3D%2010%20%28Defensive%20LRT%29%3A%3A38.2%25%20safe%20USDC%20preserved%20when%20spot%20hits%20%240.990%7CA%20%3D%20100%20%28Standard%20LST%29%3A%3A24.6%25%20safe%20USDC%20preserved%20when%20spot%20hits%20%240.990%7CA%20%3D%20500%20%28Algo%2FSynth%29%3A%3A15.4%25%20safe%20USDC%20preserved%20when%20spot%20hits%20%240.990%7CA%20%3D%202000%20%28Fiat%20Majors%29%3A%3AOnly%209.8%25%20safe%20USDC%20left%20at%20%240.990%20%2890.2%25%20toxic%20bag!%29&metrics=VIRTUAL%20PRICE%3A%3AD%20%2F%20LP_Supply%3A%3AMonotonically%20grows%20from%20swap%20fees!%7CREAD-ONLY%20REENTRANCY%3A%3ANG%20Guarded%3A%3AStableSwap-NG%20locks%20get_virtual_price%7CDYNAMIC%20FEE%20MAX%3A%3A50%20bps%20Off-Peg%3A%3ARecaptures%20depeg%20arbitrage%20for%20LPs%7CGAS%20%28NG%20SWAP%29%3A%3A~78k%20-%2098k%3A%3AVyper%20optimized%20vs%20~125k%20legacy)

## Exact Newton-Raphson `get_y` Iteration & Dynamic Off-Peg Fee Math

On-chain Vyper contracts solve the degree-`(n+1)` polynomial for updated output reserve `y` given new input reserve `x'_i` via quadratic Newton-Raphson iteration `y_{k+1} = (y_k^2 + c) / (2 * y_k + b - D)`, paired with `StableSwap-NG` dynamic fee scaling:

```formula
Curve StableSwap 2-Pool Newton-Raphson Solver & Dynamic Off-Peg Fee:
 Given invariant D, amplification Ann = 4 * A, and post-input reserve x_1:
 c = D^3 / (4 * x_1 * Ann), b = x_1 + (D / Ann)
 Iterate until |y_{k+1} - y_k| <= 1 wei:
 y_{k+1} = (y_k^2 + c) / (2 * y_k + b - D)

 StableSwap-NG Dynamic Fee Function:
 xp_prod_ratio = (4 * x_1 * x_2) / (x_1 + x_2)^2 [Equals 1.000 at 50/50; drops -> 0 off-peg]
 f_effective = (fee_base * offpeg_multiplier) / ( (offpeg_multiplier - 1) * xp_prod_ratio + 1 )

Worked Stress Depeg Audit (USDC/SyntheticUSD Pool, D = $100M, fee_base = 2 bps, offpeg_multiplier = 15):
 1) Normal 50/50 Equilibrium (x_1 = $50M, x_2 = $50M => xp_prod_ratio = 1.000):
 => f_effective = (2 * 15) / (14 * 1.000 + 1) = 30 / 15 = 2.00 bps (Tight aggregator spread!)
 2) Depeg Attack Skew 85% / 15% (x_1 = $85M, x_2 = $15M => xp_prod_ratio = 4 * 0.85 * 0.15 = 0.510):
 => f_effective = 30 / (14 * 0.510 + 1) = 30 / 8.14 = 3.69 bps -> At 95/5 skew (ratio = 0.19): jumps to 8.20 bps!
```

## StableSwap vs Concentrated Liquidity 1-Tick Pegs

How does passive `StableSwap-NG` compare against parking liquidity inside a single `+/- 1 bps` tick on [Uniswap v3 concentrated ticks](/protocols/uniswap-v3-tick-spacing-concentrated-liquidity-depth)? Unlike a 1-tick v3 range that goes `100%` inactive and stops earning fees the instant a stablecoin wobbles to `$0.9988`, StableSwap smoothly transitions along its asymptotic tail while charging elevated off-peg fees—compare discrete non-divisible NFT curves next in [SudoAMM NFT bonding curves](/protocols/sudoamm-bonding-curves-nft-linear-exponential-pool-spreads) inside our [AMM, CLOB & Intent DEX hub](/topics/amm-clob-intent-dex-settlement).

## Frequently asked questions

### Why can Curve StableSwap never run completely out of one token like a constant-sum pool?

Because leverage term chi scales with the product of reserves prod(x_i); as any single token reserve approaches zero, chi collapses to zero and the curve asymptotically becomes a hyperbolic constant-product x*y=k curve.

### Why must changes to Curve amplification coefficient A be ramped slowly over 14+ days?

On an imbalanced pool (e.g., 70/30), changing A instantaneously shifts the spot exchange rate and virtual price in a single block—allowing an attacker or governance insider to sandwich the admin parameter tx.

### How does StableSwap-NG handle yield-bearing Liquid Staking Tokens like wstETH or sDAI?

StableSwap-NG queries on-chain exchange-rate oracles (or ERC-4626 convertToAssets) to normalize appreciating wrapper balances back to 1:1 underlying parity before running the Newton-Raphson invariant loop.

### When is Curve StableSwap better for LPs than a 1-tick Uniswap v3 stablecoin position?

Passive treasuries prefer StableSwap-NG because liquidity stays active across temporary 10–50 bps peg wobbles with automatic off-peg fee surges, without paying rebalancing gas.


## Source URLs

- https://curve.fi/files/stableswap-paper.pdf
- https://docs.curve.fi/stableswap-exchange/stableswap-ng/overview/
- https://arxiv.org/abs/2208.06046

## Citation

- APA: Dr. Devon Kurosawa, PhD. (2026). Curve StableSwap Amplification Coefficient (A): Newton-Raphson Math & Depeg Convexity Cliffs. NFTVenue Ledger. https://nftvenueledger.com/protocols/curve-stableswap-amplification-coefficient-depeg-convexity
- Canonical article: [Curve StableSwap Amplification Coefficient (A): Newton-Raphson Math & Depeg Convexity Cliffs](https://nftvenueledger.com/protocols/curve-stableswap-amplification-coefficient-depeg-convexity)
- Site research index: [NFTVenue Ledger](https://nftvenueledger.com/llms-full.txt)
