Version banner.
- SDK:
@raydium-io/raydium-sdk-v2@0.2.64-alpha - Cluster: Solana
mainnet-beta - Program ID: see
reference/program-addresses - Last verified: 2026-09-09 against SDK
0.2.64-alphasource,raydium-sdk-V2-demo/src/launchpad, and theraydium-launchprogram source
package.json. The bonding-curve interface has evolved between minor releases.Setup
Demos here mirror files inraydium-sdk-V2-demo/src/launchpad. Bootstrap follows the demo repo’s config.ts.template:
Create a launch
Source:src/launchpad/createMint.ts (and createBonkMintApi.ts for the API-driven Bonk variant)
Most of the launch’s economics are not arguments — they come from the GlobalConfig you bind to via configId, and the SDK fills the rest from the API’s default params. You pass the mint’s identity, the config to bind, and (optionally) a first buy:
- There is no
curveType,graduationFractionBps,initialK,quoteMint,openTime,feesorpostGraduationLpPolicyargument. The curve shape and the quote mint are properties of theGlobalConfigyou bind; fee rates live onGlobalConfigandPlatformConfig; LP disposal at graduation is aPlatformConfigsetting. Seeproducts/launchlab/instructionsfor exactly whatInitializeV2accepts. symbollonger than 10 characters and an emptyuriare both rejected client-side before any RPC.- Passing
transferFeeExtensionParamsswitches the builder toInitializeWithToken2022and forcesmigrateTypeto"cpmm". - The builder returns a
transactionsarray;createOnly: falseadds the first-buy transaction. Alwaysexecute({ sequentially: true })— the mint must exist before the buy lands.
Fetch launch state
Source:src/launchpad/poolInfo.ts
There is no getLaunchById. The pool id is a PDA of (programId, mintA, mintB), and getRpcPoolInfo returns the decoded PoolState with its bound configInfo attached:
getRpcPoolsInfo({ poolIdList }) is the batched form and returns a poolInfoMap keyed by pool id — use it for portfolio views instead of looping. If you want to decode the raw accounts yourself, LaunchpadPool.decode and LaunchpadConfig.decode are exported.
Buy — exact quote in
Source:src/launchpad/buy.ts
The off-chain quote helper is Curve.buyExactIn, a static method on the exported Curve class — not a method on raydium.launchpad. The transaction builder is buyToken. Both need the platform’s fee rates, which live on a separate PlatformConfig account:
minMintAAmount explicitly instead of slippage; omit both and the SDK computes the bound from live RPC data. shareFeeRate must not exceed poolInfo.configInfo.maxShareFeeRate, and it only applies when you also pass a shareFeeReceiver.
Buy — exact base out
The builder isbuyTokenExactOut, and the amount arguments are outAmount (base you want) and maxBuyAmount (quote you will spend at most). Curve.buyExactOut({ poolInfo, amountA, ... }) is the matching off-chain preview.
outAmount of zero client-side, and the program reverts if the curve has moved enough that the quote requirement exceeds maxBuyAmount.
Sell
Source:src/launchpad/sell.ts
The builder is sellToken (sellTokenExactOut for the exact-quote-out variant), with sellAmount and an optional minAmountB. Curve.sellExactIn({ poolInfo, amountA, ... }) previews it.
real_a by sellAmount returns quote_out equal to the integrated area under the curve between real_a − sellAmount and real_a, minus the sell fee. sellAmount must be greater than zero — the builder rejects zero before any RPC.
Graduation
Those wallets are operated by Raydium’s graduation crank, so in practice migration lands seconds after the threshold is crossed regardless of who made the final buy. From an integrator’s side the only thing to do is treat the status transition as a fast event: pollgetRpcPoolInfo (or subscribe over gRPC, below) and switch your UI from the curve to the resulting CPMM pool when status changes.
See products/launchlab/instructions for the account lists, the migration fee, and how LP is split at graduation.
Collect creator fees
Source:src/launchpad/claimCreatorFee.ts (single mint) and collectAllCreatorFees.ts (batched)
The method is claimCreatorFee (and claimMultipleCreatorFee for the batched form). It is keyed by the quote mint, not by a launch — one call sweeps the signer’s accrued creator fees in that mint across their launches:
claimPlatformFee / claimAllPlatformFee / claimVaultPlatformFee builders.
Track a launch through its lifecycle
Putting it together, a monitoring script might look like:getRpcPoolInfo on a 10-second timer is fine for a single launch. For an indexer, use the gRPC subscription below instead — getRpcPoolsInfo({ poolIdList }) batches, but polling hundreds of pools still burns RPC credits for no benefit.
Watch configs and pools over gRPC
Source:src/grpc/launchpadPoolInfo.ts
Subscribes to the LaunchLab program over Yellowstone gRPC and logs every GlobalConfig and PoolState update with each mint’s token program. Two datasize filters on one accounts subscription separate the two account types, so a single stream covers both.
The demo is the shortest correct reference for classifying a launch’s mints, which the Token-2022 quote-mint release makes necessary:
- Pools are classified straight from
PoolState.token_program_flag, decoding bit0 for the base mint and bit1 for the quote mint with no mint fetch at all. Testing the whole byte against0— which was sufficient while quote mints were legacy-only — misreads a legacy base mint as Token-2022 whenever the quote mint is Token-2022. - Configs cannot be classified that way: a
GlobalConfigstores its quote mint’s address and no program flag, so the demo reads the mint account’s owner once and caches it per mint.
create versus update is inferred from the demo’s own caches, seeded at startup from getProgramAccounts; with that seeding disabled, read “create” as “first seen on this stream”.
gRPC access is not part of the public RPC surface — see the demo repo’s src/grpc/README.md.
Rust CPI
Calling LaunchLab from your own Anchor program is rare (most launch integrations are TS-side only). If you do:- The crate is
raydium-launchpad(lib nameraydium_launchpad), version0.2.0, and it does expose acpifeature. There is noraydium_launchlab. - It is not published on crates.io — depend on it by git revision, the same way as the other Raydium program crates.
- The CPI entry points are named after the on-chain instructions, not after the SDK’s TypeScript methods:
buy_exact_in,buy_exact_out,sell_exact_in,sell_exact_out,claim_creator_fee,create_vesting_account,claim_vested_token.migrate_to_amm/migrate_to_cpswapare signer-gated to theGlobalConfigmigration wallets and are not callable from an integrator program.
sdk-api/rust-cpi for the crate-pinning rules — in particular the Anchor version split, which decides whether one crate can CPI into both LaunchLab and CLMM.
Pitfalls
- Confusing on-chain instruction names with SDK method names. The program has
buy_exact_in/sell_exact_in; the SDK hasbuyToken/sellToken.buyExactInandsellExactInexist only as static methods onCurve, and they compute a quote — they do not build a transaction. - Forgetting
extraSigners.createLaunchpadcreates the base mint from a keypair you generate, so that keypair has to sign. OmitextraSigners: [pair]and the transaction fails signature verification. - Not choosing the quote mint. You don’t pass one. The quote mint is a property of the
GlobalConfigyou bind throughconfigId—getPdaLaunchpadConfigId(programId, quoteMint, curveType, index). To launch against a different quote mint, bind a different config;raydium.api.fetchLaunchConfigs()lists the available ones with their default params. - Metadata size. Long
uristrings push the Metaplex CPI over the budget. Keepuriunder ~200 chars — most CDN-hosted JSON metadata fits easily.symbolis hard-capped at 10 characters. - Treating graduation as a race you can enter. It isn’t — see the warning above. Your UI should still treat
statustransitions as fast events, because Raydium’s crank lands the migration within seconds of the threshold being crossed.
Where to go next
products/launchlab/bonding-curve— curve math.products/cpmm/code-demos— what to do with the resulting pool.user-flows/launch-token-launchlab— the end-to-end launch-a-token guide, including off-chain steps.
- Raydium SDK v2
- Raydium LaunchLab program source

