Skip to main content

MEV Explained: Ethereum Transaction Ordering, Slippage and Sandwich Risk

Maximal extractable value (MEV) is value that can be extracted by selecting, excluding or changing the order of transactions in a block beyond ordinary block rewards and fees. In Ethereum and DeFi markets, MEV influences execution quality, market-making opportunities and the price a user ultimately receives from a transaction.

This guide explains MEV as a market-microstructure problem rather than a sensational promise of profits. It distinguishes legitimate arbitrage and liquidations from predatory ordering practices, and avoids providing exploit instructions or claiming that any execution method is completely protective.

Blue blockchain transaction blocks illustrating the order of transactions changing within a block
Original educational illustration; not live transaction data.

Key takeaways

  • Transaction ordering can affect decentralised exchange prices and collateral transactions.
  • MEV may include arbitrage and liquidation activity as well as user-harming sandwich behaviour.
  • Block builders, searchers, validators and relays can have distinct roles in transaction supply and selection.
  • Slippage limits, liquidity and transaction privacy can affect execution risk but cannot eliminate every MEV exposure.

Essential concepts

MEV

Value obtainable through transaction inclusion, exclusion or ordering beyond ordinary protocol rewards and user fees. Its presence is a property of block production and market structure rather than a particular token’s intrinsic return.

Searcher

An actor identifying potential opportunities arising from transaction ordering, prices or contract state. Not all searcher transactions are profitable and behaviour varies from benign arbitrage to harmful extraction.

Block builder

An entity constructing a candidate ordered block or payload under a particular market architecture. Builders may compete for block space and submit bids through infrastructure.

Validator

An Ethereum proof-of-stake participant responsible for consensus duties including proposing blocks under protocol rules. The chosen block-building arrangement may involve external builders and relays.

Relay

Infrastructure that can mediate between builders and proposers in certain block-building markets. Its trust, censorship and operational characteristics require separate assessment.

DEX arbitrage

Trading that seeks to align prices between pools or venues where quotes have diverged. It can improve price consistency but pays fees and incurs settlement, market and competition risks.

Sandwich attack

A transaction-ordering pattern that surrounds a user’s market-sensitive transaction and seeks value from its induced price movement. It can worsen a user’s execution and is a form of harmful market behaviour.

Slippage tolerance

A maximum specified difference between estimated and acceptable execution output under a swap’s contract or interface. It can constrain price deterioration but may cause a transaction to revert or fail.

Priority fee

The transaction tip component used for inclusion incentives under applicable Ethereum fee rules. A higher tip is not proof of the transaction’s economic value.

Private order flow

A submission pathway that does not expose an unconfirmed transaction in the same way as a public mempool broadcast. Private does not automatically mean risk-free, trustless or free from internal extraction.

Reordering risk

The possibility that transactions execute in a sequence different from what a user expected. State-dependent swaps and contract interactions can be affected even when the code is correct.

Backrun

A transaction executed immediately after another opportunity-generating transaction to capture a resulting arbitrage or state change. The consequences differ from a sandwich and depend on actual market and protocol mechanics.

How MEV explained works in practice

Why transaction order can create economic value

Ethereum transactions interact with a state that changes after each earlier transaction in the block. An automated market maker’s quoted swap output may therefore differ after another transaction changes pool reserves. Arbitrage, liquidations and other state-dependent opportunities arise because only one sequence becomes the executed history.

Unlike a traditional trade through a centralized order book, some on-chain interactions may be publicly visible before inclusion. Other participants can estimate their effects and submit competing transactions. This creates a market for ordering decisions, with welfare implications for end-users.

MEV is broader than harmful trading

Arbitrage between an underpriced and an overpriced liquidity pool can push prices closer together. Liquidation activity in a lending protocol can restore solvency when collateral values fall. Both can generate competition over block position and fees. Other forms of MEV can reduce user welfare by worsening execution or exploiting predictable transactions.

Classifying every MEV-related payment as theft or every arbitrage trade as socially beneficial would be simplistic. The relevant distinction concerns who gains, who bears the cost, whether market integrity improves and what the transaction would have achieved without the ordering effect.

How sandwich risk affects a user swap

A swap through an automated market maker changes the pool price as it executes. If another actor can predict the price effect and cause additional transactions to surround it, the user’s output may worsen within the slippage limit. The cost can be difficult to infer just from the displayed fee because it is embedded in the execution price.

This is not simply ordinary price volatility. A user can experience a poor fill despite a stable broader market if their transaction interacts with a thin pool. A lower slippage tolerance may reject certain unfavourable executions but can also increase transaction failures and paid gas costs.

Searchers, builders, proposers and relays

Ethereum’s proof-of-stake design allows specialized actors to identify transaction opportunities and assemble candidate blocks. Builder competition and proposer-builder separation mechanisms can change who chooses a sequence and who receives the economic rewards. Ethereum’s MEV documentation discusses searchers, builders, relays and proposers as distinct roles.

The structure can evolve with network upgrades and market arrangements. A simple diagram showing ‘a miner rearranges trades’ is outdated for Ethereum post-Merge and misses the role of builders and relay infrastructure. A precise article should state the chain, time and proposed block-building architecture.

Slippage, price impact and total execution cost

Slippage tolerance is a guardrail, not a fee schedule. Pool depth, trade size, price movement during inclusion, token transfer restrictions and routing all affect output. A user might set a high slippage limit to avoid failed transactions but thereby accept a much worse minimum output. Tight limits reduce some risks while making execution less certain.

Comparing a DEX with a centralised exchange requires the same notional size, actual fill, market depth, network charges and settlement conditions. A visible quoted midprice may not be executable for the desired quantity, and the public swap path can reveal commercially sensitive intent.

Private submission can change the threat model

Some services allow transactions to be submitted to a builder, relay or protected routing service without the same broad public mempool visibility. This can reduce particular forms of front-running exposure, but introduces new trust assumptions, coverage limits, censorship possibilities and service-specific policies.

An application should never claim a submission path guarantees no MEV or guarantees transaction execution. The user still needs to understand how the service handles failed bundles, order-flow visibility and the possibility of a transaction eventually reaching a public pathway.

How analysts can examine MEV impact

An educational review starts with transaction hash, block number, surrounding transaction ordering, relevant DEX prices, token quantities, pool liquidity and the output actually received. Compare with the user’s quoted minimum output and a reasonable counterfactual benchmark, while recognizing that a perfect no-MEV counterfactual may not be observable.

On-chain evidence can reveal adjacent activity but does not automatically prove malicious intent or identify a controlling person. MEV estimates depend on simulation, oracle pricing, gas costs and which trades are included. Report assumptions, uncertainty and possible benign explanations rather than overstating an exploit claim.

Worked numerical example

Consider a hypothetical DEX swap where the interface estimates an output of 1,000 tokens, and the user permits a 2% slippage tolerance. The minimum acceptable output is 980 tokens. If transaction ordering and market price effects cause the executed output to be 985 tokens, the contract may still accept it within the stated tolerance, even though the user receives 15 tokens less than quoted. At an illustrative independent reference of £1 per token, that gap represents £15 of output-value difference before network fees. The calculation does not prove a sandwich occurred; normal price movement and liquidity impact could also produce a worse fill.

Branded comparison table

MEV activityPotential effectUser concern
DEX arbitragePrices converge across poolsTrading fees and competition
Liquidation competitionCollateral debt is resolvedPenalties and timing
Sandwich behaviourSwap output deterioratesPredatory price impact
Builder/proposer bidsBlock inclusion competitionCentralisation and censorship
Private routingReduced public visibilityTrust and coverage

Research checklist and limitations

Record the exact chain, contract address, asset denomination, timestamp, data source and protocol version. Distinguish prices observable in a market from oracle marks, model output and interface estimates. Verify the transaction or contract terms rather than inferring behaviour from a headline. If a protocol is upgradeable, its previous settings may not describe its current or future operation.

Use scenario analysis that allows market prices, liquidity and network performance to deteriorate together. Include network charges, slippage, debt accrual, settlement timing, counterparty dependencies and any liquidation penalties or fee incentives. A single successful historical transaction does not demonstrate that the same process works under stress. Explain what can be learned from public on-chain records and what cannot be inferred without independent evidence.

Finally, separate technological correctness from commercial outcomes. A smart contract can execute precisely according to its source code yet produce an unfavourable result because of oracle updates, collateral terms, transaction ordering or a user’s assumptions. This article aims to improve informed risk analysis, not to direct readers to leverage, exploit, or trade a cryptocurrency.

Frequently asked questions

Is all MEV illegal or malicious?

No. MEV encompasses several activities with different effects; specific legality and market-integrity questions depend on behaviour and jurisdiction.

Can slippage protection stop sandwich attacks completely?

No. It limits acceptable output under contract conditions but does not remove adverse price impact, failed transactions or other routing and data risks.

Do Ethereum validators directly choose every transaction order?

Block construction can involve specialized builders and relays, so the economic and operational roles are more distributed than that statement suggests.

Can a block explorer prove that a sandwich occurred?

It can provide transaction ordering evidence, but credible attribution usually requires economic reconstruction and alternative explanations.

Related Traders MBA guides

Crypto Market Structure; DeFi Liquidity Pools; Ethereum Gas Fees Explained. Explore the Cryptocurrency learning category.

Sources and further reading

Important notice: General technology and financial-market education only, not personalised investment advice. Numerical examples are hypothetical. Crypto-assets and derivative or lending protocols may result in severe losses, liquidation, loss of access or contract failures.