Curve StableSwap ยท interactive mechanism simulation

Traders swap DAI/USDC/USDT through the 3pool. The invariant blends constant-sum (flat, near-zero slippage near the peg) with constant-product (never fully drainable), tuned by amplification coefficient A. Fees + idle-liquidity yield accrue to LPs. Try dragging A down, or trigger a depeg to see LPs become the exit liquidity.
Traders swap DAI/USDC/USDT Curve 3pool A = 100 1.00M 1.00M 1.00M DAI USDC USDT LP fees virtual price 1.000000 fees: 0.0 Idle-liquidity lending Compound / yearn yield: 0.0 Depeg event market: calm USDT share: 33.3%
Swaps simulated
0
LP fees accrued
0.0 $-equiv
Virtual price (LP share value)
1.000000
Pool imbalance
0.0%
Parameters โ€” edit me
100
0.04%
$8,000
1.5/s
Controls

Illustrative simulation. Runs the real StableSwap invariant (D and get_y solved by Newton's method, as in the Vyper contracts) over a simplified 3-asset pool; trade sizes and timing are randomized for visualization โ€” not live onchain data. The depeg button dumps USDT into the pool repeatedly, showing how the curve degrades toward constant-product at the edges: LPs end up holding the depegging asset, exactly as the invariant is designed to do. Part of The Onchain Experiment Atlas.