MEV (Maximal Extractable Value): what it is and how it works
MEV (Maximal Extractable Value) is the extra profit that validators, miners, or specialized bots can earn by controlling the order of transactions in a blockchain.
Unlike regular transaction fees (see gas fee), MEV does not come from executing a transaction itself, but from the ability to reorder, include, or exclude transactions in a block.
MEV explained simply
MEV can be understood as a hidden competition layer inside the blockchain.
When a user submits a transaction (for example, a swap on a DEX), it enters the pool of pending transactions (mempool). At this point, other participants — including bots — can see it.
If the transaction can impact price, others may:
- place their transaction before it (by paying higher fees)
- reorder execution
- profit from the price change
As a result, they earn profit, while the user gets a worse execution.
How MEV works
In most blockchains, transactions are not processed strictly in order.
The validator (or miner in Proof-of-Work):
- observes pending transactions in the mempool
- analyzes them
- decides which to include and in what order (often based on fees)
- creates and publishes the block
This flexibility allows additional value extraction — known as MEV.
Main types of MEV
MEV is typically implemented through several common strategies.
Front-running
Front-running happens when someone sees a transaction and inserts their own before it.
Example:
- a user submits a large buy order
- a bot detects it
- buys the asset first
- price increases
- the bot sells at a profit
Back-running
Back-running places a transaction immediately after a large one.
It takes advantage of the price movement that has already happened.
Sandwich attack
This is the most common MEV strategy.
It consists of three steps:
- buy before the user's transaction
- let the user execute
- sell after
The user gets a worse price, while the attacker profits.
This is closely related to slippage.
Where MEV occurs
MEV is most common in systems where prices are determined within the protocol.
This includes:
- decentralized exchanges (DEX)
- DeFi protocols
- liquidity pools
It is especially noticeable in:
- token swaps
- large trades
- low liquidity environments
MEV risks for users
For regular users, MEV usually results in hidden costs.
Key risks:
- worse execution price
- hidden losses due to front-running
- higher transaction fees
- unpredictable outcomes
In many cases, users may not even realize MEV is affecting their trades.
MEV and gas fees
MEV is closely linked to competition for block inclusion.
Bots:
- increase gas fees
- send competing transactions
- congest the network
This leads to higher gas fees for all users.
Who captures MEV
MEV can be extracted by different participants:
- validators
- miners
- specialized bots (MEV bots)
- infrastructure providers
Often, bots search for opportunities, while validators include them in blocks and share the profit.
MEV in Proof-of-Stake
In Proof-of-Stake systems (such as Ethereum), MEV has become more structured.
Mechanisms include:
- proposer-builder separation
- MEV-Boost
- block auctions
These improve transparency but do not eliminate MEV.
How to reduce MEV impact
MEV cannot be fully eliminated, but its impact can be reduced.
Common approaches:
- private transactions
- specialized RPC services
- anti-front-running protection
- protocol-level solutions
However, these often require advanced knowledge.
MEV vs transaction fees
It is important to distinguish:
- gas fee — the cost of executing a transaction
- MEV — additional profit extracted from transaction ordering
Fees go to the network, while MEV arises from competition.
Conclusion
MEV is a fundamental aspect of modern blockchain systems.
It:
- creates profit opportunities for network participants
- increases costs for users
- affects DeFi economics
Understanding MEV is essential for evaluating risks and using blockchain applications effectively.