Zk Shedy@ZkShedy
A Costly Lesson in Crypto: The $216k Sandwich Attack on Uniswap v3
Even a simple swap can turn into a nightmare. Here's what happened to one user who lost $216k while trying to swap $221k usdc to usdt on uniswap v3 and end ended up getting just $5k.
The user initiated the swap using the old uniswap v3 swap router (not the newer Universal Router) and, shockingly, set the slippage to 100%. This left the transaction wide open for exploitation.
Enter an MEV bot. It spotted the vulnerable transaction and quickly front-ran it by swapping out all the USDC liquidity, drastically skewing the price. After the user's transaction executed at the worst possible rate, the bot back-ran the trade by restoring the liquidity. The user lost $216k, while the attacker pocketed a cool $8k profit.
To make matters worse, the attacker tipped the block builder (bobTheBuilder) a staggering $200k to ensure their malicious transaction was included in the block.
The Takeaway:
Always use trusted interfaces like the official Uniswap interface, which suggests reasonable slippage settings. Avoid setting slippage to extreme values (like 100%) unless you absolutely know what you're doing. And remember, in DeFi, vigilance is your best defense.
Stay safe out there!