Building a Solana Arbitrage Bot — RPC, Latency, and the Parts That Actually Matter

Choosing an RPC for a Solana arbitrage bot: how submission path and congestion behaviour decide fill rate, and what to measure before blaming your strategy code.

BoltTx Team··11 min read
solanaarbitragetrading-botrpcswqoslow-latencymev

Most arbitrage bots on Solana don't lose money to bad logic. They lose to the gap between "I detected the opportunity" and "my transaction landed." That gap is almost always RPC and validator-side mechanics, not the trading code. If you're building a bot — or you've built one and the numbers aren't lining up — this is the part of the stack that's usually doing the most damage to your P&L.

This piece walks through what actually makes a Solana arbitrage bot profitable, how the RPC layer affects you, and what to look at when you're debugging a bot that should be working but isn't.

What Solana Arbitrage Actually Looks Like

The textbook definition is: same asset, different price across two markets, take the spread. On Solana that usually means token X has different prices on Raydium and Orca, or across a Jupiter route and a direct AMM swap. The bot detects the divergence and submits a swap path that captures the difference.

The implementation reality is messier. By the time you've detected the opportunity, computed the path, and submitted the transaction, the price has often already moved. Solana's block time is fast enough that the half-life of an arbitrage opportunity is sometimes a single slot. That's why latency matters so much more here than in something like a buy-and-hold bot.

The Three Parts of a Solana Arbitrage Bot

If you strip the architecture down, every working bot has three components:

1. Market data ingestion. You need real-time pool state — reserves, fees, tick liquidity for concentrated AMMs. Most teams either consume RPC streaming subscriptions or poll RPC accounts. Polling is simpler; streaming is faster but more work to set up correctly.

2. Path computation. Given current state, where is the opportunity? Two-hop is the easiest case. Multi-hop through Jupiter routes is where the harder math is, but also where the harder competition is.

3. Transaction submission. This is where most bots quietly bleed. You computed a profitable path; getting that transaction landed before the opportunity disappears is a different problem.

People who are new to this overweight (1) and (2). People who have actually run bots in production overweight (3).

If you already know submission is where your bot is bleeding and just want to test a different path, a free BoltTx key takes one line to wire in. Otherwise, keep reading — the diagnosis matters more than the fix.

Why the RPC Layer Decides Your P&L

Once you've identified an opportunity, your transaction is racing. Other bots saw the same signal. The first to land captures most of the spread; everyone else either loses money on fees or eats slippage on a price that's already moved.

The properties that matter at this stage:

A "fast" RPC that has good averages but degrades at the 95th percentile during congestion is, for an arbitrage bot, indistinguishable from a slow RPC. The opportunities you're chasing are exactly the ones happening during congestion.

Common Failure Modes

Things we've seen actually kill bot P&L, in rough order of frequency:

Transaction not landing in time. You submitted; by the time a slot included it, the path was no longer profitable. Symptom: a lot of "successful" transactions with negative or near-zero profit.

Sandwiched. A bot front-ran your swap, you executed at the inflated price, they back-ran. Symptom: profitable in dry-run, breakeven or worse in production.

Stale state. You detected the opportunity using state that was already a slot or two old. By the time you submitted, the AMM had already been rebalanced. Symptom: a lot of failed transactions due to slippage limits.

Compute unit exhaustion. Multi-hop routes through concentrated AMMs eat compute. The classic offenders are Raydium AMM v4 (sometimes searched as just "raydium v4"), Raydium CLMM, and Orca Whirlpool. If you under-budget CUs, the swap fails partway. Symptom: ~200k CU transactions failing where ~300k would have succeeded. Also factor in raydium fees (and the equivalent on whatever DEX you're routing through) when sizing position economics.

Blockhash expiry under retry. You retried too many times with the same blockhash; by the third retry it was expired. Symptom: transactions silently dropping after retries.

The first two — landing time and sandwiching — are RPC-layer problems. The rest are bot-side, but they amplify the RPC problems.

Priority Fee and Jito Tip Strategy: Higher Isn't Always Better

The two levers that get your transaction prioritised on Solana are the on-chain priority fee and the optional Jito tip. The naive strategy is "always max it out." This doesn't work for arbitrage bots because:

  1. The expected value of paying max on every attempt rarely beats paying it only when the opportunity justifies it.
  2. Bidding aggressively on every attempt makes your P&L noisier — you eat the priority fee on losing attempts too.
  3. There's a ceiling effect. Once you've outbid the second-place bot, additional fee is wasted.

A better strategy: adjust the priority fee dynamically based on expected profit. If the spread is large, bid aggressively. If it's marginal, bid just above the floor and let the trade fail if it doesn't land cheaply. This requires knowing where the floor is — which means you need real-time priority fee telemetry.

What to Do This Week If You're Bot Building

A short, practical sequence for someone who has the trading logic working and is debugging the execution stack:

  1. Measure your end-to-end submission latency. From sendTransaction to "transaction landed in slot N." If you don't have per-signature telemetry, you can't fix this.
  2. Audit your tail behaviour. What does P95 look like during peak hours? If it's worse than during off hours, you have an RPC capacity problem.
  3. Check for sandwich exposure. Compare your AMM-math expected output against actual fills. The gap is your sandwich tax.
  4. Profile compute unit usage. Multi-hop swaps frequently under-budget CU. Test with realistic worst-case routes.
  5. Don't tune retries up. Past two retries you're usually expiring blockhashes. Retries are a band-aid for a slow submission path; fix the path.

If you've done all five and your bot is still bleeding on execution, the question is whether your RPC layer is actually built for this workload. Most general-purpose Solana RPCs are not.

What BoltTx Does for Arbitrage Bots

BoltTx is built for transaction-sending workloads where the difference between landing in slot N and slot N+1 is real money. Specifically:

Drop-in integration is one URL change:

import { Connection } from "@solana/web3.js";

const connection = new Connection(
  "https://bolttx.io/?api-key=YOUR_API_KEY",
  "processed"
);

const signature = await connection.sendTransaction(tx, signers, {
  skipPreflight: true,
  maxRetries: 0,
});

Run a week of real bot traffic against the free tier and compare your landing rate, your sandwich exposure, and your P95 confirmation latency against your current setup. The data is the answer.

FAQ

What's the minimum spread an arbitrage bot needs to be profitable? Depends on your fee structure, your priority fee strategy, and how often the path is contested. Marginal bots target 30-50 basis points; serious ones target much wider spreads on less-watched pairs. The execution stack determines what spread you can actually capture.

Should I run my own validator for arbitrage? For most teams, no. The operational cost is high and the validator-side income is uncorrelated with arbitrage P&L. A managed RPC with strong SWQoS support gets you most of the benefit without the ops burden. See our enterprise guide for the full reasoning.

How does BoltTx compare to running my own RPC node? Self-hosting a Solana RPC node for arbitrage is operationally expensive — bare metal, NVMe, multi-gig uplinks, 24/7 ops. Most teams that try it walk it back within a year. A managed RPC with the right architecture is dramatically more cost-effective per landed transaction.

Does Anti-MEV protection slow down my transactions? On the path BoltTx uses, no. The protection is at the routing layer, not an extra confirmation step. Your transactions go through a non-observable path; speed is unchanged.

What about multi-hop arbitrage routes? Same principles, more compute units, and more places for the path to break under price movement. Budget your CU realistically (test with worst-case prices) and keep your blockhash fresh.

Why does my arbitrage bot detect opportunities but never land the trade? Detection and execution are separate problems. If the path was profitable when you saw it and gone when you submitted, the gap is submission latency plus landing probability. Log the slot at detection and the slot where the transaction landed. If that gap is more than two slots, execution is where you are losing.

Where do I find a faster Solana relay for arbitrage? Look for a path built for sending rather than a general-purpose RPC that also forwards transactions. What matters is stake weight behind the forwarding node, geographic proximity to your bot, and behaviour under congestion. Average latency on a quiet afternoon tells you nothing.

How do I make my Solana transactions land faster? Four levers, in order of impact: derive the priority fee from live conditions rather than hardcoding it, fetch the blockhash immediately before signing, retry continuously until expiry instead of once, and route through a submission path with meaningful stake behind it.

Why is my arbitrage bot losing money on every trade? The usual cause is fees exceeding the captured spread. Add up base fee, priority fee, and any tip across both legs, then compare against your realised spread. Marginal opportunities are often net-negative once you count failed attempts that still paid a base fee.

What RPC do professional Solana arbitrage bots use? Most run a split: a general-purpose provider for reading pool state, and a delivery-focused endpoint for sending. The two workloads want opposite things. Reads want throughput and history; sends want a short path to a block producer.

How many slots do I have to capture an arbitrage opportunity? Usually one to two before the price moves or someone else takes it. That is why median latency matters less than consistency. A path that is usually fast but occasionally slow will miss exactly the contested opportunities you were chasing.

Should I run multiple bots against the same pools? It rarely helps. You compete against yourself for the same block space, and both instances pay fees. Making one bot's submission path faster generally beats splitting attention across several.

Does a higher priority fee guarantee my arbitrage lands first? No. It improves scheduling position once your transaction reaches a validator, but it does not affect whether it arrives in time or gets accepted under congestion. Fee is one factor of four.

How do I test whether a new RPC actually improves my fill rate? Send alternating transactions through both endpoints for at least a week, bucketed by network condition, then compare landing rate and realised slippage. Testing only during calm periods measures the case where every path performs identically.

Why do my arbitrage transactions fail with slippage errors? The price moved between quote and inclusion. Widen tolerance slightly, or shorten the time between quote and submission. If it happens mostly under load, the delay is in your submission path rather than your slippage setting.

Is Solana arbitrage still profitable in 2026? On heavily-watched pairs, margins are thin and competition is fast. Less-contested pairs and newer pools still have room. The deciding factor is usually execution speed rather than strategy sophistication.

What is the difference between arbitrage latency and RPC latency? RPC latency is the round trip to your endpoint. Arbitrage latency is the full path from detecting the opportunity to the transaction being in a block. The second determines your P&L, and it includes hops your RPC metrics never show.

Further Reading

← Back to all posts