As of the 2026-07 upgrade, AMM v4’s OpenBook / Serum dependency has been removed — no instruction reads or writes OpenBook state anymore. The market accounts below are retained only as positional placeholders on the legacy v1 instruction layouts (accepted but ignored) and as reference fields on
AmmInfo. Use the V2 swap entrypoints, which omit them entirely. This page still groups the accounts into “pool-owned” and “OpenBook (legacy)” sections for reading older transactions.Inventory
An AMM v4 pool records one bound market onAmmInfo at creation. The full picture:
Note: “serum” is kept as the prefix in AMM v4’s IDL and field names for backward compatibility. These accounts are no longer functional after the OpenBook removal.
AmmInfo
The pool’s root state account. Large (≈ 752 bytes) because it carries both pool and OpenBook references inline.
The struct layout is unchanged (byte-compatible) so existing deserializers keep working, but after the OpenBook removal the fields marked
DEPRECATED above are no longer written — the swap_* volume counters are frozen at their last value. For volume analytics, use trade logs rather than these fields. Only need_take_pnl_* and pool_open_time are actively maintained.coin_vault,pc_vault— the pool’s SPL Token vaults.coinistoken_0by Serum/OpenBook convention (base),pcistoken_1(quote).coin_decimals,pc_decimals— matching the mints.open_orders,target_orders,market— legacy reference fields. Still present onAmmInfoand still passed positionally on the v1 instruction layouts, but the program no longer reads or validates them. The V2 swap entrypoints omit them.fees.swap_fee_numerator / swap_fee_denominator— the combined trade fee. Default25 / 10_000 = 0.25%.status— bitmask gating operations. Admin-settable viaAdminSetStatus.state_data.need_take_pnl_*— delta between gross accrued fees and what’s been swept.TakePnlzeroes these.
The OpenBook wiring
Removed. The OpenBook / Serum dependency has been deleted from the program (2026-07 upgrade). The accounts described in this section are no longer validated or used. They remain as reference fields on
AmmInfo and as positional placeholders on the legacy v1 instruction layouts. Use the V2 swap entrypoints (SwapBaseInV2 / SwapBaseOutV2) which skip these accounts entirely.SwapBaseIn / SwapBaseOut, Deposit, or Withdraw instruction, the account count must still match the old layout (the market accounts occupy their historical positions), but their contents are no longer checked — no CPI is issued against them. New code should use the V2 swap variants, which do not take these accounts at all.
amm_open_orders is an OpenBook-owned account holding the pool’s limit-order state on this market: active orders, settled balances, referrers, etc. amm_target_orders is AMM-side: it holds the AMM’s intended grid (price/size for each order slot) so the program can cheaply compare against what’s currently posted and place / cancel the diff.
Authority PDAs
There is exactly oneamm_authority PDA for the entire AMM v4 program. Its seed is trivial (["amm authority"]) and its bump is stored on every AmmInfo. This authority signs all token moves for all AMM v4 pools.
amm_authority above actually covers both in this program’s design; different versions used different derivation, so check the specific pool’s AmmInfo.nonce in code).
Vaults
The pool’s SPL Token vaults are standard token accounts whoseowner is amm_authority. Not ATAs — their addresses are specific PDAs derived at Initialize with ["amm_associated_seed", coin_mint_or_pc_mint, market, amm_id] seeds. Addresses are stored on AmmInfo; derivation is a one-time curiosity.
Token-2022 is not supported. The program hardcodes SPL Token’s program ID for all vault moves. Attempting to bind an AMM v4 pool to a Token-2022 mint fails at Initialize.
LP mint
A classic SPL Token mint whose authority isamm_authority. Total supply tracks LP ownership of the pool; burning LP returns tokens from both vaults pro-rata. Because AMM v4 predates CPMM, there is no lp_supply mirror in the pool state — read the mint’s on-chain supply directly.
Status bitmask
AmmInfo.status gates operations. Bits (position may differ across program versions — confirm via the source):
The Raydium multisig sets these via
SetParams (with param = Status). (AdminCancelOrders has been removed.)
Observation / oracle
AMM v4 has no dedicated observation account. Other protocols that need an on-chain TWAP typically consume OpenBook’s book crossings indirectly or read off-chain. If you need a Raydium TWAP with program support, use CPMM or CLMM.Deriving a pool’s accounts from scratch
Because AMM v4 was not designed for deterministic per-pair PDAs (it pre-dates that Solana convention), the canonicalamm_id is a seeded keypair derived with:
amm_open_orders, amm_target_orders, amm_withdraw_queue, pool_temp_lp, pool_coin_token_account, pool_pc_token_account, and lp_mint. The SDK and API pre-compute these for you; see raydium-sdk-v2’s Liquidity.getAssociatedPoolKeys.
In practice, integrators read the pool’s full account set from GET https://api-v3.raydium.io/pools/info/ids?ids=<POOL_ID> or from the SDK. Hand-deriving is rarely needed.
Lifecycle quick reference
Pools and their accounts persist indefinitely. Even if liquidity is fully withdrawn,
AmmInfo stays.
What to read where
- Math and fee arithmetic:
products/amm-v4/math. - Fee split and how it compares to CPMM/CLMM:
products/amm-v4/fees. - Instruction account lists:
products/amm-v4/instructions. - OpenBook account derivation: OpenBook program docs (
github.com/openbook-dex/program).
- Raydium AMM program —
raydium-io/raydium-amm reference/program-addressesfor canonical program IDs- OpenBook / Serum protocol for the counterparty accounts

