Solana instructions › Raydium CPMM (CP Swap) › swap_base_output

swap_base_output

Raydium CPMM (CP Swap) instruction. Program ID CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C. Position in this snapshot: 6.

Discriminator or tag: 0x37d96256a34ab4ad — published in the IDL snapshot.

From the IDL

Swap the tokens in the pool base output amount # Arguments * `ctx`- The context of accounts * `max_amount_in` - input amount prevents excessive slippage * `amount_out` - amount of output token

Accounts

#AccountRole
0payersigner
1authorityread-only
2amm_configread-only
3pool_statewritable
4input_token_accountwritable
5output_token_accountwritable
6input_vaultwritable
7output_vaultwritable
8input_token_programread-only
9output_token_programread-only
10input_token_mintread-only
11output_token_mintread-only
12observation_statewritable

Arguments

ArgumentType
max_amount_inu64
amount_outu64

Other Raydium CPMM (CP Swap) instructions

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.