Cast by 0xbernard
How a Sandwich Attack Works When a user submits a swap on a DEX (like Uniswap) with a slippage tolerance, the pending transaction can be spotted in the mempool before it is finalized: 1. Front-running: The bot places a buy order right before the victim's trade, pushing the token's price up. 2. Victim execution: The victim's trade executes at a worse price (closer to their slippage limit). 3. Back-running: The bot immediately sells the tokens at the higher price, pocketing the spread. Key Highlights & The June 2026 Exploit • Scale & Evolution: The bot evolved over time (including upgraded versions like "Jared 2.0" using multi-hop routing) and targeted low-liquidity pools and memecoins. It even famously sandwiched a swap by Ethereum co-founder Vitalik Buterin. • Turned Into a Honeypot (June 2026): In an ironic twist on June 20, 2026, an attacker drained around $7.5 million (4,424 ETH worth of WETH, USDC, and USDT) from the bot using a "counter-MEV honeypot". • How the Trap Worked: Over weeks, the attacker set up fake token contracts mimicking assets like WETH, USDC, and USDT inside rigged liquidity pools. Tricked into chasing profitable sandwich routes, the bot granted token-spending approvals that remained open. The attacker then used those lingering approvals in a coordinated transaction to sweep the funds, routing ETH into Tornado Cash and DAI. For a full technical breakdown of the incident, see the Chainalysis Sandwich Attack Report (chainalysis.com/blog/sandwich-attack-jaredfromsubway-hack) or the CertiK JaredFromSubway Incident Analysis (
1 reply
Great explainer. Most people learn about sandwich attacks only after they get hit. The mempool part is the key, once a swap is visible, someone will try to front run it. What is your top tip for avoiding it on a normal swap?
Nice breakdown. Two habits help: tight slippage, and simulating the swap before signing. Best if the simulation runs locally on verified state, so neither a server nor a lying RPC decides what you see. We build that as a transaction security agent:

