What it is
Stable AMM is a standalone Raydium program (its own deployment — not a mode of the AMM v4 program) designed for pairs with known, well-behaved price relationships — primarily stablecoin–stablecoin pairs (USDC-USDT, USDH-USDC) and collateralized-token pairs. Instead of a constant-product curve, it uses a lookup table of (x, y, price) tuples baked into each pool’sModelDataInfo account. Price discovery happens through interpolation within the table, producing lower slippage for small swaps.
It is a pure AMM: all liquidity sits in the pool’s own vaults. An early-life OpenBook market-making path has been dormant for years, and the 2026-06-22 upgrade removed the leftover market code. It shares the same Fees structure and fee model as AMM v4; the difference is purely the pricing curve — instead of x·y=k, you interpolate a pre-populated model.
Program ID: see reference/program-addresses.
Token-2022: not supported. Classic SPL tokens only.
Liquidity: thin. Most user-facing integrations reach Stable pools through the AMM Routing program for best-price routing across all Raydium AMMs. The SDK also supports Stable pools directly: pools surface as version: 5 (pooltype: "StablePool") on ApiV3PoolInfoStandardItem, and the standard LiquidityModule (addLiquidity / removeLiquidity / swap) auto-detects v5 and emits the right instructions — see Code demos.
Chapter contents
Overview
Why a separate program, the lookup-table model, comparison to AMM v4 and CPMM.
Accounts
AmmInfo, ModelDataInfo, DataElement fields, vault layout, fee structure.
Math
How interpolation produces prices, pool-asset accounting, fee application identical to AMM v4.
Instructions
The callable set — Deposit, Withdraw, SwapBaseIn, SwapBaseOut, WithdrawPnl — and the instructions removed in the 2026-06-22 upgrade.
Fees
Same 0.25% / 0.22% LP / 0.03% protocol split as AMM v4. No fund fee, no creator fee.
Code demos
Detect a Stable pool, swap / add / remove liquidity through the SDK’s
LiquidityModule (handles v5 natively), and use the off-chain stable-curve helpers.When to read this
- You are integrating a stablecoin or asset pair and find a Stable AMM pool with the best price.
- You are building a routing engine and need to support Stable pools as a liquidity source.
- You are maintaining liquidity in an existing Stable pool — learning the deposit / withdraw flow.
- You are curious how AMM pricing can be made programmable via a lookup table.
Key facts
| Aspect | Value |
|---|---|
| Mainnet program ID | 5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h |
| Devnet program ID | DRayDdXc1NZQ9C3hRWmoSf8zK4iapgMnjdNZWrfwsP8m |
| Curve model | Interpolated lookup table (not x·y=k) |
| OpenBook dependency | None (market path long dormant; dead code removed 2026-06-22) |
| Trade fee | 0.25% (same as AMM v4) |
| LP share of fee | 0.22% |
| Protocol share of fee | 0.03% |
| Creator fee | None |
| Fund fee | None |

