Why Most Crypto Bots Get Sandwiched (And How to Prevent It)
Patch your bots to use Jito bundles on Solana or Flashbots on Ethereum to cut sandwich attacks.
Patch your bots to use Jito bundles on Solana or Flashbots on Ethereum to cut sandwich attacks.
Summary
The article explains how sandwich attacks on Ethereum and Solana front‑run and back‑run user swaps, using a concrete example of a 1 ETH → DAI trade that loses ~50 DAI, and cites analysis of 1,000 attacks with a median profit of 0.8 % of transaction value. It identifies common bot mistakes—public mempool submission, no privacy, fixed gas prices—and shows how Jito bundles on Solana and Flashbots on Ethereum can mitigate attacks by executing atomic bundles in a private mempool, with Jito reducing sandwich rates by 92 % and Flashbots by 12 %. The article also discusses obfuscation techniques such as randomized delays, odd‑number gas prices, and splitting large swaps, and presents real‑world results from three bots over 30 days that demonstrate a dramatic drop in sandwich rates and profit improvements.
Key changes
- Sandwich attacks front‑run and back‑run swaps, costing ~0.8 % median profit.
- Jito bundles on Solana execute atomic bundles in a private mempool, cutting sandwich rates by 92 %.
- Flashbots on Ethereum use private RPC and bundle simulation, reducing sandwich rates to 12 %.
- Obfuscation techniques (randomized delay, odd gas prices, swap splitting) lower attack surface.
- Real‑world results: Public mempool 68 % sandwich rate, Jito 5 %, Flashbots 12 %, obfuscation only 45 %.
- Profit improvement: Jito +42 %, Flashbots +37 %, obfuscation +18 %.
- Atomicity and privacy are critical to reducing MEV exploitation.