MEV and Sandwich Attacks on EVM: A Definitive Guide to Security

“Frontrunning on EVM is the practice of watching blockchain transactions in order to gain an advantage. It occurs when someone watches a transaction being broadcast to the network, and then quickly submits their own transaction before the original is mined, thus allowing them to benefit from the original transaction.” - In other words, MEV bots use your maximum slippage to their benefit, and slurp your money.

How to protect yourself from this?

Use an anti-MEV RPC so your transactions are not visible in the mempool, thus preventing your TX from getting sandwiched.

Some generic best practices:

  • Minimizing the slippage can help prevent MEV from profiting off your transactions.
  • If you swap large amounts, you can use CowSwap - why?
  • Try to use DEX aggregators
  • :warning: Use a private MEV RPC

:brain: Here are some alternative, private RPCs you could use:

Anti-MEV RPC providers




From the CowSwap team.

Eden Network

RPC Frontrunning Protection Transaction Speed
Eden RPC Guaranteed :white_check_mark: Fast :racing_car:
Eden Rocket RPC Best Effort :muscle: Faster :rocket:

Maestro Telegram Bot

@MaestroSniperBot has a build-in Anti-MEV feature for ETH.

Why is MEV’ing possible?

This is possible on the Ethereum blockchain because the network is open and all transactions are publicly visible. This practice can be used to manipulate the market by taking advantage of the opportunity to gain profits or prevent losses before other market participants."

I want to know more!