wSOL → USDCOrca WhirlpoolTicks + liquidity + fee state
Both quotes → your decision gate
SKIPStale, too costly or invalid
BUILDOne transaction candidate
Sample architecture for evaluating a two-pool route.
Two pools. One client decision.
This bounded design compares a configured Raydium CPMM pool with a configured Orca Whirlpool for USDC/wSOL. It starts from your own inventory and an allowlist of pools.
A price gap is the first check. Read pool state, quote your trade size and test both swap legs before your bot signs.
Supanode supplies RPC, account streams and optional transaction delivery. Your application owns the route, capital and execution rules.
SUPANODE / DATA
Read and subscribe
Fetch pool accounts through RPC. Use WebSocket or gRPC account updates to invalidate a candidate when its dependencies change.
YOUR APPLICATION / LOGIC
Decode and quote
Maintain protocol adapters. Check mints, token programs, decimals and fee configuration. Quote each direction and exact input size from the required state.
YOUR APPLICATION / CONTROL
Reject or prepare
Apply freshness, minimum return and cost limits. Build, simulate and sign only a candidate that passes. The wallet and signing keys stay under your control.
Your team implements the arbitrage strategy, protocol adapters and bot. Check current pool availability, SDK integration and the combined transaction in your implementation.
Quote the size you can execute.
Use a last trade or spot ratio to flag a potential gap, then quote the output for your exact amount.
Scroll the table horizontally for all columns.
Inputs to a size-specific route check
Check
Raydium CPMM leg
Orca Whirlpool leg
Pool state
Vault balances, pool status and opening time
Current tick, active liquidity and the tick arrays the swap crosses
Fee state
Trade / creator configuration and applicable token transfer fees
Pool fee state, adaptive-fee oracle when applicable, token transfer fees
Trade size
Exact USDC input in raw token units
Fixed wSOL input no greater than the first leg's minimum output
Protection
Minimum wSOL received
Minimum final USDC received, with the client's cost budget considered
Depth changes the answer. A larger size can cross more ticks or move a reserve-based price further. Requote the size instead of multiplying a screen price.
Keep costs consistent. Do not subtract DEX fees twice when a quote already includes them. Slippage tolerance bounds the allowed output; it is not another fixed fee.
Use protocol-specific quote logic. A Whirlpool is not a simple constant-product reserve ratio. Unknown token extensions or unsupported pools should fail the allowlist check.
The route fails the cost check.
SAMPLE DATA
Assume a screen shows a 0.4% difference. The client tests a 1,000 USDC round trip. All amounts, prices and cost conversions below are invented to explain the decision.
Route input1,000.00 USDC
Raydium CPMM
1,000 USDC → estimated 6.65 wSOL
Minimum received6.60 wSOL
Orca Whirlpool
Fixed 6.60 wSOL → estimated 1,002.10 USDC
Minimum received999.60 USDC
Separate execution cost cap*− 1.25 USDC
999.60 − 1,000.00 − 1.25 = −1.65 USDC
SKIP
The lower estimate is −1.65 USDC. It fails the client's additional 0.50 USDC buffer. Nothing is signed or submitted.
*Sample cap for network / priority fees and an optional delivery tip, converted from SOL by the client. Quotes include DEX costs. Any wSOL received above 6.60 stays in the wallet and is excluded from this lower bound. Use protocol quote logic to calculate a live route.
Atomic only inside one valid transaction.
Solana processes instructions in a transaction together. If one instruction fails, its state changes revert. Execution fees can still be charged.
ONE SOLANA TRANSACTION / CONDITIONAL DESIGN
Prepare accountsValidate token accounts, authority and setup
Raydium swapExact USDC input + minimum wSOL out
Orca swapFixed wSOL input + minimum USDC out
CleanupCompatible wrapping / account handling
Any failed instruction → both swap legs revert.
Fit before you sign. Both legs must actually fit the supported message version, account list, size and compute budget. Check tick arrays, token restrictions and setup / cleanup compatibility.
Protect the final amount. Set the final minimum to cover the USDC spent and the client's chosen cost allowance. Keep SOL available for fees. Atomicity does not reimburse those costs.
If the combined route cannot be built or simulated, skip it.
For atomic execution, both legs must fit in one valid transaction. Build and test the combined SDK integration before enabling the bot.
Your builderBuild + simulate through RPC. Inspect errors, account effects and compute usage.
Your signerCheck freshness and fee caps again. Sign locally.
RPC or optional SenderSubmit the signed transaction.
Your reconcilerCheck confirmation, execution error and actual token balance changes through RPC.
Track the returned RPC signature to verify execution and confirmation.
Invalidate first. Then recalculate.
Keep account updates as signals that a quote may be stale. A change to one account does not prove that every dependency is current.
Stream interruptedPause execution
Subscriptions restoredRefetch account state
Dependencies checkedDiscard old candidates
Quotes refreshedReopen the decision gate
Scroll the table horizontally for all columns.
Failure handling belongs in the client
Trigger
Client response
Old quote / pool changed
Refetch related state and quote both legs again. Do not automatically widen slippage.
Insufficient depth / missing ticks
Refresh tick dependencies. Reduce the size or skip if the size cannot be quoted safely.
Minimum output / program error
Record the reason and check pool state, fees and token rules before a new candidate.
Compute / size / account error
Fix the builder and repeat simulation. Do not silently split the route into independent transactions.
429 rate limit
Back off. Check freshness again before retrying.
Unknown status / expired blockhash
Check signature status and expiry before creating a newly signed attempt. A timeout alone is not proof of failure.
Read related accounts with a response context and chosen commitment. Multiple fetches can observe different state. Simulation checks available chain state; it does not reserve liquidity. Solana RPC provides 2 days of replay; gRPC provides 100 slots of replay. State resync is not full event-history recovery.
Start with the workload you have.
For a bounded prototype, RPC + WebSocket can cover reads, narrow account updates and submission. Add gRPC when the size and activity of your watchlist justify it.
RPC + WebSocket from $40 / 30 days. Add gRPC when your workload needs it.
Solana
RPC + WebSocket
STARTER · entry Bundle
For a focused account list and a measured workload.
15 RPS · 5 TPS
10 WebSocket connections
100 subscriptions / connection · 1,000 total
No gRPC in this tier
From $40
/ 30 days
Request a free trial up to 24h; our team confirms availability and setup. Purchase with a Solana wallet and USDC portal balance.
Forward signed transactions through parallel delivery channels, including staked TPU connections with SWQoS. Use your RPC for reads, simulation, network confirmation and execution status.
50 requests/s per client profile by default
Plus Solana network fees
No monthly subscription · trial on request
Use RPC submission when it meets your delivery needs.
Bundle plans cover the listed RPC and streaming services. Your application builds and executes the arbitrage transaction.
Before you connect.
Does a price difference mean I can execute the round trip?
Quote the exact amount on both legs, include applicable fees, and check minimum output, liquidity, token rules and freshness. In the worked example, the route fails these checks and the client chooses SKIP.
Can I use Jupiter instead of direct protocol adapters?
The current Swap API V2 /build path returns Metis swap instructions for your transaction builder and self-managed submission. /order + /execute provides managed landing of a prepared swap. A /build result cannot use /execute. Combining two responses into an atomic round trip still needs route-specific construction and testing. Jupiter access is separate from a Supanode key.
Do I need gRPC, Raw ShredStream or Sender from the start?
Start with reads, update volume and recovery needs. RPC + WS can serve a narrow prototype; gRPC supports an account feed within its quotas. Add raw shreds when you can operate receiving and reconstruction. Use Sender as an optional delivery path after route evaluation.
Will a failed atomic transaction cost nothing?
No. State changes revert when an instruction fails, but execution fees can still be charged. Keep network costs separate from the token outputs and check your SOL balance.
Does a reconnected stream recover every missed event?
Solana RPC provides 2 days of replay and gRPC provides 100 slots. Pause execution, restore subscriptions, fetch current account state and recompute candidates. Validate gap coverage against the available window and keep unresolved intervals visible.
What does my arbitrage bot need to implement?
Build around allowlisted pools, current SDK adapters, quote logic and transaction assembly. Test the combined route and connect your capital and risk controls.
Sources for the design.
Use the protocol code and documentation below to implement and test the route.