All articles
MEV·May 5, 2026·6 min read

Jupiter Swap Guard & Jito Integration: How Slippage Gets Protected

How Jupiter combines dynamic slippage and Jito bundles for jupiter mev protection jito — and what bot builders should replicate when quoting client swaps.

A sandwich attack on Solana costs the victim real basis points, and the attacker only needs to see your transaction in the mempool before it lands. Jupiter's answer to this is a stack of defenses that most bot builders underestimate: a routing engine that rewrites your swap path, a slippage model that adjusts per token, and an optional path that submits your transaction as a Jito bundle so it never sits in the public mempool at all. If you're quoting swaps for clients, understanding exactly how these three pieces fit together is the difference between a bot that quietly bleeds users and one that doesn't.

Where the leak actually happens

On Solana there's no unified mempool in the Ethereum sense, but there's something close enough to hurt you. Leader validators receive transactions ahead of block production, and searchers running their own RPC infrastructure can observe pending transactions with enough lead time to front-run a fat swap. The classic sandwich is unchanged from EVM: the attacker buys the same token right before you, your buy pushes the price up, they sell into your slippage. The wider your slippage tolerance, the more they can extract.

A naive bot sets slippage to a flat 1% or, worse, "auto" without understanding what the aggregator does with that number. On a low-liquidity SPL token, 1% is an open invitation. On a deep USDC/SOL pool, 1% is paranoid and gets you needless failed transactions during volatility. The fix is not a single magic number — it's a system.

Jupiter's dynamic slippage, concretely

When you request a quote from Jupiter's /quote endpoint and pass dynamicSlippage, the response no longer echoes your static slippageBps. Instead Jupiter estimates a slippage ceiling from the route's actual pools — their depth, recent volatility, and the price impact of your specific size. A 5 SOL swap through a deep Orca pool might come back with a computed 30 bps; the same notional through a fresh Meteora pool with thin liquidity might come back with 250 bps because anything tighter would just fail.

The mechanic that matters: this estimate is baked into the transaction Jupiter builds for you, so you're not blindly trusting a client-side guess. A rough call looks like this:

const quote = await (await fetch(
  `https://quote-api.jup.ag/v6/quote?inputMint=${inMint}` +
  `&outputMint=${outMint}&amount=${amount}` +
  `&dynamicSlippage=true&restrictIntermediateTokens=true`
)).json();

const { swapTransaction } = await (await fetch(
  'https://quote-api.jup.ag/v6/swap',
  { method: 'POST', headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      quoteResponse: quote,
      userPublicKey: wallet.publicKey.toString(),
      dynamicComputeUnitLimit: true,
      dynamicSlippage: { maxBps: 300 },      // hard cap you control
      prioritizationFeeLamports: { jitoTipLamports: 100_000 }
    })
  }
)).json();

Two things worth calling out. restrictIntermediateTokens keeps the router on high-liquidity intermediate hops instead of routing through some obscure token that widens your effective slippage — cheap protection that costs you nothing. And maxBps is your circuit breaker: dynamic slippage is smart, but you still set the ceiling so a bad estimate can't authorize a 5% loss.

The Jito path: why it removes the sandwich, not just narrows it

Dynamic slippage limits how much an attacker can take. Jito removes the opportunity entirely, and the two are complementary, not redundant.

When you set jitoTipLamports (or route the built transaction through Jito's block-engine yourself), your swap is submitted as part of a bundle — an atomic, ordered group of transactions with a tip attached. Bundles go straight to the Jito-Solana validator's block engine, not the public transaction path. Because the bundle is atomic and its ordering is fixed, there's no seam for an attacker to insert a front-run before your swap and a back-run after it. Either the whole bundle lands in the order you specified or none of it does.

The tip is the price of admission. It's a separate transfer to a Jito tip account, and it competes against every other searcher's tip for inclusion. During a memecoin frenzy I've watched effective tips climb past 0.005 SOL for reliable landing; on a quiet afternoon 0.0001 SOL clears fine. If you're building for clients, the tip has to be dynamic — pull the recent tip floor from Jito's tip API and scale it against the trade's expected value. Tipping a flat 100k lamports on every swap either overpays on calm blocks or gets you dropped on hot ones.

There's a real tradeoff here that vendors gloss over: bundles that don't land don't cost you the tip (the tip only transfers if the bundle is included), but they do cost you latency and a retry. If your infrastructure is slow to observe the opportunity in the first place, the whole protection story is moot because you're already late. This is where colocated streaming matters — reading state from Yellowstone gRPC Geyser instead of polling public RPC is what gets your quote fresh enough that the Jito submission is worth attempting. And on the submission side, ShredStream's latency edge for Solana searchers is the same reason serious teams don't rely on vanilla RPC for time-sensitive bundles.

What to replicate in your own quoting layer

If you're wrapping Jupiter (or building an aggregator-independent router), copy the structure, not just the API call:

  • Per-route slippage, never global. Compute a ceiling from pool depth and your size. A 0.5 SOL swap and a 500 SOL swap through the same pool are not the same risk.
  • A hard maxBps cap above the dynamic estimate. The estimate handles the common case; the cap handles the model being wrong.
  • Simulate before you send. simulateTransaction catches the failure that would otherwise burn a priority fee. Cheap insurance.
  • Dynamic tips tied to trade value. Fixed tips are a tax on your good trades and a death sentence on your urgent ones.
  • A fallback to normal submission when a bundle misses. Don't strand a client's swap because Jito was congested — retry with a priority fee and a tightened slippage.

The same discipline carries over to pools where you're providing rather than taking liquidity; the mechanics behind JIT liquidity on Meteora DLMM lean on the exact same bundle atomicity to make single-block positions safe. It's one toolkit applied to different sides of the trade.

A common mistake I see in client codebases: they treat MEV protection as a checkbox on the swap call and never measure whether it's working. Log your realized slippage against the quoted output on every fill. If your average fill is landing 40 bps worse than quote on trades that used dynamic slippage plus Jito, something in your tip logic or your data freshness is broken, and no amount of configuration flags will surface that — only the numbers will. The teams that ship reliable Solana MEV and arbitrage bots are the ones treating this as an observability problem, not a feature toggle. The same logic underpins how we approach MEV protection on EVM chains too, where private mempools play the role Jito bundles play here.

If you're building a swap layer that has to protect client funds under real adversarial conditions, our team builds this exact protection stack into production Solana MEV and arbitrage systems.

Need a bot like this built?

We design, build and run trading bots on Solana, Hyperliquid and Polymarket.

Start a project
#MEV#Jupiter#Jito#Solana#slippage