This entry covers a CPMM program upgrade scheduled for 2026-10-30. It was verified against the
feat/initialize-v2 branch of raydium-cp-swap (head 40cbd81) before deployment. Confirm the deployed program before relying on the new instruction.enable_creator_fee flag and a creator_fee_on side, both fixed at creation. Until now, a creator could only set them through InitializeWithPermission, which needs an admin-issued Permission PDA. The public Initialize always stored the fee as disabled. In practice, only LaunchLab graduations and other gated flows could create a pool that charges a creator fee.
This release adds InitializeV2. It is Initialize with one extra argument, creator_fee_on: Option<CreatorFeeOn>, and anyone can call it. Pool math, swap, liquidity, fee collection and the protocol share of the creator fee are untouched.
TL;DR for integrators
- New instruction:
InitializeV2. Permissionless. Arguments areinit_amount_0,init_amount_1,open_timeandcreator_fee_on: Option<CreatorFeeOn>. Discriminator[67, 153, 175, 39, 218, 16, 38, 32]. Some(side)enables the creator fee on that side;Noneleaves it off.Nonestores exactly whatInitializestores.- Same accounts as
Initialize, minusrent. The first 19 accounts are identical and in the same order. See the account list. - The creator is the signer.
pool_state.pool_creatoris the signingcreator. UnlikeInitializeWithPermission, the beneficiary cannot be set to another address. - The creator picks on/off and the side, not the rate. The pool charges its fee tier’s
AmmConfig.creator_fee_rate. That rate defaults to0, so an enabled pool on such a tier accrues nothing. - Nothing existing changed.
InitializeandInitializeWithPermissionkeep their discriminators, accounts, arguments and behaviour. No account layout or error code changed. - Refresh your IDL to get the new instruction. Clients that never call it need no change.
What changed in the program
New instruction: InitializeV2
InitializeV2 runs the same creation code as Initialize. It:
- accepts either the canonical pool PDA or a signed random keypair as
pool_state; - applies the same Token-2022 allow-list and
SupportMintAssociatedchecks, throughremaining_accounts; - rejects creation when
amm_config.disable_create_poolis set; - bumps
open_timetoblock_timestamp + 1when it is not in the future; - locks 100 LP base units and mints the rest to the creator;
- charges
amm_config.create_pool_fee.
PoolState:
An invalid tag or variant byte fails Anchor’s argument deserialization. No new error code is involved.
How the three creation paths compare
Internal refactor
The three handlers now share oneinitialize_pool routine. The refactor does not change the accounts, arguments, checks or stored values of Initialize or InitializeWithPermission. The new tests also check that a plain Initialize on the same config still stores the creator fee as disabled.
What creators should know
- Check the fee tier first. The creator fee rate belongs to the
AmmConfig, not the pool. Choose a tier whosecreator_fee_rateis what you want to charge. Rates are listed inproducts/cpmm/fees. - The choice is permanent. No instruction changes
enable_creator_feeorcreator_fee_onafter creation. To change it, you must create a new pool. - Traders pay it on top of the trade fee. The creator fee is a separate rate added to the swap. It does not reduce the LP, protocol or fund shares, but it does make the pool more expensive to trade against than a pool on the same tier with the fee off.
- Collection is unchanged. Use
CollectCreatorFeeorCollectCreatorFeePermissionless. The protocol’s share from the 2026-09-19 release applies, and you can’t opt out of it at creation.
Migration notes
- Pool creators. Switch from
InitializetoInitializeV2only if you want the creator fee on. PassSome(side)and drop therentaccount.Initializekeeps working. - SDK users.
raydium.cpmm.createPoolin@raydium-io/raydium-sdk-v2@0.2.64-alphabuildsInitialize. Until a release ships anInitializeV2builder, encode it from the refreshed IDL. - Indexers and routers. Expect more pools with
enable_creator_fee = true, created by ordinary wallets rather than LaunchLab. Quote from each pool’s ownenable_creator_feeandcreator_fee_on, never from the creation path or the tier alone. Decode the new instruction if you track pool creation from instructions. Tracking fromPoolStateaccounts needs no change. - UIs. Show whether a pool charges a creator fee and at what rate, since two pools on the same tier can now differ.
- LaunchLab and other permissioned flows. No change.
InitializeWithPermissionis still the path when the payer and the recorded creator must differ.
What did not change
- Every account layout, including
PoolStateandAmmConfig. InitializeandInitializeWithPermission: discriminators, accounts, arguments and stored values.Permission,CreatePermissionPdaandClosePermissionPda.- Swap, deposit and withdraw math, the creator-fee charge, and the protocol share of the creator fee.
- Error codes.
6000–6015are unchanged; nothing appended. - Program ID.
Pages updated
products/cpmm/instructions: upgrade banner; summary and state-change matrix rows; newInitializeV2section with arguments, encoding and account list;Initializepostcondition now points toInitializeV2.products/cpmm/fees: “Creator fee” section lists all three creation paths and notes that enabling the fee does not set its rate.products/cpmm/accounts:poolStateand pool-ID notes;creator_fee_on/enable_creator_feefield notes;Permissionnote; account-lifecycle row.products/cpmm/overview: “What’s new” callout and the “Predictable fees” bullet.products/cpmm/code-demos: note thatcreatePoolbuildsInitializeand how to reachInitializeV2.protocol-overview/shared-infrastructure: creator fees are no longer limited to LaunchLab-graduated pools.reference/token-2022-support: CPMM pool-creation paths.
raydium-cp-swap branch feat/initialize-v2 (40cbd81): programs/cp-swap/src/lib.rs, instructions/initialize_v2.rs, instructions/initialize.rs, instructions/initialize_with_permission.rs, instructions/mod.rs, states/pool.rs, and tests/initialize_v2.test.ts.
