Solana IDL reference › Raydium CPMM (CP Swap) › PoolState

PoolState account layout

Raydium CPMM (CP Swap) account type. Program ID CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C. Data starts with the 8-byte account discriminator, published in the IDL.

Discriminator (published in the IDL)

hex 0xf7ede3f5d7c3de46

bytes [247, 237, 227, 245, 215, 195, 222, 70]

base58 iUE1qg7KXeV

Fields (offsets include the 8-byte discriminator)

FieldTypeOffsetSize
amm_configpubkey832
pool_creatorpubkey4032
token_0_vaultpubkey7232
token_1_vaultpubkey10432
lp_mintpubkey13632
token_0_mintpubkey16832
token_1_mintpubkey20032
token_0_programpubkey23232
token_1_programpubkey26432
observation_keypubkey29632
auth_bumpu83281
statusu83291
lp_mint_decimalsu83301
mint_0_decimalsu83311
mint_1_decimalsu83321
lp_supplyu643338
protocol_fees_token_0u643418
protocol_fees_token_1u643498
fund_fees_token_0u643578
fund_fees_token_1u643658
open_timeu643738
recent_epochu643818
padding[u64; 31]389248

getProgramAccounts filter

Every PoolState account starts with the same discriminator, so a memcmp at offset 0 selects this account type. The second filter matches amm_config at offset 8. A dataSize: 637 filter would also work only while live accounts still have the snapshot size; programs often add fields in upgrades, so it is left out here. getProgramAccounts on a large program is heavy; many RPC providers limit or disable it.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getProgramAccounts",
  "params": [
    "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C",
    {
      "encoding": "base64",
      "filters": [
        {
          "memcmp": {
            "offset": 0,
            "bytes": "iUE1qg7KXeV"
          }
        },
        {
          "memcmp": {
            "offset": 8,
            "bytes": "<amm_config as base58>"
          }
        }
      ]
    }
  ]
}

Decode account data

Decoding runs on Rugsight's server against the bundled snapshot. Nothing is fetched from the chain. Paste public account data only; never paste a private key or seed phrase.

Other Raydium CPMM (CP Swap) account types

Raydium CPMM (CP Swap) instructions · Explain a transaction

Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.