Jupiter vs Raydium: Routing Swaps for Best Execution on Solana
Jupiter vs Raydium routing compared: how aggregated multi-pool routing changes slippage and execution quality versus trading Raydium pools directly.
Two different problems: routing vs. execution
Raydium is a set of pools. Jupiter is a router that decides which pools to use. That distinction matters more than most integration guides let on, because it changes what you're actually optimizing for when you submit a swap.
Hit Raydium directly — via its SDK or by calling the AMM program yourself — and you're trading against one pool's current reserves (or one CLMM tick range), full stop. Your price impact is whatever that pool's depth says it is. Hit Jupiter and you're asking an off-chain routing engine to split your order across Raydium, Orca, Meteora, OpenBook, Phoenix, and a dozen smaller venues, picking whichever combination of hops produces the best quoted output for your input size. For a $50 swap the difference is noise. For a $50,000 swap it's not.
How Raydium pricing actually moves against you
Raydium's constant-product pools (and its CLMM pools, which behave like concentrated Uniswap v3 positions) price trades along a curve. A larger order pushes the price further along that curve before your fill completes, and if the pool's liquidity is thin around the current tick, price impact stops being linear and starts getting ugly fast. A 200-SOL swap into a mid-cap token might get 1.5% impact on a deep pool and 8% on a shallow one, and there's no way to know which you're dealing with without checking depth first.
That's the core weakness of trading Raydium in isolation: you're exposed to whatever liquidity exists in that specific pool, at that specific moment, with no fallback.
How Jupiter's routing changes the math
Jupiter's algorithm (the same core logic that powers the Metis routing engine) doesn't just pick "the best pool" — it computes optimal split ratios across multiple pools and multiple hops, simulating price impact at each leg before committing to a route. Ask it to swap 2,000 SOL for USDC and it might send 60% through a Raydium CLMM pool, 25% through an Orca Whirlpool, and 15% through Phoenix's order book, because that split produces less aggregate slippage than dumping the whole order into any single venue.
The tradeoff: more hops means more compute units, more accounts touched per transaction, and more surface area for a route to become stale between quote and execution. Jupiter mitigates staleness with slippage tolerance settings and versioned transactions with address lookup tables (necessary once you're touching 6+ pools in one instruction), but on a fast market a route quoted 400ms ago can already be wrong by the time it lands.
A worked example
Say you're swapping 5,000 USDC into a token with roughly $180K of liquidity concentrated in one Raydium pool.
Direct Raydium quote: roughly 2.9% price impact, all in one pool, one instruction, minimal compute overhead.
Jupiter quote for the same trade: it might route 70% through that same Raydium pool and 30% through a smaller Orca pool with independent liquidity, landing around 1.6% aggregate impact — meaningfully better, at the cost of an extra hop and slightly higher priority fee requirements to land reliably.
Pulling a Jupiter quote programmatically looks like this:
curl -s "https://quote-api.jup.ag/v6/quote?inputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&outputMint=So11111111111111111111111111111111111111112&amount=5000000000&slippageBps=50" | jq '.routePlan[].swapInfo.label'
That returns the labels of every AMM in the chosen route — useful for logging which venues you actually touched, which matters when you're debugging why a fill came in worse than quoted.
Where direct Raydium integration still wins
Aggregation isn't free, and for certain bot architectures it's actively the wrong call:
- Latency-sensitive sniping. If you're building a new-pool sniper, you already know the pool address before Jupiter's route cache does. Going direct to the Raydium program skips quote-fetch round trips entirely. This is exactly the kind of system we build in our Solana sniper bot engagements — single-pool, single-hop, minimal instruction overhead, tuned for the first block after pool creation.
- Deterministic execution for market making. If you're quoting both sides of a book and need predictable, repeatable transaction shape for a Hyperliquid market maker-style strategy or a Solana equivalent, unpredictable multi-hop routes make risk modeling harder, not easier.
- MEV exposure. More hops and more accounts touched means a larger attack surface for sandwich bots watching the mempool. A single-pool Raydium swap is a smaller, faster target. Pairing either approach with private transaction landing — something we cover in detail when comparing Jito bundles against standard Solana RPC — matters more for execution quality than which router you picked.
Comparison
| Dimension | Raydium (direct) | Jupiter (aggregated) |
|---|---|---|
| Price source | Single pool/tick range | Multiple pools, split routing |
| Slippage on large orders | Higher, pool-dependent | Typically lower, route-dependent |
| Instruction complexity | Low, 1 pool | Higher, multi-hop + ALTs |
| Compute unit cost | Lower | Higher (scales with hops) |
| Latency to execution | Faster (no quote round trip) | Slower (quote + build + sign) |
| Best for | Sniping, MM, small/known pools | Large swaps, unknown best venue |
| MEV surface | Smaller | Larger |
| Route transparency | Fully known ahead of time | Chosen dynamically, can change |
Which to pick when
Route through Jupiter by default for any user-facing swap over roughly $2,000–5,000 equivalent, or for any token where you don't already know liquidity depth across venues — the aggregation nearly always beats manual pool selection past that size. Go direct to Raydium (or Orca, or whichever venue you've already identified as deepest) when you're building latency-critical infra: snipers, arbitrage bots, or market makers where instruction predictability and compute budget matter more than shaving another 50 bps off a single trade. Most serious trading systems end up using both — Jupiter for opportunistic or user-initiated swaps, direct pool calls for anything running on a tight execution clock.
If you're deciding which model fits your bot's actual order flow — or you've already picked wrong and are seeing worse fills than your backtests predicted — a strategy consultation is the fastest way to work through the tradeoff with someone who's shipped both patterns. And before any routing logic touches mainnet funds, get it looked at: our code review and audit process catches the slippage-tolerance and route-validation bugs that don't show up until a thin-liquidity pool exposes them.
For teams building anything beyond a simple swap widget, the routing decision also feeds into RPC architecture — see how Yellowstone gRPC compares to standard Solana WebSocket RPC for feeding your bot fresh pool state — and into which liquidity venues you route into in the first place, where Meteora DLMM against Uniswap v3-style concentrated liquidity is worth understanding before you hardcode a pool type assumption into your router.
Need a second set of eyes on your swap execution path before it goes live? Start with a smart contract audit covering the routing and slippage logic specifically.
Need a bot like this built?
We design, build and run trading bots on Solana, Hyperliquid and Polymarket.
Start a projectMore from the blog
Public vs Paid RPC: How to Run a Fair Benchmark
A fair comparison of public and paid RPC endpoints must account for quotas, workload, freshness and support guarantees.
Read articleRPC Benchmark Percentiles Explained: p50, p95 and p99
Why averages hide the latency spikes that break trading bots, wallets and production blockchain applications.
Read articleHyperliquid REST vs WebSocket Benchmark: What to Measure
A benchmark plan for Hyperliquid market data that separates request latency from streaming freshness and recovery.
Read article