Raydium AMM v4 Swap V2 Interface Addition
New Swap V2 Instruction
AMM v4 now includes a new swap V2 instruction that reduces account requirements from 18 to 8 accounts. The removed accounts are OpenBook V2 market-related accounts, which are no longer needed since the AMM no longer shares liquidity with OpenBook V2 markets.
Backward Compatibility
This is an optional update. V1 swap instructions will remain functional indefinitely. Both V1 and V2 instructions are supported simultaneously.
Data & Indexing Partners
Data Indexing Solutions indexing swap instructions should prepare to support the V2 interface:
Adjust your parser so it expects only 8 accounts when handling Swap V2. Don’t rely on OpenBook market accounts being present anymore. If you’re storing parsed accounts, keep support for both formats so older and newer swaps can live side by side.
Update your database schema to handle both versions. A simple swap_version field (e.g., v1 or v2) will do. Since V2 uses fewer accounts, keep the mapping flexible. Normalize your transaction and event data so queries stay consistent across both versions.
Data and indexing providers using Raydium's API do not need to make any updates.
Resources
• GitHub PR: https://github.com/raydium-io/raydium-amm/pull/55/files
• SDK v0.2.29-alpha: https://github.com/raydium-io/raydium-sdk-V2/commit/ad76a41685126631371af4fdcac8ea20256b3c3b
• Devnet testing available now: https://solscan.io/account/DRaya7Kj3aMWQSy19kSjvmuwq9docCHofyP9kanQGaav?cluster=devnet
Mainnet deployment at: September 22nd, 12:00 UTC
New Swap V2 Instruction
AMM v4 now includes a new swap V2 instruction that reduces account requirements from 18 to 8 accounts. The removed accounts are OpenBook V2 market-related accounts, which are no longer needed since the AMM no longer shares liquidity with OpenBook V2 markets.
Backward Compatibility
This is an optional update. V1 swap instructions will remain functional indefinitely. Both V1 and V2 instructions are supported simultaneously.
Data & Indexing Partners
Data Indexing Solutions indexing swap instructions should prepare to support the V2 interface:
Adjust your parser so it expects only 8 accounts when handling Swap V2. Don’t rely on OpenBook market accounts being present anymore. If you’re storing parsed accounts, keep support for both formats so older and newer swaps can live side by side.
Update your database schema to handle both versions. A simple swap_version field (e.g., v1 or v2) will do. Since V2 uses fewer accounts, keep the mapping flexible. Normalize your transaction and event data so queries stay consistent across both versions.
Data and indexing providers using Raydium's API do not need to make any updates.
Resources
• GitHub PR: https://github.com/raydium-io/raydium-amm/pull/55/files
• SDK v0.2.29-alpha: https://github.com/raydium-io/raydium-sdk-V2/commit/ad76a41685126631371af4fdcac8ea20256b3c3b
• Devnet testing available now: https://solscan.io/account/DRaya7Kj3aMWQSy19kSjvmuwq9docCHofyP9kanQGaav?cluster=devnet
Mainnet deployment at: September 22nd, 12:00 UTC
GitHub
Feat: add swap v2 instructions to reduce useless accounts by RainRaydium · Pull Request #55 · raydium-io/raydium-amm
Constant product AMM integrated with the OpenBook CLOB - Feat: add swap v2 instructions to reduce useless accounts by RainRaydium · Pull Request #55 · raydium-io/raydium-amm
❤4
Reminder: the Raydium AMM v4 Swap V2 Interface Addition upgrade goes live in ~22h from now.
The new AMM v4 (formerly hybrid AMM) swap v2 IX is live.
https://explorer.solana.com/tx/2SwYwcBWbyiv4xjQNsuknvn1ENXVSPLxnZMXKtzmZNxCRGtnAC3FS4dU3finXHqZskVTFaAAKmR6s7uxj9zCRq6H
https://explorer.solana.com/tx/2SwYwcBWbyiv4xjQNsuknvn1ENXVSPLxnZMXKtzmZNxCRGtnAC3FS4dU3finXHqZskVTFaAAKmR6s7uxj9zCRq6H