Raydium CPMM — Program ID & Overview
CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C Raydium CPMM (Constant Product Market Maker) is a simplified AMM that replaces AMM V4 for standard liquidity pools. Unlike V4, CPMM does not require a linked OpenBook market and natively supports Token-2022 tokens.
Program ID
CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C
CPMM vs AMM V4
| Feature | AMM V4 | CPMM |
|---|---|---|
| OpenBook market required | Yes | No |
| Token-2022 support | No | Yes |
| Pool creation cost | Higher (market + pool) | Lower (pool only) |
| Formula | x*y=k | x*y=k |
| Swap fee | 0.25% fixed | Configurable per pool |
Key instructions
| Instruction | Description |
|---|---|
Initialize | Creates a new CPMM pool |
Deposit | Adds liquidity, receives LP tokens |
Withdraw | Removes liquidity, burns LP tokens |
SwapBaseInput | Swap a fixed input amount |
SwapBaseOutput | Swap for a fixed output amount |
Pool creation
CPMM pools can be created without a linked orderbook market, reducing setup cost and complexity.
// CPMM pool creation requires:
// 1. Token A mint
// 2. Token B mint
// 3. Initial liquidity amounts for both tokens
// 4. Fee configuration
// The pool PDA is derived from the two token mints
// Mints are sorted deterministically (lower address first)
Token-2022 support
CPMM is the first Raydium pool type to support Token-2022 (SPL Token 2022) tokens. This includes tokens with:
- Transfer fees
- Interest-bearing mints
- Non-transferable tokens (excluded from trading)
- Confidential transfers
When a Token-2022 token has a transfer fee, the pool accounts for the fee in swap calculations automatically.
FAQ
Should I use CPMM or AMM V4 for a new token? CPMM is recommended for new pools. It is simpler, cheaper to create, and supports Token-2022. AMM V4 is primarily used for legacy pools and tokens that specifically need orderbook integration.
What fees does CPMM charge? Fees are set at pool creation and vary. The protocol takes a portion of trading fees; the remainder goes to liquidity providers.
Can CPMM pools be migrated from AMM V4? No direct migration exists. You would need to withdraw liquidity from the V4 pool and deposit it into a new CPMM pool.
Updated: