The one published tier
Unlike CPMM and CLMM, AMM v4 has noAmmConfig account. Fees are stored directly on each pool’s AmmInfo.fees struct and are fixed at pool creation. The defaults that cover essentially every live AMM v4 pool:
Note that
pnl_numerator / pnl_denominator is a fraction of the swap fee, not of trade volume — a common misreading. The LP share is the complement (88% of the fee = 0.22% of volume) and is implicit; there is no separate “LP share” numerator.
A small number of early pools were created with different numerators; always read AmmInfo.fees before quoting.
There is no fund-fee and no creator-fee line: these are CPMM/CLMM inventions that did not exist in AMM v4’s original fee model.
How the split is computed
On each swap, the pool charges the gross trade fee off the input amount, then apportions:lp_portionis left in the vault and contributes to the nextk. LPs capture it by redeeming LP tokens later.pnl_portionincrementsAmmInfo.state_data.need_take_pnl_coinorneed_take_pnl_pcdepending on which side is the swap input.
TakePnl moves tokens out without shifting price.
PnL from OpenBook (historical)
Removed. The OpenBook integration has been removed from the program, so the second PnL stream described in this section is no longer generated. The
total_pnl_{coin,pc} counters are now deprecated fields — they carry frozen historical values and are never updated. The 0.03% protocol-fee path (above) is unaffected and still active.MonitorStep and the program credited them to state_data.total_pnl_{coin,pc} as informational counters.
- When the pool’s posted grid was correctly calibrated around the curve price, OpenBook fills tended to be fee-positive for the pool — the AMM was effectively market-making on OpenBook and earning maker rebates.
- When OpenBook paused or the event queue filled, the pool could sit on stale orders that filled at disadvantageous prices, producing negative PnL. This operational coupling was one of the motivations for moving away from the hybrid design.
Collection
The admin (Raydium multisig) callsWithdrawPnl to sweep need_take_pnl_* into the pool-level “PnL owner” accounts configured on the program’s AmmConfig (a different, program-scoped config — not the per-pool CPMM-style AmmConfig). Sweeping:
- Transfers
need_take_pnl_coin/need_take_pnl_pcfrom the pool vaults to the PnL destination. - Zeroes the counters.
TakePnlError directly. The operation does not move the curve — LPs should not see any price change across a WithdrawPnl call. Note the WithdrawPnl account layout changed in the 2026-07 upgrade (see instructions).
LP fee redemption
There is no dedicated “collect LP fees” instruction. LP fees accumulate in the vaults and inflatek over time; LPs realize them by burning LP tokens via Withdraw. The value of an LP token grows monotonically as (coin_reserve_effective, pc_reserve_effective) grow.
Visualization: where 1,000 USDC of volume goes
On a USDC-heavy swap of $1,000 against a default-parameter pool:AmmConfig[0] (0.25% tier, no creator fee): LP gets $2.10, protocol $0.30, fund $0.10. CPMM introduces the fund line by carving it out of what would have been LP’s share in AMM v4’s equivalent tier.
Comparison table
Full matrix in
reference/fee-comparison.
Integrator notes
- Quoting. Fetch
AmmInfovia the SDK orapi-v3.raydium.io/pools/info/ids. Reserves are now vault-only, so you can quote against the vault balances directly — just remember to subtractneed_take_pnl_*(accrued PnL is held in the vault but excluded from the curve). - Stale fee parameters. In principle
SetParamscould changeswap_fee_numerator, but in practice the Raydium multisig has not changed defaults for any live pool. Still, always read from on-chain state rather than hardcoding. - No rewards. AMM v4 does not support on-pool reward emissions. Legacy ecosystem farms (Farm v3 / v5 / v6) are the staking-layer equivalent — see
products/farm-staking.
Where to go next
products/amm-v4/math— the trade-fee derivation inside the curve.products/amm-v4/instructions—WithdrawPnl/SetParamsaccount lists.reference/fee-comparison— side-by-side matrix.
- Raydium AMM program —
raydium-io/raydium-amm - On-chain AMM v4 fee-numerator/denominator fields (verified against mainnet
AmmInfoaccounts).

