Solana IDL reference › Raydium CPMM (CP Swap) › LpChangeEvent
Raydium CPMM (CP Swap) event. Program ID CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C. Data starts with the 8-byte event discriminator, published in the IDL.
Discriminator (published in the IDL)
hex 0x79a3cdc939da753c
bytes [121, 163, 205, 201, 57, 218, 117, 60]
base58 MM4RV7eqJFV
Emitted when deposit and withdraw
| Field | Type | Offset | Size |
|---|---|---|---|
| pool_id | pubkey | 8 | 32 |
| lp_amount_before | u64 | 40 | 8 |
| token_0_vault_before | u64 | 48 | 8 |
| token_1_vault_before | u64 | 56 | 8 |
| token_0_amount | u64 | 64 | 8 |
| token_1_amount | u64 | 72 | 8 |
| token_0_transfer_fee | u64 | 80 | 8 |
| token_1_transfer_fee | u64 | 88 | 8 |
| change_type | u8 | 96 | 1 |
Anchor programs emit events in one of two ways. With emit! the event is written to the transaction logs as Program data: <base64>; the decoded bytes are the 8-byte discriminator above followed by the Borsh-encoded fields. With emit_cpi! the program calls itself and the event is in that inner instruction's data, which starts with the 8-byte tag 0xe445a52e51cb9a1d, then the discriminator and the fields. Logs can be truncated on busy transactions; inner-instruction data is not. The decoder below accepts both forms. How to decode Anchor events.
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.