MEV: The Execution Cost Buried in Your Swap

The thing that surprises people about a public blockchain is not that it is public. It is that your intention is public before it happens.
When you submit a swap, it sits in a queue that anyone can read. For a period measured in seconds, the entire world knows what you are about to do, at what size, and how much worse a price you have pre-authorised yourself to accept. Only after that does anything settle.
Whatever profit can be squeezed out of that window by choosing which transactions go into a block, and in what order, is called maximal extractable value. Ethereum’s own documentation describes it plainly: value available from block production beyond the block reward and fees, obtained by including, excluding or reordering transactions.
I am not going to tell you MEV is theft, because that is a fight about vocabulary rather than about money. I will tell you it is a real execution cost, it lands disproportionately on people trading size in thin pools, and it is the one cost in this whole business that you can bound with a single setting.
The sandwich, mechanically
A searcher watching the queue sees your order to buy token A with token B. It knows two things immediately: your trade will push the price of A up, and you have set a slippage tolerance that tells it exactly how far up you will still accept.
So it constructs three transactions and pays to have them ordered:
- Its own buy of A, placed ahead of yours. This moves the price up.
- Your buy, which now executes at that worse price.
- Its sale of A, placed immediately behind yours, into the price your trade just created.
The searcher’s profit and your loss are the same number. It bought before you, sold after you, and never held risk for more than one block.
This only works because of the curve. In a constant product pool the price moves as a deterministic function of trade size, so the attacker can calculate its optimal front-run precisely rather than guessing. I have set out that arithmetic in how an automated market maker prices your trade. The same predictability that lets you estimate your own price impact lets somebody else monetise it.
Your slippage tolerance is the ceiling on the damage
Here is the part that is genuinely actionable.
A sandwich is only profitable if the attacker can push your execution price worse without pushing it past the point where your transaction reverts. Your slippage tolerance is that point. Set it at 0.5% and the extractable amount is bounded by roughly 0.5% of your trade. Set it at 5% because a transaction failed earlier and you were annoyed, and you have just authorised ten times as much.
The default in a lot of interfaces is not chosen with your interests in mind. It is chosen so transactions do not fail, because a failed transaction generates a support ticket and a bad fill does not.
| Slippage tolerance | What you are telling the network |
|---|---|
| 0.1% | Revert unless I get essentially the quoted price. Fails often on volatile pairs. |
| 0.5% | A normal setting for a liquid pair. Caps extraction at roughly half a percent. |
| 1% to 2% | Reasonable on a thinner pair. Understand that this is now your worst case. |
| 5% and above | You have pre-approved a 5% loss. Only defensible on a genuinely illiquid asset, in small size. |
| “Auto” | An unknown number chosen by someone whose incentive is transaction success, not your fill. |
The other lever is size. Split a large order and each slice is a smaller sandwich opportunity, and a smaller price impact besides. Routing across multiple pools does the same thing for the same reason.
Not all MEV is predatory
Two categories are worth separating, because lumping them together produces bad conclusions.
Arbitrage and liquidation MEV is doing a job. When a pool’s price drifts from the wider market, someone arbitrages it back, and the pool is only usable because they do. When a lending position falls below its liquidation threshold, someone liquidates it, and the protocol only stays solvent because they do. The profit is the fee for a service nobody is paid a salary to perform.
Sandwich MEV is a transfer. It creates nothing. It exists because your intention was visible and your tolerance was generous.
Research measuring extraction in private transaction pools, including the Flashbots study on arXiv, traces how much of this activity moved from open competition in the public queue into private channels once the infrastructure existed. That migration is the reason the useful question is no longer “does MEV exist” but “where does my transaction go before it lands”.
Where your order flow goes
| Route | Who sees your transaction first | What it buys you |
|---|---|---|
| Default public endpoint | Everyone watching the mempool | Nothing. This is the exposed path. |
| Private submission endpoint | A block builder, not the open queue | Your intention is not broadcast before inclusion. Trades a public risk for a counterparty one. |
| Order flow auction | Bidders competing to fill you | Some of the extractable value is rebated to you rather than kept. |
| Batch settlement | Nobody, until the batch clears | Same-block trades settle at a uniform price, so ordering within the batch stops paying. |
I am deliberately not naming products. The category matters and the specific service is a diligence exercise of its own, along the lines of a due diligence checklist for a DeFi protocol. Note the trade-off honestly: routing privately means trusting an intermediary not to do to you what the public queue was doing to you. That is a different risk, not an absence of risk.
The marketing problem
A venue can truthfully advertise zero trading fees while its users routinely give up more than a fee’s worth on execution. Nothing about that is unlawful on its face, but a claim about cost that omits the largest component of cost is exactly the shape the Competition Bureau’s guidance on deceptive marketing practices is concerned with, and the OSC’s investor warnings are worth reading before you trust any platform’s own account of what it costs you.
My rule for clients: the fee schedule is not the cost. The cost is what left your wallet minus what arrived, converted to Canadian dollars, and if you are not measuring it that way you are not measuring it. Reconstructing that after the fact is painful, which is one more argument for the record keeping habits in crypto ACB and record keeping and for the tooling compared in crypto tax software in Canada.
What I would actually change
Set your slippage deliberately, every time. Break large orders up. Use a private submission route for anything material, having first decided you are comfortable with the operator. And measure realised execution against the quote for a month, because the number will either reassure you or change your behaviour, and both are useful.
If your trading is at a scale where this matters and you want a read on what your execution has genuinely cost across a year of activity, send me the wallet history.
More on cryptocurrency
- DeFi in Canada: What Decentralized Finance Actually Offers, and What It Costs in Tax
- How an Automated Market Maker Prices Your Trade
- Order Books, Spreads and Slippage: Why the Screen Price Is Not Your Price
- Reading Exchange Volume: What Reported Numbers Hide
- Health Factors and Liquidations in DeFi Lending
Sources & references
- OSC - Investor warnings and alerts
- Bank of Canada - Decentralized Finance: Innovations and Challenges
- Bank of Canada - Staff analytical notes
- Competition Bureau Canada - Deceptive marketing practices
- Ethereum.org - Maximal extractable value (MEV)
- A Flash(bot) in the Pan: Measuring Maximal Extractable Value in Private Pools
