yaml style: blog status: draft generated_at: 2026-01-25T12:00:00Z Smart contract sandwich attack prevention is a core design goal of Immute, a bonding‑curve reward token live on the Sepolia testnet. By introducing a per‑address mutual‑exclusion mechanism, Immute makes it impossible for any single wallet to execute a buy‑followed‑by‑sell (or sell‑followed‑by‑buy) inside the same block, thereby neutralising the classic front‑run‑buy / back‑run‑sell pattern that plagues AMM‑style DEXes. This article dissects the attack vector, explains the logic behind the isLocked() and lockedUntil() primitives, and shows how the contract enforces the lock at the EVM level. What Is a Sandwich Attack? A sandwich attack is a form of maximal‑extractable value (MEV) exploitation that relies on ordering two transactions around a victim trade in a single block: Front‑run buy – the attacker sees a pending large buy and places his own buy just before it, pushing the curve price up. 2.…