Nitride.xyz
Use case · Updated November 17, 2026

Shreds for Solana arbitrage

Nitride.xyz team

An arbitrage bot on Solana earns from price gaps between pools, order books and centralized venues, gaps that often close within a few slots. Shreds let the bot see the swaps that open or close a gap while the leader is still producing the block. For contested gaps, Ultra Low Latency Shreds is usually the plan to test.

What kinds of arbitrage run on Solana?#

Three shapes cover most of it:

  • Atomic DEX arbitrage. A cycle of swaps across two or more pools, packed into one transaction that either profits or reverts. The bot keeps a graph of pools and their reserves, and searches it for cycles that return more than they cost after fees.
  • Backruns. A large swap pushes one pool away from the others. The bot trades the pool back towards the market price in the same block or the next one.
  • CEX and DEX arbitrage. Buying on a centralized exchange while selling into a Solana pool, or the reverse, with the exchange leg acting as the hedge. Inventory and transfer timing matter as much as speed.

All three depend on two things: knowing the state of the pools before your competitors do, and landing your transaction before the gap closes. A shred feed helps with the first. It does nothing for the second, which is decided by your send path, your priority fee and the leader. For the wider picture of ordering and bundles, see the searcher's view of MEV.

Which shred signals move an arbitrage bot?#

A shred is a piece of the block in progress. After decoding, the arbitrage bot reads four signals out of it:

  • Swaps through pools in your graph. Match program ids and pool accounts in each transaction. Then apply the swap to your local copy of the pool's reserves. Shreds hold the instruction, not the result, so this is an estimate: the input amount and minimum output are in the instruction data, and the real output depends on everything placed before it in the block.
  • Competing arbitrage transactions. When another bot's cycle over the same pools appears in the block, your opportunity is probably gone. Stop sending, and save the fee.
  • The leader for the next slots. The leader schedule (from the getLeaderSchedule RPC method) tells you which validator produces each slot, and so where your transaction should go. The guide to slots and leaders covers how the rotation works.
  • Slot age. Out-of-order UDP means some shreds arrive for slots well behind the newest one. Those are useful for keeping reserves right, and useless as trade triggers.

This is the part of a Solana arbitrage data feed that RPC cannot match on timing: by the time an RPC node reports the swap, it has executed the whole block, and the bots reading shreds have already reacted.

Ultra or Standard for arbitrage?#

For contested arbitrage, Ultra. Ultra Low Latency Shreds costs $200 for one destination for 30 days and goes directly from our server to yours with no relay hop, so it reaches you sooner than Standard. Atomic cycles on liquid pairs and backruns of large swaps are races where several bots see the same gap. Removing a relay hop is an improvement you buy rather than build.

Standard is the honest choice in three cases. Standard Shreds costs $100 for one destination for 30 days, delivered through our relay, with the same shreds as Ultra:

  1. Long-tail pools with few competitors, where the gap stays open long enough that the hop does not decide the outcome.
  2. CEX and DEX strategies where the centralized leg dominates the timing.
  3. Bots still in observation mode, while you build the decoder and the pool model.

Both plans leave from Frankfurt, so the distance from that city to your bot counts on every trade, whichever plan you pick. Our post on why we deliver from Frankfurt covers the reasoning.

We publish no latency figure. The test that matters is your own: run the bot in observe mode and log, for each gap it would have traded, whether the gap was still open when its decoder saw the swap. Run that on each plan and compare. The full comparison of Ultra and Standard explains the two delivery paths.

A Node.js receiver that skips stale slots#

This receiver keeps the main event loop light. It reads the slot (a little-endian u64 at offset 65, 8 bytes) and the FEC set index (a u32 at offset 79, 4 bytes), tracks the newest slot it has seen, and hands shreds to a worker thread that runs your decoder and pool model. Shreds for slots far behind the newest one are marked so the worker uses them for state only.

arb-receiver.mjs
1import dgram from "node:dgram";
2import { Worker } from "node:worker_threads";
3
4// decoder.mjs is your code: FEC recovery, entry parsing, pool model, route search.
5const decoder = new Worker(new URL("./decoder.mjs", import.meta.url));
6const sock = dgram.createSocket({ type: "udp4", recvBufferSize: 16 * 1024 * 1024 });
7
8const STALE_SLOTS = 2n;
9let tip = 0n;
10
11sock.on("message", (msg) => {
12 if (msg.length < 83) return; // shorter than the common header
13 const slot = msg.readBigUInt64LE(65);
14 const fecSet = msg.readUInt32LE(79);
15 if (slot > tip) tip = slot;
16 const tradable = tip - slot <= STALE_SLOTS;
17 decoder.postMessage({ slot, fecSet, tradable, shred: msg });
18});
19
20sock.on("error", (err) => {
21 console.error(err);
22 sock.close();
23});
24
25sock.bind(9000);

Two choices in the sketch matter for arbitrage. The stale threshold separates reserve updates from trade triggers: a swap from three slots ago has already been arbitraged by someone, but your pool model still needs it. The worker thread keeps decoding off the event loop, so a burst of shreds never delays the next message event. Set STALE_SLOTS from your own logs, not from this example. The Node.js receiver page has a complete program that prints the header fields, which helps when you first check delivery.

Where do shreds fall short for arbitrage?#

  • Seeing is not landing. The feed is receive-only. Profit depends on getting your transaction to the right leader with the right fee, which no shred feed does for you.
  • Missing swaps corrupt your reserves. Raw UDP drops packets with no retransmission. If a swap sits in a shred that coding shreds cannot rebuild, your pool model drifts. Refresh reserves from RPC account reads on a schedule, and whenever a gap appears.
  • No execution results. A swap you saw may have failed on slippage. Trading on its estimated effect means trading on a gap that never existed. Simulate before you send.
  • Provisional blocks. Shreds are pre-confirmation data. A fork can drop a block, or a slot can be skipped, taking the swap you reacted to with it.
  • You decode. Nothing is decoded on our side.
  • Frankfurt is the only origin. If the venues you trade against are served from another continent, the route to your bot matters more than the plan.

Where to go next#

Arbitrage shares a lot with quoting strategies for market makers and with liquidation bots that race for underwater positions. The use cases hub lists every workload, and the pricing page shows both plans side by side.

Does the feed send my arbitrage transactions?#

No. The feed is receive-only: we send shreds to your destination over UDP. Your bot submits transactions through its own send path.

Can I run arbitrage on shreds without an RPC node?#

Not reliably. You still need RPC, or another confirmed source, to load pool accounts, refresh reserves after gaps, fetch the leader schedule and send transactions.

Can I try Ultra before paying for it?#

Each plan has a free 2-hour trial, once per person. Email support@nitride.xyz with the IPv4 address and UDP port you want to test. We verify you receive on that address, then your 2 hours start.

What if my bot misses packets?#

They are gone: raw UDP has no retransmission and missed shreds cannot be requested again. Rebuild what you can from coding shreds and resync the rest from RPC.

Where should my arbitrage server be?#

As close to Frankfurt as you can manage, since both plans are sent from there. A distant server adds route delay that neither plan can remove.

Sources#