Cross-DEX Arbitrage on Solana: Jupiter Routing vs Manual Path Building
Jupiter aggregates routes efficiently for retail but exposes predictable execution patterns that sophisticated searchers exploit. This article contrasts Jupiter-based routing with custom path-finding for cross-DEX arbitrage and where each approach wins.
Jupiter is the right tool for most Solana traders, and that is exactly the problem for anyone trying to arbitrage around it. The aggregator's routing logic is deterministic enough that searchers have reverse-engineered it to anticipate execution paths before transactions land. Understanding where Jupiter's design choices create opportunity — and where building your own path-finding engine is the only option — is the difference between a bot that compounds and one that bleeds.
How Jupiter's Routing Engine Actually Works
Jupiter constructs routes by splitting order flow across a graph of pools — Orca Whirlpools, Raydium CLMM and legacy AMMs, Lifinity, Meteora, and a handful of smaller venues. For a given input token and amount, it enumerates routes up to a configurable hop depth (typically three), simulates output amounts using on-chain state fetched via RPC, and selects the combination with the best net output after slippage.
The key detail: Jupiter re-routes on every quote call, but the graph traversal order and pool selection heuristics are open source. Anyone reading the @jup-ag/core SDK can reproduce the ranking logic locally. That predictability is a feature for users who want transparent best execution. For arbitrageurs, it is a signal.
When a large Jupiter swap hits a pool, the price impact is calculable before the transaction confirms. A searcher running their own simulation loop can identify pools that will be displaced and fire a corrective trade — effectively sandwiching the rebalance — within the same or next slot.
Where Jupiter-Based Bots Still Make Sense
Not every arbitrage strategy requires custom routing. Jupiter remains competitive for:
- Simple two-leg same-block arb where the edge is in detection speed, not path optimality. If you are watching oracle price feeds and triggering on stale AMM prices, Jupiter's route quality is usually fine because you are not competing on path discovery.
- Latency-tolerant strategies running on longer time horizons (seconds rather than sub-slot). Funding rate convergence plays or cross-venue basis trades where execution happens over multiple transactions have no need for hand-crafted routing.
- Teams early in iteration. The integration surface is small, simulation is built in, and you can ship a working bot in days. Proving that an edge exists is faster with Jupiter than without it.
If you are running trading bots on Solana and your strategy's Sharpe is above threshold on Jupiter, there is no reason to complicate the stack. The upgrade is only warranted when you can measure what you are leaving on the table.
The Case for Manual Path Building
Custom path-finding is worth the engineering investment when the edge lives in the routing layer itself. Three concrete scenarios:
1. Multi-hop routes Jupiter skips. Jupiter caps hop depth and avoids low-liquidity pools that would inflate price impact estimates. A manual router can include Sanctum LST pools, concentrated liquidity positions with asymmetric depth, or newly deployed Meteora Dynamic AMM pools before Jupiter's index picks them up. Routing through a four-hop path that crosses an LST conversion step is not unusual — and Jupiter will not find it.
2. Atomic flash-loan arbitrage. Circular arb paths — SOL → USDC → JitoSOL → SOL in a single transaction — require building the instruction set from scratch. Jupiter's swap API does not expose the plumbing needed to construct a zero-capital loop with a flash loan provider like Solend or MarginFi. You need direct CPI calls into each pool program.
3. Competing against Jupiter flow. If your strategy is specifically designed to capture the rebalancing trades that follow large Jupiter swaps, you cannot use Jupiter to execute your own leg — the latency profile and tip requirements are different enough that you need custom transaction construction to win the slot auction with Jito bundles.
The cost is real: you are maintaining a pool registry, writing AMM math for each venue (Orca's tick-based CLMM math is not trivial to get right under time pressure), and handling edge cases like pool pauses and migration states. Expect two to four weeks of engineering to cover the major venues correctly.
Simulation Accuracy and Slippage Reality
Both approaches live or die on simulation quality. Jupiter's simulation is reliable for single-route swaps but diverges under high volatility because it snapshots pool state at quote time, not at execution time. The slot gap between quote and landing can be 400–800ms on a congested cluster — enough for a whale swap to move the price your simulation assumed.
Manual routers that subscribe to pool account changes via gRPC Yellowstone rather than polling RPC see fresher state and can re-simulate in the 50–100ms window before submitting. This is where the real latency advantage is: not in transaction signing speed, but in state freshness. A stale simulation that underestimates price impact will either fail at the slippage check or, worse, execute at a loss if you set tolerance too wide.
A useful benchmark: run both routing methods against the same pool state snapshot and measure simulated output vs confirmed output across 1,000 trades. In practice, custom routers with fresh gRPC state outperform Jupiter's quoted output by 8–15 bps on volatile pairs — not because the routing math is smarter, but because the state is newer.
Practical Decision Framework
The choice is rarely permanent. Most production systems use Jupiter as a fallback and custom routing as the primary path for high-frequency opportunities:
- If simulated edge per trade is below 15 bps, Jupiter's execution reliability and lower maintenance overhead wins.
- Above 25 bps, the investment in custom routing, fresh state, and Jito bundle construction pays back within weeks of live trading.
- Between 15 and 25 bps, the answer depends on trade frequency. High volume narrows the breakeven point fast.
One practical shortcut: instrument your Jupiter bot to log the difference between quoted and confirmed output on every trade. If that slippage delta is consistently wider than your target edge, you have your answer without needing to build anything first.
If you are evaluating whether to build or buy cross-DEX arbitrage infrastructure on Solana, reach out — we have shipped both approaches in production and can scope what the right architecture looks like for your strategy.
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