Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.raydium.io/llms.txt

Use this file to discover all available pages before exploring further.

AMM v4 is fully operational and has no announced sunset. Migration is a choice, not a forced move. CPMM offers a better LP fee split by default, lower creation costs, Token-2022 support, and no OpenBook dependency.

Why migrate

DimensionAMM v4CPMM
Fee destinationProtocol + LP splitLPs receive the default swap-fee share
OpenBook dependencyYesNone
Creation costHigherLower
Token-2022 supportNoYes
New listings routed toRareDefault
If your pair trades heavily, the LP-fee uplift can justify migration. If the old pool still has strong liquidity and the project has not endorsed a destination CPMM pool, migration may not be worth the coordination cost.

Pre-migration checklist

For pool operators and project treasuries:
  • Announce the migration timeline to LPs.
  • Give LPs at least 48 hours where possible.
  • Confirm the destination CPMM pool and fee tier.
  • Prepare post-migration announcements with the new pool ID and LP mint.
  • Decide whether a new farm is needed.
For individual LPs:
  • Confirm you are following the project’s endorsed migration.
  • Keep enough SOL for multiple transactions.
  • Note your AMM v4 LP balance and expected underlying amounts.
  • Check whether your AMM v4 LP tokens are staked in a farm.

UI migration: individual LP

The migration is two actions: remove liquidity from AMM v4, then add liquidity to CPMM.

Step 1: withdraw from AMM v4

  1. Open the AMM v4 pool or your portfolio position.
  2. If your LP tokens are staked in a farm, unstake them first.
  3. Click Remove liquidity.
  4. Choose the percentage to withdraw.
  5. Review the token amounts you will receive.
  6. Confirm and approve.

Step 2: deposit to CPMM

  1. Open the destination CPMM pool.
  2. Click Add liquidity.
  3. Enter the amount of one token.
  4. Review the paired token amount and any leftover balance.
  5. Confirm and approve.
Between withdrawal and deposit, pool prices can move. If the two pools have different ratios, some tokens may remain as dust in your wallet.

UI migration: project treasury

For a project treasury, the process is the same but requires coordination:
  1. Announce the migration ahead of time.
  2. Seed the CPMM pool before asking users to migrate.
  3. Migrate treasury LP first and publish transaction links.
  4. Create a new farm if incentives should continue on the CPMM LP mint.
  5. Monitor individual LP migrations over the next days or weeks.
  6. Deprecate the old pool only after users had enough time to move.

Verification

Post-withdraw

  • AMM v4 LP token balance should decrease or reach zero.
  • The two underlying tokens should appear in your wallet.
  • The transaction should show Success on a Solana explorer.

Post-deposit

  • CPMM LP token balance should appear in your wallet.
  • Raydium’s portfolio should show the new position.
  • The CPMM pool page should show your liquidity share.

Proof of migration

For transparency, publish both transaction links:
  • Withdraw from AMM v4.
  • Deposit to CPMM.

Rollback considerations

Rolling back from CPMM to AMM v4 means withdrawing from CPMM and depositing to AMM v4. It is usually not worth doing unless there is a specific product reason. AMM v4 pool creation is more expensive and requires OpenBook market setup.

Common concerns

My AMM v4 LP is staked in a farm. Can I migrate?

Yes. Unstake first, withdraw LP from AMM v4, deposit into CPMM, then stake the new CPMM LP tokens if a new farm exists.

The CPMM pool does not exist yet

Most LPs should wait for the project to create and endorse a destination pool. Creating one yourself means you take the initial price and liquidity risk.

I have a large position. What about slippage?

Withdraw and deposit in smaller slices if your position is large relative to pool TVL. Review each quote and avoid signing if the received amounts are materially worse than expected.

What happens to LP tokens I forget to migrate?

They stay in the old pool and keep earning according to AMM v4 rules. Nothing forces migration.

Troubleshooting

Destination LP token account is new

The first CPMM deposit may need to create a new LP token account. Keep extra SOL in your wallet for rent and fees.

Second transaction expires

If withdrawal lands but deposit expires, your tokens remain in your wallet. Reopen the CPMM pool and retry with a higher priority-fee setting.

Wrong CPMM pool

Multiple CPMM pools can exist for the same pair. Use the pool endorsed by the project or the pool with the intended fee tier and liquidity.

Tax implications

In some jurisdictions, LP withdrawal can be a taxable event. Consult local rules before migrating large positions.

Pointers