In short: MEV (maximal extractable value) is the profit that can be made by choosing the order of transactions in a block, which on Ethereum is now captured mainly by specialised bots and block builders working with validators. Some MEV, such as arbitrage that aligns prices across exchanges, is broadly beneficial; other forms, such as sandwich attacks, take value directly from ordinary DeFi users through worse prices. The key points:
- Sandwich attacks exploit large swaps with loose slippage settings.
- Private transaction routes such as Flashbots Protect hide your swap from public mempool bots.
- Low slippage tolerance and liquid trading pairs limit your exposure.
- Each DeFi swap is still a taxable event for Australians, whatever MEV took.
The ethereum.org guide to MEV explains how transaction ordering creates this value.
Maximal Extractable Value (MEV), originally called Miner Extractable Value, refers to the profit that can be extracted by controlling the ordering, inclusion, or exclusion of transactions within a blockchain block. The entity ordering transactions (historically miners in Proof of Work blockchains, now validators in Proof of Stake systems like Ethereum) has the power to sequence transactions in any order, and this sequencing power has economic value.
MEV is extracted primarily through bots that continuously monitor the public mempool of pending transactions, identify profitable sequencing opportunities, and submit their own transactions with optimised gas prices to capture that value. The target is typically users of DeFi protocols whose pending transactions reveal predictable price movements or arbitrage opportunities.
MEV has become one of the most significant hidden costs of using DeFi on Ethereum and similar blockchains. It is a direct transfer of value from ordinary users to MEV searchers and the validators who accept their transaction bundles. Understanding MEV helps DeFi users make better decisions about slippage tolerance, transaction timing, and protocol selection.
The Three Main Types of MEV
Sandwich Attacks
The sandwich attack is the most well-known form of MEV and a form of front-running. A bot detects a large pending buy order on a DEX, buys the same asset first (front run), allows the victim’s transaction to execute at a worse price, then sells immediately after (back run) at the elevated price. The victim receives less output than they should have; the MEV bot captures the difference.
DEX Arbitrage
When the price of a token differs across two different decentralised exchanges or liquidity pools, an arbitrageur can buy on the cheaper venue and sell on the more expensive venue in the same block (or even the same transaction) to capture the spread. This is actually considered beneficial MEV in many analyses: it keeps prices consistent across DeFi markets and reduces inefficiencies. The race to capture arbitrage opportunities is extremely competitive, and specialised bots fight for these opportunities using priority gas fees and direct validator connections.
Liquidation MEV
In DeFi lending protocols, positions that fall below their collateral ratio are subject to liquidation: any participant who repays the debt on behalf of the borrower receives a liquidation bonus. When a position becomes eligible for liquidation, MEV bots race to be the first to submit the liquidation transaction and capture the bonus. The competition for liquidation bonuses drives up gas prices during market volatility when many positions become eligible simultaneously. This is another category of MEV that is considered broadly beneficial for DeFi market health but has significant costs for the borrowers being liquidated.
How MEV Affects Ordinary DeFi Users
For the average DeFi user, MEV manifests primarily as worse execution prices on DEX trades than expected. You set a slippage tolerance, expect to receive approximately the quoted output, and instead receive less because your transaction was sandwiched. The difference is paid to the MEV bot and the validator.
The scale of MEV extraction on Ethereum is substantial. Tracking platforms like EigenPhi and mev.explore.flashbots.net have documented very large cumulative amounts of MEV extracted on Ethereum, running into the hundreds of millions of dollars over time. Not all of this comes from sandwich attacks (much is from arbitrage), but the portion that represents direct harm to retail DeFi users is meaningful.
MEV also contributes to gas price spikes during high-activity periods. MEV bots are willing to pay very high gas prices to secure profitable transaction ordering, which drives up the baseline cost of all transactions on the network. During periods of high MEV opportunity (large market movements, significant new token launches), gas prices spike partly because MEV bots are outbidding each other for priority.
The Flashbots Solution and MEV-Boost
The Ethereum ecosystem has developed a significant infrastructure response to MEV through Flashbots, a research organisation that created an alternative transaction relay system designed to make MEV extraction more transparent and less harmful.
Flashbots created a private transaction ordering system (Flashbots Auction) where MEV searchers submit transaction bundles directly to validators, bypassing the public mempool. This reduces the chaos and gas price escalation of bots competing in the public mempool and provides validators with a reliable additional revenue stream from MEV. From a retail user perspective, the Flashbots Protect RPC endpoint allows users to submit their transactions through the private system, preventing bots from seeing and front-running their pending transactions.
MEV-Boost, which is used by the majority of Ethereum validators, creates a marketplace where specialised block builders who are expert at MEV extraction create profitable blocks and sell them to validators. This professionalises and concentrates MEV extraction while creating a revenue share that subsidises validator operations. The long-term implications of this architecture for Ethereum’s decentralisation are actively debated in the Ethereum research community.
MEV on Other Blockchains
MEV exists on all blockchains with a public mempool and programmable transaction execution, though the scale and character varies significantly.
Solana has a different transaction processing architecture that initially made traditional MEV more difficult, but as DeFi activity on Solana has grown, MEV opportunities have emerged and specialised infrastructure has developed. Solana’s high throughput and low transaction costs mean the economics of MEV differ from Ethereum.
Layer 2 networks like Arbitrum and Optimism (which process transactions in their own sequencing systems before settling to Ethereum) have centralised sequencers that control transaction ordering. While centralised sequencers could theoretically extract MEV, the major L2 sequencers have generally not done so. The long-term plan for most L2s involves decentralising the sequencer role, which will introduce MEV dynamics similar to those on the mainnet.
How to Protect Yourself From Harmful MEV
Several practical measures reduce your exposure to sandwich attacks and other harmful MEV.
Use private RPCs. Services like Flashbots Protect, MEV Blocker, and similar endpoints allow you to submit transactions without exposing them to the public mempool. Most DeFi wallets and some exchanges allow you to configure a custom RPC endpoint. This is the most effective protection against front running and sandwich attacks.
Keep slippage tolerance low. A high slippage tolerance explicitly permits worse execution, which gives sandwich bots a larger profit window. Use the minimum slippage tolerance that allows your transaction to execute successfully given the liquidity conditions of the pair.
Prefer high-liquidity pairs. On pairs with deep liquidity, your transaction has a smaller price impact, which limits both the damage from a sandwich and the profit opportunity for attackers. Trading large amounts of low-liquidity tokens on DEXs is where MEV risk is highest.
Understand that some MEV is unavoidable. Arbitrage-based MEV that keeps prices consistent across venues is considered beneficial to market function, and it is not worth trying to avoid. Focus your attention on protecting against sandwich attacks while accepting that some value extraction is a structural feature of how public blockchains work.
MEV, Wallets and Safety
Most MEV protection starts in your wallet. Wallets such as MetaMask let you change the network RPC to a private endpoint, and some DEX aggregators route orders through private or batch-auction systems by default. Keep token approvals limited, reach DeFi apps only through bookmarked official sites to avoid a phishing website, and be wary of anyone selling “MEV bots” that promise guaranteed profits, a common scam pattern that Moneysmart’s guide to investment scams warns about. Understanding gas fees, market depth and automated market makers explains why the same swap can cost very different amounts at different times, and why layer 2 networks change the picture.
MEV and Tax Records in Australia
MEV does not change your tax position, but it can change the numbers. For an Australian investor, swapping one crypto asset for another is generally a CGT event, valued in AUD at the time of the swap, as the ATO’s guidance on crypto-to-crypto swaps explains, and its guidance on DeFi and wrapping covers liquidity pools and wrapped tokens. If a sandwich attack gave you fewer tokens, your records should show what you actually received, not the quoted amount. Keeping records as the ATO’s guide to keeping crypto records requires, through a crypto portfolio tracker that reads on-chain data, makes this practical, and the wider DeFi tax rules apply too.