Skip to content

⚡High-performance Solana sniper bot built in Rust with Helius RPC and Yellowstone gRPC. Detects new tokens, pools, and liquidity events in real time, then executes trades with ultra-low latency using dynamic priority fees, secure key management, and configurable profit/risk settings

Notifications You must be signed in to change notification settings

bogardt/sniper-bot-solana-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Solana Sniper Bot

CI Rust async Solana 1.18 Made with ❤

✨ Solana Sniper Bot (Rust) — Yellowstone gRPC + Helius Sender

Solana Sniper Bot is a lightning‑fast copy‑trading / MEV engine that mirrors Pump.fun launches and whale transfers in under 150 ms.
Mempool via Yellowstone gRPC ➜ atomic Jito bundles ➜ dynamic TP / SL.


A high-performance sniper bot for Solana that:

  • Streams blockchain data in real-time via Yellowstone gRPC, using Solana's Geyser plugin for ultra-low latency data. :contentReference[oaicite:1]{index=1}
  • Submits transactions using Helius Sender, which dual-routes to validators and Jito to maximize inclusion speed. :contentReference[oaicite:2]{index=2}
  • Persists metrics/signals to MongoDB for analytics and observability.

💬 Table of Contents

  1. Architecture
  2. Prerequisites
  3. Installation & Running Instructions
  4. Streaming Data: Yellowstone gRPC
  5. Fast Transaction Submission: Helius Sender
  6. Observability & Database
  7. Security & Best Practices
  8. Troubleshooting
  9. References

❤ ## Architecture


\[ Yellowstone gRPC Stream ]
↓
\[ Rust Bot Logic ]
↓ (signed tx)
\[ Helius Sender API ]
↓
Solana Network

     ↓
[ MongoDB Logging ]

  • Yellowstone gRPC provides real-time streaming of slots, account updates, transactions, blocks—all with minimal delay. :contentReference[oaicite:3]{index=3}
  • Helius Sender submits your signed transactions to both Solana validators and the Jito network concurrently, improving the likelihood of fast inclusion. It's free and high-throughput. :contentReference[oaicite:4]{index=4}

Prerequisites

  • Rust (stable toolchain)
  • MongoDB instance accessible via connection string
  • Helius API Key (for RPC access + Sender usage)
  • Yellowstone gRPC endpoint & token (provided by your RPC provider, e.g., QuickNode, Helius, Shyft)

🏗 Installation & Running Instructions

  1. Clone the repository and add your .env file.
  2. Install Rust and ensure cargo is in your PATH.
  3. (Optional) Install and run MongoDB locally or via Docker:
# on macOS
brew services start mongodb-community
  1. Build the bot:
cargo build --release
  1. Run the bot:
cargo run "token_creator_wallet_address"

You can override RUST_LOG in .env or command line.


🚀 Streaming Data: Yellowstone gRPC

  • Provides ultra-low latency real-time streaming of Solana data: accounts, transactions, slots, blocks. (Helius, QuickNode, QuickNode, Chainstack, Helius)
  • Supports advanced filtering by program ID, accounts, transaction types. (Helius)
  • Use LaserStream (recommended for reliability/backfill) or Dedicated Nodes based on load. (Helius)
  • Implement auto-reconnect, ping keepalive, and backoff for stability.

⚡ Fast Transaction Submission: Helius Sender

  • Helius Sender optimizes latency by simultaneously sending your transaction to validators and Jito. (Helius)
  • No API credits consumed; includes global HTTP endpoints. (Helius)
  • Requires a tip (≥ 0.001 SOL) to function efficiently. (Helius)
  • Build your transaction using ComputeBudgetProgram.setComputeUnitLimit/setComputeUnitPrice to tune priority fee.

📦 Observability & Database

  • Persist signals, actions, and errors to MongoDB for post-mortem and analytics.
  • Optional: add indexes (e.g., created_at, mint, program_id) and TTLs.
  • Log key metrics: send rate, latency, success/failure, priority fee values.

🛡 Security & Best Practices

  • Never commit your .env or private keys.
  • Use separate wallets for operations vs trading.
  • Include rate-limiting logic if hitting Helius quotas.
  • Regularly rotate tokens/keys and backup your database.

🌊 Troubleshooting

  • Streaming lag in JS clients: Node.js may lag under high throughput; Rust or Go handle streaming data more reliably. (Helius, Helius, Solana Stack Exchange)
  • Choosing compute units: Simulate to estimate limits, add ~10% headroom, and set price via Helius priority fee estimate API.
  • Yellowstone access: Get endpoint/token from your provider’s dashboard (QuickNode, Helius, Shyft, etc.). (QuickNode)

📄 References

  • Yellowstone gRPC Streaming: ultra-low latency streaming with filtering. (Helius)
  • Account / Transaction / Slot Monitoring using Yellowstone. (Helius)
  • Helius Sender API: dual-routing to validators & Jito, no credits required, priority tip. (Helius)
  • Data Streaming Options (LaserStream / WebSockets). (Helius)

💬 ## Community & Commercial Edition

  • Telegram → @bogardt
  • Discord → kama_92

Want the full ultra‑low‑latency engine? DM for single‑user licences (private repo + EULA).


License: MIT (demo edition). Commercial licence available for the full build.

About

⚡High-performance Solana sniper bot built in Rust with Helius RPC and Yellowstone gRPC. Detects new tokens, pools, and liquidity events in real time, then executes trades with ultra-low latency using dynamic priority fees, secure key management, and configurable profit/risk settings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published