Solana IDL reference › Raydium CPMM (CP Swap) › PoolState
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
| Field | Type | Offset | Size |
|---|---|---|---|
| amm_config | pubkey | 8 | 32 |
| pool_creator | pubkey | 40 | 32 |
| token_0_vault | pubkey | 72 | 32 |
| token_1_vault | pubkey | 104 | 32 |
| lp_mint | pubkey | 136 | 32 |
| token_0_mint | pubkey | 168 | 32 |
| token_1_mint | pubkey | 200 | 32 |
| token_0_program | pubkey | 232 | 32 |
| token_1_program | pubkey | 264 | 32 |
| observation_key | pubkey | 296 | 32 |
| auth_bump | u8 | 328 | 1 |
| status | u8 | 329 | 1 |
| lp_mint_decimals | u8 | 330 | 1 |
| mint_0_decimals | u8 | 331 | 1 |
| mint_1_decimals | u8 | 332 | 1 |
| lp_supply | u64 | 333 | 8 |
| protocol_fees_token_0 | u64 | 341 | 8 |
| protocol_fees_token_1 | u64 | 349 | 8 |
| fund_fees_token_0 | u64 | 357 | 8 |
| fund_fees_token_1 | u64 | 365 | 8 |
| open_time | u64 | 373 | 8 |
| recent_epoch | u64 | 381 | 8 |
| padding | [u64; 31] | 389 | 248 |
bytemuckunsafe, repr packed). Every field here is naturally aligned or the struct is packed, so the in-memory layout matches the offsets shown.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>"
}
}
]
}
]
}
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.
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.