Skip to content

What Is MEV? Who Sees Your Transaction Before It Lands

Share
Row of glass cards, one from the middle stepped forward with an orange edge, headline WHO SETS THE ORDER above

You press confirm on a swap, and your wallet says the transaction was sent. It is not done. Between sending and landing in a block, it waits, and in many designs other people can read it while it does.

What can happen in that gap has a name. MEV, short for maximal extractable value, is the profit someone can make by deciding which transactions go into a block, which stay out and in what order they run.

This piece stays vendor-neutral. It explains where your transaction waits, why its position is worth money and what you can check afterwards.

Key Takeaways

  • MEV is the value someone can capture by including, leaving out or reordering transactions before they are added to a block.
  • The order in which trades run is a cost for you, next to the network fee and slippage.
  • A higher priority fee buys your transaction an earlier spot, not protection from what others do around it.
  • Your slippage tolerance sets the limit on how far a sandwich can push your price.
  • On-chain records show you the order afterwards; they do not show that the order was fair.

What MEV Means

A block is a list of transactions that run one after another. Whoever builds that list decides the sequence. When the sequence changes who gets which price, deciding it has value.

That value is what MEV describes. "Extractable" means someone in a position to set or influence the order can take it. It does not mean a bug. It does not mean a break-in either. Every transaction involved runs exactly as its sender signed it. What changes is what runs before and after it.

Some of that value comes from ordinary work, such as bringing prices back in line. Some comes straight out of another trader's fill.

The Waiting Room: What a Mempool Is

A transaction you send usually goes first to one node of the network, which passes it on. Until it is included in a block, it sits in a pool of pending transactions, usually called the mempool.

In many designs, this pool is public. Anyone who runs a node can read the pending transactions: which contract you call, which asset you swap and how much. Your trade is announced before it happens.

A block explorer shows this state as pending. Our guide to reading transactions on a block explorer explains the difference between a pending request and a confirmed record.

Who Chooses the Order

Somebody has to turn the waiting transactions into a block. Depending on the design, that is a validator, a sequencer or a specialized block builder. The names differ. The role does not: one party picks transactions from the pool and puts them in a sequence.

That choice is not a coin toss. The party building the block usually follows rules that reward it, such as taking the best-paying transactions first. It can also add transactions of its own, or accept them from others who want a specific position. Order is a decision with an owner.

Why Order Is Worth Money

Picture two trades that buy the same asset from the same pool. The first runs at the current price and moves it. The second then runs at the new, higher price.

Neither trade did anything wrong. The price simply depends on what ran just before. On any market where a trade moves the price, being first is an advantage. Second place pays.

That makes ordering a third cost of an on-chain trade. The first is the network fee. The second is slippage, the gap between the price you saw and the price you got. The third is what others can do to your price because they saw your trade coming. It rarely shows up as its own line. Usually it looks like ordinary slippage.

Priority Fees: Paying for a Better Spot

In many designs, the network fee has a base part and an optional tip that goes to whoever builds the block. The tip is the main way to move up the queue. Our guide to how gas fees and tips work covers how the fee is put together.

The tip buys position, not safety. It gets your transaction picked sooner. It does nothing about who reads it while it waits or what they send around it. Anyone who wants the spot in front of you can simply offer more.

That turns the queue into an auction. When several parties want the same position, they bid against each other, and you take part every time you pay extra to be included faster.

The Three Patterns You Will Hear About

Three patterns describe where a transaction can be placed relative to yours. Two of them work against the trade they target. One does not touch your price at all.

Front-Running

Someone reads your pending trade, sends a trade in the same direction and makes sure theirs runs first, for example with a higher tip. Their trade moves the price. Yours then fills at the worse price it left behind.

Nobody is guessing here. The trader in front of you saw your order before it ran and acted on it. That separates front-running from simply trading at the same moment.

Sandwich

A sandwich adds a second step. One trade is placed right before yours and one right after. The first pushes the price against you, your trade fills at that worse price, and the second takes the position back out.

This works best on a pool, where the price follows a formula and the effect of each trade can be calculated in advance. The limit is your slippage tolerance: the worst price you accept before the swap fails. Our guide to the gap between quote and fill explains slippage itself.

The tolerance is the lever on your side. A wide one leaves room for a large push against you. A tight one leaves less room, but a failed swap can still cost gas, as our guide on why a failed transaction still costs gas explains.

Back-Running

Back-running places a transaction right after another one. Your trade has already run, so your price does not change. The back-runner reacts to the state you left behind.

One case is arbitrage: a large trade pulls one pool's price away from prices elsewhere, and the back-runner trades the gap closed. Another is a position that became fragile after a price move and can now be liquidated. It is still a race for position, but it keeps prices in different places close together.

Order Book or Pool: What Changes

The patterns above are easiest to picture on a pool. There, the price comes from the pool's balances and a fixed formula. Anyone who reads your pending swap can calculate where the price will be after it.

An order book works differently. Traders leave orders at prices they choose, and matching usually follows price-time priority: best price first, and the earlier order first at the same price. Our explainer on how a central limit order book matches orders walks through that rule. A limit order also sets a price you will not go past.

That does not remove ordering. It changes its shape. Orders and cancels still arrive in some sequence, and somebody still sets it. Who reaches a resting order first, and whether a cancel lands before a fill, can matter as much as a spot in a block.

So the design does not decide whether order matters. It decides where the order is set, and how much of your trade others see before it is.

What You Can Check and What You Cannot

On-chain trading has one real advantage here: the result is on the record. You can open the block your transaction landed in and read the sequence. You see what ran right before and after you, from which addresses and at what prices. A sandwich, for example, leaves a clear trace.

What the record gives you is the sequence, not a verdict. It does not tell you that nobody saw your trade early, or that the party building the block had no stake in it. Our comparison of what on-chain does and does not prove makes the same point for records in general.

That gap is why it pays to know where your trades are sequenced, and by whom. For a longer look at how on-chain records are published and checked, see transparency and on-chain proofs.

Practical Habits Without Promises

None of these habits removes the cost of ordering. They narrow the room someone has to work with, and they make your own records easier to read.

  • Set your tolerance on purpose. Too wide invites a push against you. Too tight lets the swap fail.
  • Size the trade against the liquidity. A trade that moves a thin pool a long way leaves the most value in the gap.
  • Check your fills afterwards. Look up the block and compare your price with the trades around yours.
  • Ask who orders the trades. For any venue you use, find out who sets the sequence and whether you can check it.

Conclusion

MEV is not an attack reserved for careless traders. It follows from a plain fact: transactions run in a sequence, someone sets that sequence, and the sequence changes prices. Where trades wait in public, ordering is part of what a trade costs.

The decision in front of you is how to treat that cost. You can file it under bad luck. Or you can count it as its own line in your trading costs, ask every venue who sets the order, and check the record yourself. A public sequence is where that check starts. It is not proof that you were treated fairly.

FAQ

Can I tell whether my own trade was sandwiched?

Often, yes. Open your transaction on a block explorer and look at its neighbors in the same block. One address trading right before you in the same pool and direction, then right after you in the opposite direction, is the typical trace. It shows the pattern, not who planned it.

Does sending a transaction privately remove MEV?

It removes one route. Sending a transaction straight to a block builder instead of the public pool means others cannot read it while it waits. That takes away the easiest way to front-run it. It also means you trust whoever receives it not to use what they see.

Does MEV only exist on decentralized exchanges?

The term belongs to blockchains, but the underlying problem does not. Any market where someone sees orders before they run, and can act on them or decide their sequence, has a version of it. A public chain adds one thing: the sequence is recorded where you can read it afterwards.

Why not set my slippage tolerance as tight as possible?

The price can also move for ordinary reasons while your swap waits. A very tight tolerance makes the swap fail more often, and a failed swap can still cost gas. The aim is a tolerance that fits the trade and the pool, not the smallest value the interface accepts.

Does MEV matter if I only trade small sizes?

Usually less. The room a sandwich needs comes from how far your trade moves the price and how much slippage you allow. A small trade in a deep pool leaves little to take. The same trade in a thin pool, or with a wide tolerance, can still be a target.

Contents
Topics

92 articles in total

Ready to trade with our capital?

Pass the evaluation and trade funded on a prop firm built by traders, for traders.

Get Funded

More Insights