0%
Overview page background

What is Maximum Extractable Value and MEV Protection?

Max's headshot

Written by Max Crawford

Published on January 5, 20268 min read

A lock with "MEV" on it

Most permissionless blockchains (like Bitcoin and Ethereum) are transparent. That transparency is a strength but one that also invites actors who can take advantage of what they can see in the mempool (the "pool" of transactions waiting for validation from a node before being permanently included in a block).

And since a block producer is free to include transactions from the mempool into the next block in any order, they are able to manipulate transaction inclusion/exclusion for profitability.

When building DEXs, vaults, or pretty much any price sensitive system, MEV becomes a real design constraint. MEV protection frameworks disallow profiting out of unfair transaction manipulation.

What is MEV and MEV Protection?

MEV, short for “Maximum Extractable Value,” is the most value someone (called a MEV-Extracting Entity or MEE) can extract out of a block by reordering, inserting, or censoring transactions during block production. Note that this value is in addition to the standard block reward and gas fees that miners or validators collect.

You can think of MEV as a “hidden tax” on a user’s trade. MEEs can tactically manipulate transactions in a block such that the user gets less value from the trade than expected and pocket the difference (arbitrage).

The image above shows the total profit made by MEEs between December 8, 2025 and January 6, 2026. The sum comes up to almost $24M in 30 days, and that’s just on Ethereum.

That is why protecting against MEV is crucial.

MEV protection” is any strategy or mechanism (like using private mempools) that protects users and developers from harmful transaction manipulation by miners or validators who manipulate transaction ordering in a block for extra value.

MEV directly affects how your app works in production. When unprotected from MEV, users experience very high slippage and failed transactions. Over time, this degrades trust. Users assume the routing is poor, the pricing is inaccurate, or the product is unsafe, even when the protocol itself is functioning correctly.

When you ship your app with MEV protection built-in, transactions execute as per users’ expectations.

MEV History

The terms “MEV” or “Miner Extractable Value” first appeared in a 2019 Flashbots research paper titled “Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges,” and later evolved to include non-miners as “Maximum/Maximal Extractable Value.”

MEV wasn’t new to blockchain. It was ignored as a structural design issue fundamental to blockchains using mempools. The paper by Flashbots, however, was the inflection point. It crystallized the notion that this “extraction” is a fundamental risk to the ethos of decentralization (ordering, fairness, transparency).

So, what are some of these "MEV risks" that the paper talks about?

At a systemic level, unchecked MEV leads to several negative outcomes including, but not limited to, the following:

  • MEV creates misaligned incentives between users and block producers

  • MEV can centralize block production

  • MEV erodes user experience and trust

  • MEV blurs the line between honest and harmful behavior

  • MEV markets can outcompete validator incentives

How Does MEV Work?

When users transact on a blockchain, the transaction first goes to a mempool. The mempool is a critical piece of infrastructure for many blockchains. This is where transactions sit to be verified or validated before they are added to a block or rejected after being.

Depending on the network, that window can range from a few seconds to a few minutes. That short window between transaction broadcast and inclusion is enough for MEEs to scan and exploit profitable opportunities.

While MEV is often linked to block producers (miners/validators), much of today’s MEV is actually from bots. This greatly amplifies the impact of MEV on users because now, value extraction happens almost instantly rather than depending on slow, manual interventions by block producers.

Here’s a simplified step-by-step process of a typical MEV attack:

  • A user broadcasts a transaction to the network.

  • The transaction enters the public mempool where anyone can inspect it.

  • A MEE spots a profitable opportunity by monitoring txns. in the mempool.

  • The MEE crafts an ordered group of transactions (bundle) designed to be executed in a specific sequence to extract MEV.

  • The bundle is submitted to, say, a validator.

  • The validator includes the entire bundle in the next block, executing the user’s transaction in the manipulated order.

  • The MEE captures the profit while the user receives worse execution than expected.

Types of MEV Attacks

MEV is not a singular attack. But rather an umbrella term for techniques that extract value from the visibility of pending transactions and the ability to influence ordering in a block. Here are a few of the most common types of MEV attacks.

1. Frontrunning

Frontrunning is the most common MEV attack. Here, an MEV bot sees a pending transaction and submits their own with higher gas to get included first. 

Normally, there are two ways this behavior crops up.

First is the race to buy limited supply assets. Here, frontrunning is more about speed (not price manipulation). A limited NFT drop is an excellent example of this. By submitting a transaction that lands first (despite initiating after the user), the frontrunner can ensure they mint/buy the NFT before the user.

Second is price manipulation in illiquid or low-liquidity pools.  Here, the frontrunner places a transaction to be included ahead of the user’s transaction such that the former can buy at a lower prices before the latter pushes the price up, or sell at a higher price before the latter pushes the price down. That way, the frontrunner can create an arbitrage purely from transaction ordering.

2. Sandwich Attack (a.k.a. Sandwiching)

A sandwich attack is just a frontrunning attack but with a ‘sell’ action at the end.

By frontrunning a transaction, MEV bot has successfully driven the price up and is sitting on unrealized profits. Now, the bot would sell the assets and walk away with the profit.

Simply put;

  1. A bot sees a pending ‘buy’ transaction and places a new order for the same token but with a higher fee to be included first in the block. This increases the price of the token in the liquidity pool.

  2. The user’s transaction is then fulfilled at the ‘new’ (increased) price.

  3. The bot immediately sells the token at the inflated price and locks in the profits (leaving a potential loss for the user with the original buy order).

3. Backrunning

Backrunning is a much more forgiving type of MEV attack, because the bot reacts after the user’s transaction is executed, and so it doesn’t worsen the user’s price or execution outcome.

Here, the MEV bot waits for a large swap in a liquidity pool.

Say, a user swaps a large volume of token A for token B in a liquidity pool (Pool 1). This causes the price of B to shoot up and the price of A to drop, creating a momentary discrepancy from other liquidity pools.

Now the price in Pool 1 is different from Pool 2. So, the MEV bot can buy token A (at a lower price) from pool 1 and sell it in Pool 2 (at a higher price).

4. Censorship

Block producers (miners/validators) are incentivized to include legitimate transactions in a block but they can very well choose to delay to exclude transactions. This ability to censor transactions allows them to extract MEV by selectively preventing competing transactions from being included, ensuring that only their own transactions or preferred bundles capture the MEV.

5. Oracle Manipulation

Apps use oracles to receive asset prices. Albeit the prices update very fast, practically, the oracles update after specific intervals. A bot can temporarily shift the price at the oracle’s source resulting in the app consuming the shifted price and triggering price-dependent actions, like liquidations, that create value transfers. After the app does what the bot wanted it to, the latter reverses the price distortion in the oracle source. So, the markets return to normal but the app pays the price to the bot.

Benefits of Protecting Users Against MEV

MEV protection is important for a blockchain-based application to be deemed reliable. It guarantees better UX and predictability without increasing complexity of the application for the user.

1. Predictable Execution

MEV increases predictability in transaction execution. Since transaction ordering can be manipulated and have material consequences on fulfillment prices, two identical swaps can have very different outcomes based on their order. With MEV protection, you can ensure your user’s actual experience meets their expectations. No surprise price changes.

2. Higher Transaction Success Rates

Unprotected transactions often fail because prices move between submission and inclusion. Users then retry, increase slippage, or abandon the action entirely. MEV protection reduces such price shocks and ensures a smoother and more timely experience for users.

3. Higher User Trust and Retention

If users regularly experience unexpected price impact or failed transactions, they lose trust in the app, not the network. Protecting against MEV aligns outcomes with user expectations, which directly improves retention and repeat usage.

How To Protect Against MEV Attacks

MEV is normally characteristic of public mempools. Applications can use a variety of solutions to protect users from MEVs including (but not limited to) private mempools, centralized sequencers, and order flow auctions.

Note that MEV protection only prevents harmful, user harming extraction patterns. It does not interfere with the following:

  • Arbitrage bots that restore correct pricing

  • Liquidation bots that keep lending systems healthy

  • Legitimate backruns that react to state changes

Below are a few techniques builders use to protect transactions from MEV attacks.

Private mempools

Considered to be the most effective measure against MEV attacks, private mempools help keep transaction details private until they are added to a block.

FIFO (First In, First Out) ordering

A simple yet effective method, transactions are processed strictly in the order they are received, not by gas price. The caveat is that it is very difficult to enforce in fully decentralized networks.

Centralized sequencers

By trading off a bit of decentralization, builders can use centralized sequencers where a single entity or small set of entities decides transaction ordering. It is effective because, similar to a private mempool implementation, there is no public visibility of transactions until after they are added to a block.

Order Flow Auctions

Order flow auctions are a unique approach to protecting users from MEV attacks. Instead of completely eliminating MEV, it is redirected. The solution works by sending user intent privately to competing solvers, so MEV happens between solvers instead of against the user.

Protect Your Users From MEV with Alchemy

Shipping products with MEV protection built-in is an advantage for builders. When you deliver predictable execution and better prices within your applications, you garner trust and lower churn.

All standard Alchemy RPC endpoints on Ethereum, Solana, Base, Arbitrum, and BNB Smart Chain come with MEV protection. No configuration changes required.

We route transactions through private pathways on supported networks that validators receive directly, which prevents most attacks by removing the visibility that MEV bots rely on. Developers can keep using the same send-transaction flow and Alchemy handles the private routing under the hood.

A more cost-efficient onchain experience for you and your users with no additional overhead. What's not to love?

Frequently Asked Questions

What is MEV (Maximum Extractable Value)?

MEV is the maximum value someone can extract from a block by reordering, inserting, or censoring transactions during block production, in addition to standard block rewards and gas fees. You can think of it as a "hidden tax" on users' trades where manipulators tactically reorder transactions to profit at the user's expense.

What is MEV protection?

MEV protection is any strategy or mechanism that protects users and developers from harmful transaction manipulation by miners or validators who reorder transactions in a block for extra value. Common approaches include using private mempools to hide transactions until they're included in a block.

Why is MEV protection important for my application?

Without MEV protection, users experience high slippage and failed transactions, which degrades trust and makes them assume your routing is poor or your product is unsafe. MEV protection ensures transactions execute as users expect, improving retention and trust.

Is MEV the same as transaction fees?

No. Transaction fees are what users pay to have their transactions included in a block. MEV is an extra value that block producers or searchers can extract by manipulating how transactions are included in a block.

What is a sandwich attack?

A sandwich attack occurs when a bot sees a pending buy transaction, places a higher-fee buy order first to drive up the price, lets the user's transaction execute at the inflated price, then immediately sells at a profit. This leaves the user with worse execution than expected.

What is frontrunning in MEV attacks?

Frontrunning is when an MEV bot sees a pending transaction and submits their own with higher gas to get included first, either to buy limited supply assets before the user or to manipulate prices in low-liquidity pools for arbitrage.

How does Alchemy protect against MEV?

All standard Alchemy RPC endpoints on Ethereum, Solana, Base, Arbitrum, and BNB Smart Chain come with MEV protection built-in at no extra cost. Alchemy routes transactions through private pathways directly to validators, preventing visibility that MEV bots rely on.

Does MEV protection eliminate all types of extraction?

No, MEV protection only prevents harmful, user-harming extraction patterns. It does not interfere with beneficial activities like arbitrage bots that restore correct pricing, liquidation bots that keep lending systems healthy, or legitimate backruns that react to state changes.

What is a private mempool and how does it help?

A private mempool keeps transaction details hidden from public view until they are added to a block, preventing bots from monitoring or reordering your transactions. This is considered one of the most effective measures against MEV attacks.

Overview cards background graphic