Solana instructions › Raydium CPMM (CP Swap) › swap_base_input
Raydium CPMM (CP Swap) instruction. Program ID CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C. Position in this snapshot: 5.
Discriminator or tag: 0x8fbe5adac41e33de — published in the IDL snapshot.
Swap the tokens in the pool base input amount # Arguments * `ctx`- The context of accounts * `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate * `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage
| # | Account | Role |
|---|---|---|
| 0 | payer | signer |
| 1 | authority | read-only |
| 2 | amm_config | read-only |
| 3 | pool_state | writable |
| 4 | input_token_account | writable |
| 5 | output_token_account | writable |
| 6 | input_vault | writable |
| 7 | output_vault | writable |
| 8 | input_token_program | read-only |
| 9 | output_token_program | read-only |
| 10 | input_token_mint | read-only |
| 11 | output_token_mint | read-only |
| 12 | observation_state | writable |
| Argument | Type |
|---|---|
| amount_in | u64 |
| minimum_amount_out | u64 |
To see which instructions a confirmed transaction actually ran, paste its signature into the Rugsight transaction explainer.
Instruction lists and published discriminators come from solana-idls@1.2.1 (MIT) and, for the System Program, Compute Budget and Associated Token Account programs, from their public instruction enums (Apache-2.0). Snapshot date 2026-11-17. Programs can upgrade, so a live program may differ from this snapshot. Computed Anchor discriminators are the first 8 bytes of sha256("global:<snake_case_name>") and are labelled as computed.