The fee model
Stable AMM uses the same fee structure as AMM v4. There is only one fee tier per pool (set at initialization); pools cannot be reconfigured into higher tiers.| Field | Default | Meaning |
|---|---|---|
swap_fee_numerator / swap_fee_denominator | 25 / 10_000 | Gross trade fee: 0.25% of input volume. |
trade_fee_numerator / trade_fee_denominator | 25 / 10_000 | Same 0.25%; legacy field formerly used for OpenBook order pricing, retained for layout compatibility. |
pnl_numerator / pnl_denominator | 12 / 100 | Protocol’s share of the fee: 12% — i.e., 0.25% × 12% = 0.03% of volume. |
min_separate_numerator / min_separate_denominator | 4 / 10_000 | Internal rounding floor. |
How the split is computed
On each swap:lp_portionstays in the vault, inflatesk, and benefits LPs on redemption.pnl_portionincrementsAmmInfo.out_put.need_take_pnl_coinorneed_take_pnl_pc(depending on the input token) and is swept byWithdrawPnl.
OpenBook PnL (retired)
Early in its life, the pool also posted limit orders on OpenBook; when those filled, it earned or lost the market-maker/taker spread, settled duringMonitorStep, and tracked the result in the out_put.total_pnl_{coin,pc} counters. That path has been dormant for years — the pool holds no open orders, so the only fee accrual is the 0.03% protocol share described above. The total_pnl_* counters remain in the layout but no longer increment. The 2026-06-22 upgrade removed the leftover OpenBook code (including MonitorStep). CPMM became the default for new pools partly because of this former coupling to OpenBook; Stable AMM is order-book-independent.
Collection
The Raydium multisig (or whoever controlsamm_admin) calls WithdrawPnl to sweep:
- Transfers
need_take_pnl_coinandneed_take_pnl_pcfrom vaults to admin-designated accounts. - Zeroes the counters.
LP fee redemption
No dedicated “collect fees” instruction. LP fees accumulate in vaults, inflating the reserves. LPs realize them by burning LP viaWithdraw. The value of an LP token grows as reserves grow.
Visualization: where $1,000 of volume goes
On a USDC-heavySwap of $1,000 against a default-parameter Stable pool:
Comparison table
| Stable AMM | AMM v4 | CPMM index=0 | |
|---|---|---|---|
| Trade fee | 0.25% | 0.25% | 0.25% |
| LP | 0.22% | 0.22% | 0.21% |
| Protocol | 0.03% | 0.03% | 0.03% |
| Fund | None | None | 0.01% |
| Creator | None | None | 0 by default |
reference/fee-comparison.
Integrator notes
- Quoting: Always read
AmmInfofrom the chain; do not hardcode fees. WithSetParamsnow removed, the fee parameters on existing pools are effectively fixed. - Curve vs. fees: The 0.25% fee is independent of whether the curve is a formula (x·y=k in AMM v4) or a lookup table (Stable). Both apply the same 0.25% to the input amount.
- No rewards: Stable pools do not support on-pool reward emissions. Ecosystem farms (Farm v3/v5/v6) handle staking elsewhere.
Where to go next
products/stable/math— fee application in swap math.products/stable/instructions—WithdrawPnlaccount list.products/amm-v4/fees— deeper fee derivation for OpenBook path.reference/fee-comparison— side-by-side all products.
raydium-stable/program/src/state.rs(Feesstruct)- On-chain
AmmInfo.feesfields on live mainnet pools

