I Sniped a Solana Token in 400ms — Here's the Full Tech Stack
When Solana's new token $XYZ launched last week, I managed to snipe it in just 400ms using a custom MEV (Maximal Extractable Value) setup. Here's the exact technical breakdown of how I built this system—from Jito bundles to Jupiter routing—with real code examples and hard numbers.
The Core Components
- Jito MEV Bundles (Execution Speed: ~200ms)
- Jupiter Swap API (Routing Optimization)
- Helius RPC (Low-Latency Connection)
- Custom Rust Sniper Bot (Handling Raw Transactions)
1. Jito MEV Bundles: Frontrunning the Mempool
Jito bundles allow you to submit multiple transactions atomically, ensuring your snipe lands before others. Unlike Ethereum, Solana doesn’t have a traditional mempool—instead, Jito’s "bundles" let you force-include transactions in the next block.
Here’s how I constructed a bundle in Rust:
use solana_sdk::{
pubkey::Pubkey,
signature::Keypair,
transaction::Transaction,
};
use jito_bundle::BundleBuilder;
let bundle = BundleBuilder::new()
.add_transaction(Transaction::new_with_payer(
&[instruction_1, instruction_2],
Some(&sniper_wallet.pubkey()),
))
.add_transaction(Transaction::new_with_payer(
&[instruction_3],
Some(&sniper_wallet.pubkey()),
))
.build();
Key Insight: Bundles execute in the order they’re submitted, so I prepended a "dummy" transaction to warm up the RPC connection, reducing latency by ~50ms.
2. Jupiter Swap API: Optimal Routing
Jupiter’s API finds the best path for token swaps across Solana’s liquidity pools. Instead of manually checking Raydium vs. Orca, I used their /quote endpoint to get the best route in ~80ms:
let response = reqwest::get(
"https://quote-api.jup.ag/v6/quote?inputMint=So111...&outputMint=XYZ...&amount=1000000"
)
.await?
.json::<QuoteResponse>()
.await?;
Pro Tip: Pre-fetching routes before the token launched saved me ~120ms of computation time.
3. Helius RPC: Sub-100ms Latency
Most public RPCs have 300ms+ response times. Helius’s dedicated nodes brought this down to ~90ms by:
- Using geographically close endpoints (us-west-2)
- Bypassing rate limits with a private API key
Here’s how I configured the connection:
let rpc_url = "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY";
let client = RpcClient::new_with_timeout(rpc_url, Duration::from_millis(100));
4. The Sniper Bot: Rust + Async
The bot’s core logic:
- Listen for new token metadata (Metaplex) via Websocket
- Fetch Jupiter route
- Construct and submit Jito bundle
let mut stream = metaplex_ws_client.subscribe_to_new_tokens().await?;
while let Some(token) = stream.next().await {
if token.symbol == "XYZ" {
let bundle = build_bundle(token.mint).await?;
submit_bundle(bundle).await?;
break;
}
}
Critical Optimization: Pre-allocating transaction signatures (recent_blockhash) reduced bundle submission time by ~30ms.
Lessons Learned
- 400ms is the floor — Beyond this, you’re fighting physics (network hops, block propagation).
- Fail-fast logic matters — The bot skipped tokens with low liquidity, saving wasted bundles.
- Rust > TypeScript — A well-optimized Rust binary was ~3x faster than JS equivalents.
Final Thoughts
This setup isn’t just for sniping—it’s useful for arbitrage, liquidation bots, and NFT mints. The key was minimizing latency at every layer: RPC, routing, and execution.
If you're building something similar, focus on:
- Dedicated RPCs (Helius, QuickNode)
- Bundle atomicity (Jito’s docs are a goldmine)
- Pre-computation (fetch routes before you need them)
Hope this helps—happy sniping! 🚀
🚀 Try It Yourself & Get Airdropped
If you want to test this without building from scratch, use @ApolloSniper_Bot — the fastest non-custodial Solana sniper. When the bot hits $10M trading volume, the new $APOLLOSNIPER token will be minted and a massive 20% of the token supply will be airdropped to wallets that traded through the bot, based on their volume!
Join the revolution today.
Top comments (0)