S&P 500 7,743.98 ↑ 0.28%Dow Jones 52,475.1 ↑ 0.19%Nasdaq 26,549.85 ↑ 0.27%BTC $80,817 ↑ 1.2%ETH $2,351 ↑ 1.6%EUR/USD 1.1133Inflation 3.5% YoYLive market dataS&P 500 7,743.98 ↑ 0.28%Dow Jones 52,475.1 ↑ 0.19%Nasdaq 26,549.85 ↑ 0.27%BTC $80,817 ↑ 1.2%ETH $2,351 ↑ 1.6%EUR/USD 1.1133Inflation 3.5% YoYLive market data

What Is MEV? How Bots Profit From Your Crypto Trades

Maximal extractable value is the hidden tax built into how blockchains order transactions. Here is how sandwich bots work, what they can cost you, and the practical settings that keep your trades off the menu.
What Is MEV? How Bots Profit From Your Crypto Trades

Key takeaways

  • MEV is value extracted by including, excluding, or reordering transactions in a block, beyond standard rewards and gas fees, per Ethereum's documentation.
  • Searchers, block builders, and validators form a supply chain that scans the public mempool for profitable pending transactions around the clock.
  • Sandwich attacks exploit your slippage tolerance: in the hypothetical worst case, your setting is roughly the ceiling on what a bot can take from one trade.
  • Arbitrage aligns prices across exchanges and liquidation races keep lending protocols solvent, but research on loss-versus-rebalancing shows arbitrage profits can come at liquidity providers' expense, sometimes exceeding the fees they earn.
  • Private routes such as Flashbots Protect keep trades out of the public mempool and exclude reverting transactions, though the fast endpoint shares transactions with all registered builders and shares details with enclave-based searchers, per Flashbots docs.
  • Enshrined proposer-builder separation (EIP-7732) moved from research to reality in 2026: it activated on the Sepolia testnet on October 6, 2026 via the Glamsterdam upgrade, with mainnet timing still undecided per the Ethereum Foundation.

Picture a deli counter where everyone's order is written on a public whiteboard before it gets made. A stranger reads your order, realizes you are about to buy the last hundred bagels, buys them first, and then offers to sell them back to you at a markup. You still get your bagels. You just pay more than you should have, and you may never realize why.

That, in plain terms, is the experience behind one of crypto's most important and least understood concepts: MEV, short for maximal extractable value. If you have ever swapped tokens on a decentralized exchange and received a slightly worse price than you expected, there is a real chance a bot was involved. MEV is not a scam in the usual sense. Nobody steals your coins or tricks you into signing anything. It is a structural feature of how public blockchains work, and it quietly shapes the price of nearly every on-chain trade.

This guide explains what MEV is, who extracts it, the main strategies bots use, roughly what a sandwich attack can cost you with clearly labeled hypothetical math, and the practical steps that reduce your exposure. None of this requires a computer science degree. It mostly requires understanding one idea: on a blockchain, the order of transactions is worth money.

What MEV actually means

Ethereum's official documentation defines MEV as the maximum value that can be extracted from block production, beyond the standard block reward and gas fees, by including, excluding, and reordering the transactions inside a block (ethereum.org). The term originally stood for miner extractable value, a name coined when miners built blocks on proof-of-work Ethereum. The broader name arrived well before the network changed how it reaches consensus: Flashbots proposed renaming it maximal extractable value in a February 2021 post, more than a year ahead of the September 2022 Merge, because any party that controls transaction ordering, including proof-of-stake validators and rollup operators, can extract this kind of value (Flashbots).

Here is the core insight. Whoever decides the order of transactions in a block has a kind of superpower. On a traditional stock exchange, orders are matched by rules that regulators oversee. On a public blockchain, pending transactions sit in a waiting room called the mempool, visible to anyone running a node, and the block producer chooses which ones get in and in what sequence. If seeing a pending trade lets you predict a price move, and you can place your own transaction right before or after it, you can capture value that would otherwise have gone to the original trader or to no one at all.

If you want a refresher on how transactions travel from your wallet to a confirmed block, our guide on how crypto transactions work from send to settled walks through the mempool step by step. MEV is what happens in that waiting room when sophisticated players treat it as a hunting ground.

Who the players are

MEV is not extracted by one shadowy actor. It is an entire supply chain with specialized roles, and understanding them makes the rest of the topic click.

Searchers are the hunters. They run bots that scan the mempool around the clock for profitable opportunities: a large pending swap, a lending position about to be liquidated, a price gap between two exchanges. When a searcher's algorithm spots something, it constructs a transaction, or a bundle of transactions, designed to capture the profit. Searchers compete fiercely with each other, and that competition pushes them to pay high fees for priority placement.

Block builders are the architects. On Ethereum today, many validators do not assemble their own blocks. Specialized builders collect transactions and searcher bundles, arrange them into the most profitable block they can construct, and bid for the right to have that block proposed. This arrangement grew out of software called MEV-Boost, which lets validators outsource block construction through a marketplace of builders and relays (ethereum.org).

Validators are the gatekeepers. They propose blocks to the network and collect the rewards, including the fees searchers pay for priority. Because searchers bid against each other, a large share of MEV profit often ends up flowing through to validators rather than staying with the bots that found the opportunity.

The important takeaway for a regular user: when you broadcast a swap to a public mempool, you are stepping onto a field where professional teams with custom infrastructure are watching every pending transaction. They are not targeting you personally. Their software targets anything profitable, automatically, within seconds.

The main MEV strategies

Ethereum's documentation groups MEV extraction into a few recurring patterns (ethereum.org). Some are useful to the market as a whole, though not costless to everyone involved. One of them is the reason this topic matters to your wallet.

DEX arbitrage

If a token trades at different prices in two liquidity pools, a bot can buy in the cheaper pool and sell in the pricier one within a single transaction. This is the most common form of MEV, and it genuinely does useful work: it keeps prices consistent across exchanges, so the quote you see on one venue stays close to the real market price. But it would be wrong to call it harmless to everyone. The bot's counterparty is the pool itself, which means the people who deposited tokens into that pool, the liquidity providers, are on the losing side of each arbitrage trade. The bot only trades when the pool's price is stale, so the pool systematically sells low and buys high in those moments, a cost known as adverse selection.

Academic research has formalized this cost as loss-versus-rebalancing, often shortened to LVR. A framework by Milionis, Moallemi, Roughgarden, and Zhang decomposes a liquidity provider's return into ordinary market exposure plus a microstructural component equal to fees earned minus losses to arbitrageurs (Milionis et al., arXiv). Follow-up empirical work by Fritsch and Canidio measured these flows on real Uniswap pools and found that losses to arbitrageurs frequently exceed the fees liquidity providers earn in major pools; the same study estimated that hypothetically shortening Ethereum's 12 second block time to 100 milliseconds would cut those arbitrage losses by roughly 20 to 70 percent depending on the trading pair, since stale prices between blocks are what arbitrage feeds on (Fritsch and Canidio, arXiv).

So the fair summary is two-sided: arbitrage helps align prices for traders, but its profits are not conjured from nowhere. A meaningful share comes out of liquidity providers' pockets. If you only ever swap tokens, arbitrage mostly works in your favor. If you supply liquidity, it is one of the main costs you need to weigh against fee income. If arbitrage interests you as a practice, we cover the broader idea in our crypto arbitrage guide.

Liquidations

Lending protocols like Aave and Compound let anyone trigger the liquidation of an undercollateralized loan in exchange for a fee. Searchers race to be first when a position crosses the line. This is extractive toward the borrower, but the mechanism itself is by design: fast liquidations are what keep lending protocols solvent. The MEV angle is the race, where bots compete for ordering priority to claim the liquidation bonus.

Sandwich attacks

This is the strategy that directly costs everyday traders money. A sandwich attack works like this: a bot sees your pending buy order in the mempool, places its own buy immediately before yours, lets your trade push the price up further, then sells immediately after you. The bot's buy raises the price you pay. The bot's sell captures the inflation your trade created. You are the filling in the sandwich, and the bread is pure bot.

Sandwiches only work because automated market makers price trades by formula. When you set a slippage tolerance on a swap, you are telling the network the worst price you will accept. A sandwich bot reads that tolerance and pushes your fill price as close to that limit as fee math allows. Unlike arbitrage, a sandwich transfers value directly from you to the attacker. Nothing about it improves market quality.

Generalized front-running and back-running

Some bots do not even need to understand what a transaction does. A generalized front-runner watches the mempool for any transaction that would be profitable, copies it, substitutes its own address, and submits the copy with a higher fee so it executes first (ethereum.org). This is a particular hazard for people who discover a profitable on-chain opportunity, such as claiming an unprotected reward, and broadcast it publicly. Back-running is the gentler cousin: placing a transaction immediately after a known event, such as an oracle price update, to be first in line for whatever opportunity it creates.

What a sandwich can cost you: hypothetical math

Let us put clearly hypothetical numbers on this, because the mechanics become obvious once you see them. These figures are illustrations, not measurements of any real trade.

Suppose you swap $10,000 of a stablecoin for another token in an automated market maker pool, and you set your slippage tolerance to 3 percent. That setting means your transaction will go through at any price up to 3 percent worse than quoted. A sandwich bot that spots your pending trade can buy ahead of you, pushing the pool price up until your trade would fill right at your limit. In the worst case, you receive roughly $300 less value than the quote suggested, and most of that difference lands in the bot's pocket after fees.

Now run the same hypothetical trade with a 0.5 percent tolerance. The worst case drops to about $50, and the opportunity may become too small to be worth the bot's gas costs, so the attack might not happen at all. The relationship is nearly mechanical: your slippage setting is approximately the ceiling on what a sandwich can take from a given trade. That is why our plain-English slippage guide treats the tolerance setting as a safety control, not a convenience setting.

Two caveats keep this honest. First, tight slippage is not free: in a fast market, a tight tolerance means your trade may fail, and on a public route a failed transaction can still cost gas. Second, real sandwich profits are reduced by the attacker's own fees and price impact, so the worst case is a ceiling, not a typical outcome. The hypothetical math still points to the right habit: never leave a wide tolerance on a large trade out of laziness.

Is MEV good or bad?

The honest answer is both, which is why the ecosystem's response has been to manage MEV rather than pretend it can be eliminated.

On the helpful side, arbitrage keeps prices aligned across venues, which means the quote you see on one exchange is close to the real market price, though as covered above, part of that benefit is financed by liquidity providers through loss-versus-rebalancing. Liquidation races keep lending protocols solvent, which protects depositors. Ethereum's documentation credits these forms of MEV with supporting the smooth functioning of DeFi (ethereum.org).

On the harmful side, sandwich attacks are a straight transfer from users to bots. MEV competition can also congest the network and bid up gas prices, because searchers fight for priority placement. Our gas fees guide explains why priority fees exist; MEV is one of the forces that inflames them. And there is a deeper structural worry: if extracting MEV requires expensive, sophisticated infrastructure, the rewards could concentrate among large professional operators, nudging the validator set toward centralization. That concern is a major reason Ethereum researchers care so much about how MEV is distributed, not just how much exists.

How the ecosystem is responding

Because MEV cannot be wished away, the response has focused on containing its harms and spreading its rewards.

MEV-Boost and the builder marketplace. Rather than every validator running its own extraction operation, MEV-Boost created an open market where specialized builders compete to construct the most valuable blocks and validators simply pick the best bid. Per Ethereum's documentation, this democratizes access to MEV revenue, so a solo home staker earns from the same builder market as a giant staking pool (ethereum.org).

Proposer-builder separation at the protocol level. For years, researchers wanted to move this separation from optional middleware into Ethereum itself, and that work has now reached implementation. Enshrined proposer-builder separation, known as ePBS and specified in EIP-7732, builds the split into the consensus protocol: a proposer includes a builder's commitment to an execution payload in the block, and the builder reveals the payload afterward, which reduces reliance on trusted middleware like MEV-Boost. ePBS ships as part of the Glamsterdam upgrade, which activated on the Sepolia testnet on October 6, 2026, according to the Ethereum Foundation's announcement. The same announcement notes that Hoodi testnet and mainnet activation dates had not yet been decided, so on Ethereum mainnet today block building still runs through the MEV-Boost middleware market while ePBS is proven out on testnets (Ethereum Foundation blog).

Private transaction channels. Sandwich bots rely on spotting your transaction in the public mempool before it confirms, so keeping it out of that public waiting room removes their usual vantage point. Services such as Flashbots Protect let users route transactions to a private mempool instead of broadcasting them openly (Flashbots docs). Private routing is a strong defense, not an absolute one. Your transaction is still visible to the parties who help execute it, including block builders and, depending on your settings, searchers running inside locked-down hardware enclaves. Protection then rests on those parties behaving as the system's rules and incentives intend, not on nobody ever seeing the trade.

Batch auctions and intent-based trading. Some trading systems collect many orders and settle them together at a single clearing price, which removes the profit from reordering trades within the batch. Others let users sign an intent, such as a desired minimum output, and have competing solvers find the best execution. Both designs shrink the surface area that sandwich bots exploit.

How to protect your own trades

You cannot control how blocks are built, but you control how your transactions enter the system, and that is where most of the practical protection lives.

Set slippage deliberately. For swaps between deep, liquid pairs, a tight tolerance sharply limits what a sandwich can extract. For thin or volatile tokens, you face a genuine tradeoff between failed transactions and sandwich exposure. The wrong move is leaving a wide default untouched on a large trade.

Use a private transaction route for meaningful trades on Ethereum mainnet. Flashbots Protect works by swapping the RPC endpoint in your wallet, commonly to rpc.flashbots.net/fast, after which your transactions skip the public mempool. According to the Flashbots documentation, transactions sent this way are only included in a block if they do not revert, which means failed attempts do not burn gas, and users can receive refunds when their transactions generate MEV or overpay on priority fees (Flashbots docs).

Be clear-eyed about what private means here, because the popular fast endpoint involves more parties than a single relay operator. Per the Flashbots settings documentation, fast mode shares your transaction with all registered block builders to speed up inclusion, and it shares full transaction details, minus signatures, with searchers that operate inside trusted execution environments, which are hardware enclaves designed to process data without exposing it to the machine's operator (Flashbots settings guide). The stated purpose of that sharing is to increase MEV refunds while preserving front-running protection, but it means you are trusting the builders who receive your transaction, the integrity of the enclave hardware, and Flashbots' operation of the whole pipeline, not just one relay. The default setting shares only with the Flashbots builder and reveals less, at the cost of potentially slower inclusion. Either way, private routing changes who can see your trade and under what constraints; it does not make sandwiching physically impossible, it makes it depend on a different and generally stronger set of safeguards than the open mempool offers.

Prefer venues that neutralize ordering games. Aggregators and protocols that use batch settlement or solver competition remove much of the sandwich opportunity by design. You do not need to understand the internals; you just need to know that where you trade changes how exposed you are.

Use limit orders, with eyes open about how your venue fills them. A limit order sets a price, and the general rule across markets is that it executes at that price or better, which removes the open-ended slippage range a sandwich bot feeds on. How much MEV protection you actually get depends on the execution mechanism behind the order. On Uniswap's web app, for example, limit orders run through the UniswapX network, where third-party fillers match your order at the exact price you set, there is no slippage on the fill, and the order simply stays open or expires if no filler takes it, per Uniswap's support documentation (Uniswap support). Other venues implement limit orders differently, sometimes as an on-chain transaction that triggers once the pool price crosses your level, and in those designs the execution step can still interact with ordering games. The universal cost is the same everywhere: a limit order may never fill.

Right-size your trades. Sandwich profits scale with the price impact of the victim's trade. A large swap in a shallow pool is a flashing billboard. Splitting a big trade into smaller pieces in deeper pools reduces the prize, though it adds gas costs, so the arithmetic depends on the size involved.

One more nuance for users on layer 2 networks: most rollups today use a single sequencer to order transactions, which means the classic public-mempool sandwich is less of a live threat there, but it also means you are trusting the sequencer's ordering policy. MEV does not disappear on other chains or layers; it changes shape depending on who controls ordering and what they can see.

Why small leaks deserve your attention

It is tempting to shrug at a $30 haircut on a $5,000 swap. But execution quality behaves like any other recurring cost: it compounds. Someone who trades a few times a month and routinely gives up small amounts to poor slippage settings and sandwich exposure is leaking money that could have stayed invested.

Try the calculator below with your own clearly hypothetical numbers. If better trade hygiene saves you even $50 a month, and you let that money grow at an assumed annual return instead, the long-run difference is larger than most people expect. This is illustrative math, not a forecast, and it says nothing about what any crypto asset will return. It simply shows why plugging a steady leak matters.

The bottom line

MEV is what happens when transaction ordering, which is invisible in traditional finance, becomes an open market. Some of it, like arbitrage and liquidations, is the plumbing that keeps on-chain markets functional, even though research shows arbitrage profits lean on liquidity providers through adverse selection. Some of it, like sandwich attacks, is a tax on inattentive traders. The ecosystem is working on structural fixes, from builder marketplaces to in-protocol proposer-builder separation, which went live on the Sepolia testnet in October 2026 through the Glamsterdam upgrade and is still awaiting a mainnet activation date, but you do not have to wait for any of that. Set slippage deliberately, route significant Ethereum trades through a private mempool while understanding who still sees them, favor venues that settle in batches, and keep trade sizes sensible relative to pool depth. The bots will keep hunting. Your job is simply to stop looking like dinner.

Knowledge is the only real hedge

Crypto punishes guesswork faster than any market on Earth.

Volatility is survivable. Not knowing what you own is not. The Financial IQ Test measures your actual money knowledge, from market basics to risk math, so your conviction is built on understanding instead of a feed full of hype.

Test your Financial IQ
The Financial IQ Test is built by our parent company, Advanced Learning Academy. Same family, same standards.

Questions people ask

Is MEV illegal?

In traditional securities markets, front-running client orders by a broker is prohibited. On public blockchains, transaction ordering is permissionless and the legal treatment of MEV strategies is unsettled and varies by jurisdiction and strategy. Arbitrage and liquidations are widely treated as normal market activity, while sandwich attacks draw more criticism. Nothing here is legal advice; the practical reality is that these bots operate openly today, so protecting your own transactions is the dependable move.

Does MEV exist on Bitcoin?

Far less. Bitcoin transactions are mostly simple transfers without the rich DeFi activity that creates ordering profits, so there are fewer opportunities to extract value by reordering. MEV is most significant on chains with heavy smart contract and decentralized exchange activity, with Ethereum as the main arena.

Do I face MEV risk when trading on a centralized exchange?

Trades matched on a centralized exchange's internal order book never touch a public mempool, so classic sandwich bots cannot see or reorder them. You take on different tradeoffs instead, including custody risk and trust in the operator. MEV exposure begins when you transact on-chain, such as swapping on a DEX or moving funds through smart contracts.

What is a sandwich attack in one sentence?

A bot sees your pending swap, buys the same token just before you to push the price up, lets your trade fill at the worse price, then sells immediately after you to pocket the difference.

Does arbitrage hurt anyone if it keeps prices aligned?

It helps traders by keeping quotes consistent across venues, but academic research on loss-versus-rebalancing shows the profits come largely from liquidity providers, who trade at stale prices whenever an arbitrage bot steps in. Empirical work on Uniswap pools found these losses frequently exceed the fees liquidity providers earn, so if you supply liquidity rather than just swap, arbitrage is a real cost to weigh.

Does using Flashbots Protect cost anything?

There is no fee for the service. Per the Flashbots documentation, it submits transactions privately, only includes transactions that do not revert, and can pay refunds when a transaction generates MEV or overpays priority fees. The tradeoff is trust rather than money: the widely used fast mode shares your transaction with all registered block builders and shares transaction details, minus signatures, with searchers running inside trusted execution environments, so you are relying on that whole pipeline instead of the public mempool.

What slippage tolerance should I use?

There is no single right number. For large, liquid pairs, traders often use tight tolerances because quotes rarely move much between submission and confirmation. For volatile or thinly traded tokens, a tight setting may cause repeated failures. The principle is to set it consciously for each trade rather than accepting a wide default, because your tolerance approximates the most a sandwich bot can extract.

Just so you know: DollarFlourish is an educational publisher, not a financial, tax, or investment advisor. Numbers and rates change. Verify anything important with a licensed professional before acting on it. Some links on this site may earn us a commission at no cost to you. See how we review.
DollarFlourish Editorial
Data & Research Desk

The DollarFlourish Money Research Team builds the site's calculators and data rankings and writes its research-driven guides. Every figure we publish is traced to a primary source, the Bureau of Labor Statistics, Census Bureau, IRS, Social Security Administration, and Federal Reserve, and dated so you can check it yourself.

Reviewed for accuracy by Timothy E. Parker · Updated 2026-10-29 · Editorial & corrections policy

The Flourish Letter

One smart money idea each week, charts included. Join free and get the printable 2026 Money Calendar in your welcome email.