Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana Jupiter Arbitrage Bot

Rust Solana

A high-performance Solana arbitrage bot written in Rust. It scans multi-leg routes across Jupiter-aggregated DEX liquidity, simulates each opportunity off-chain before risking capital, and executes profitable trades atomically through Jito bundles — built around low-latency data from Yellowstone gRPC.

Overview

The bot continuously monitors on-chain liquidity and looks for price discrepancies that can be captured across a closed loop of swaps (e.g. a 3-leg route that starts and ends in the same token). Before sending anything on-chain, every candidate route is simulated and cost-adjusted, so only opportunities that clear a configurable net-profit floor are executed. Execution is bundled and tip-escalated to survive a competitive MEV environment.

How it works

The pipeline runs in four stages:

  1. Ingest — Streams real-time account and pool updates over Yellowstone gRPC (Geyser) for minimal latency versus polling RPC.
  2. Scan & score — Builds candidate multi-leg routes across Jupiter-aggregated pools and scores each for potential profit.
  3. Simulate — Replays each swap leg off-chain, applies a slippage model, and deducts fee and tip costs. Routes that don't clear the configured net-profit floor are discarded.
  4. Execute — Packages the forward swap, backward swap, and Jito tip into a single atomic bundle, with a priority fee and Compute Unit budget tuned per route.

Features

  • Multi-venue route scanning — 3-leg route discovery across Jupiter-aggregated DEX pools.
  • Off-chain profit estimation — Each leg is simulated and cost-adjusted (fees + tip) before execution; only bundles above a net-profit floor are submitted.
  • Priority-fee oracle — Reads recent on-chain fee percentiles (p75) and auto-adjusts bids based on congestion and margin thresholds.
  • Dynamic Compute Unit budgeting — Profiles per-route CU requirements and sets exact ComputeBudget limits to reduce fee overpay while maximizing inclusion. Address Lookup Table (ALT) creations are batched to stay within per-transaction CU caps.
  • Atomic execution via Jito — Forward swap, backward swap, and tip submitted as one bundle, eliminating sandwich exposure on profitable routes.
  • MEV defense — Monitors competing bundles and applies a tip-escalation strategy to outbid adversaries while staying above profitability thresholds.

Tech stack

language     Rust
chain        Solana
routing      Jupiter API v6
execution    Jito (block-engine bundles)
data         Yellowstone gRPC (Geyser)

Getting started

⚠️ Verify the steps below against your actual code before publishing — env var names, commands, and config keys should match what the repo really uses.

Prerequisites

  • Rust toolchain (stable) — install via rustup
  • A Solana RPC endpoint with Yellowstone gRPC access
  • A Jito block-engine endpoint
  • A funded Solana wallet keypair

Installation

git clone https://github.com/jenish-25/solana-Jupiter-Arb-bot.git
cd solana-Jupiter-Arb-bot
cargo build --release

Configuration

Create a .env file (or adjust to however your code loads config):

RPC_URL=                 # your Solana RPC endpoint
GRPC_ENDPOINT=           # Yellowstone gRPC endpoint
JITO_BLOCK_ENGINE_URL=   # Jito block-engine URL
WALLET_KEYPAIR_PATH=     # path to your wallet keypair
MIN_NET_PROFIT=          # net-profit floor below which routes are skipped

Running

cargo run --release

Configuration notes

A few tuning parameters worth surfacing (defaults based on testing — adjust to your conditions):

  • CU budget — simulated usage plus a safety buffer, to avoid both overpay and inclusion failures.
  • Priority fee — set around the p75 recent-fee percentile to balance landing rate against cost.
  • Net-profit floor — minimum expected profit (after fees and tip) required to submit a bundle.

Disclaimer

This software interacts with live markets and can lose funds. It is provided for research and educational purposes. Run it at your own risk, test on devnet first, and never deploy with capital you can't afford to lose.

About

A high-performance Solana arbitrage bot built in Rust, leveraging Jupiter, Jito Bundles, and Yellowstone gRPC for low-latency quote generation, route optimization, and atomic trade execution across multiple DEXs.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages