Back to simulator
MEV protection guide

Ethereum MEV Protection: Flashbots, MEV Blocker & Private RPCs

Ethereum has the deepest DEX liquidity and the most sophisticated MEV ecosystem. This guide explains how MEV protection works on Ethereum, compares Flashbots Protect, MEV Blocker, and private RPCs, and shows how private relays neutralize sandwich bots before they can touch your swap.

What is MEV protection?

MEV protection is the practice of submitting your Ethereum transaction in a way that hides it from public MEV searchers. Most sandwich bots operate by watching the public mempool, identifying profitable swaps, and bracketing them with a front-run buy and a back-run sell. If your transaction never reaches the public mempool, the bot never gets the chance.

On Ethereum, the three most common MEV protection tools are Flashbots Protect, MEV Blocker, and custom private RPCs. Each routes your swap through a private relay or a trusted set of block builders instead of broadcasting it openly.

How a sandwich bot attacks your swap

When you submit a swap to a public RPC like the default MetaMask endpoint, the transaction sits in the public mempool for a few seconds before a block is mined. During that window, MEV searchers run algorithms that detect trades with generous slippage tolerance. The attack sequence is:

  1. Front-run. The bot buys the same token you're about to buy, pushing the pool price up.
  2. Victim swap. Your trade executes at the worse price, because the pool balance has already moved against you.
  3. Back-run. The bot sells the tokens it bought in step 1, taking the price difference as profit — profit that came from your slippage.

The entire attack is profitable only if the bot can see your transaction before it is mined. MEV protection removes that visibility.

Flashbots Protect

Flashbots Protect is the original private relay for Ethereum. It gives wallets and users a private RPC URL that forwards transactions directly to Flashbots's network of block builders rather than to the public mempool.

Why it works
  • Private mempool. Your transaction is not visible to searchers until it is included in a block.
  • Atomic bundle. The swap is submitted as part of a builder bundle, making it harder to sandwich.
  • Configurable priority fee. You can add a builder tip to incentivize inclusion without exposing the trade.

Flashbots Protect is free to use, but you still pay normal gas. Adding a priority fee or builder tip improves the chance of fast inclusion, especially during congestion.

MEV Blocker

MEV Blocker is a private RPC built by CowSwap, Gnosis DAO, and other partners. Like Flashbots, it routes your transaction to a set of trusted block builders instead of the public mempool. Its key differentiator is that it may return a portion of the MEV your transaction creates back to you as a refund.

What MEV Blocker adds
  • Multi-builder reach. Submits to several competitive builders to maximize inclusion speed.
  • MEV refunds. If your transaction creates back-running MEV, part of it can be refunded to you instead of captured by searchers.
  • Simple RPC setup. A single RPC URL that many wallets and aggregators can use directly.

Private RPCs

Beyond Flashbots and MEV Blocker, many wallets, DEX aggregators, and infrastructure providers operate their own private RPCs. These endpoints work on the same principle: they keep your transaction out of the public mempool until it is safely inside a block.

When to use a private RPC
  • Your wallet or aggregator does not integrate Flashbots or MEV Blocker natively.
  • You want an extra layer of privacy for large or high-slippage trades.
  • You are building a dApp and want to bundle MEV protection into the user experience.

The tradeoff with any private RPC is trust: you are relying on the RPC operator and its builder partners not to leak or exploit your transaction. Established providers like Flashbots and MEV Blocker have strong incentives to protect users because their reputation depends on it.

Comparison: Flashbots, MEV Blocker, Private RPC

Property Flashbots Protect MEV Blocker Private RPC
Public mempool exposureNoneNoneNone
Inclusion methodPrivate relay + builder networkMultiple buildersProvider-specific builders
CostFree (gas + optional tip)Free (gas + optional tip)Usually free
MEV refundNoYes (possible)Depends on provider
Best forGeneral Ethereum swapsSwaps that may create back-run MEVWallets without native MEV protection
Trust modelOpen-source relayDAO-aligned buildersProvider reputation

How private relays neutralize sandwich bots

A private relay is the central defense mechanism shared by all three options. Instead of gossiping your transaction to every node in the network, including the nodes run by MEV searchers, the relay sends it only to a curated set of block builders. Those builders include it in a block, and only then does it become public knowledge.

Because the sandwich bot never sees the pending transaction, it cannot compute the expected profit of a front-run/back-run attack. By the time the block is proposed, your swap is already locked in place, surrounded by whatever transactions the builder chose — not by the bot's chosen bracket.

FAQ

What is MEV protection on Ethereum?

MEV protection on Ethereum is a set of tools and transaction submission methods that prevent Maximum Extractable Value (MEV) bots — especially sandwich bots — from seeing and exploiting your DEX swap before it is mined. Common protections include Flashbots Protect, MEV Blocker, and private RPC endpoints.

How does Flashbots Protect work?

Flashbots Protect routes your Ethereum transaction through a private relay instead of the public mempool. Block builders receive your swap privately, so mempool searchers cannot spot it to front-run or sandwich it. You pay a small builder tip, and the transaction is included atomically in a block.

What is MEV Blocker?

MEV Blocker is a private RPC developed by CowSwap, Gnosis, and others that sends your transaction to a network of trusted block builders. It protects against sandwich attacks and front-running, and can refund part of the MEV your transaction creates back to you.

What is a private RPC on Ethereum?

A private RPC is a custom RPC endpoint that does not broadcast your transaction to the public mempool. Instead, it forwards it directly to selected block builders or relays. This hides the transaction from MEV searchers until it is included in a block.

How do private relays stop sandwich bots?

Sandwich bots monitor the public mempool for pending swaps. Private relays never expose your transaction to that mempool, so the bots have no opportunity to insert a front-run buy before your swap or a back-run sell after it.

Is Flashbots Protect free?

Flashbots Protect itself is free to use, but you still pay normal Ethereum gas fees and any priority fee or builder tip you attach. The tip is optional but increases the chance your transaction is included quickly by a builder.

Is MEV Blocker better than Flashbots?

MEV Blocker and Flashbots Protect both hide your transaction from the public mempool. MEV Blocker additionally distributes transactions to multiple builders and may refund MEV refunds. Flashbots is the older, more widely integrated private relay. The best choice depends on your wallet and aggregator support.

Can I use MEV protection on any wallet?

Many wallets and aggregators now integrate private RPCs or Flashbots Protect automatically. If your wallet lets you set a custom RPC, you can point it to a private RPC URL like the Flashbots Protect RPC or MEV Blocker RPC. Otherwise, use a wallet or DEX aggregator that includes MEV protection by default.

Does MEV protection guarantee zero slippage?

No. MEV protection prevents bots from exploiting your slippage, but it does not remove normal AMM price impact or market volatility. Your swap still moves the pool price based on its size relative to the liquidity available.

What is a sandwich bot on Ethereum?

A sandwich bot on Ethereum watches the public mempool, places a buy order just before a large swap to push the price up, executes the victim's swap at the worse price, then sells immediately after to capture the victim's slippage as profit.

Try the Ethereum MEV simulator

Open the simulator, switch to Ethereum, and toggle Flashbots or MEV Blocker protection to see how a sandwich bot would affect your Uniswap swap.