← All insights

Infrastructure/

MEV, private order flow, and what execution quality means on-chain

Every transaction is visible before it is final, and a market of specialists is paid to act on that. The gap between the price a position should have got and the price it did is a cost like any other, and it can be managed.

In a traditional market an order is private until it is filled. On a public blockchain it is not. A transaction is broadcast to a shared waiting area, the mempool, where anyone can read it before it is included in a block. The people who build blocks decide the order in which transactions execute, and that ordering has value. Ethereum’s developer documentation defines maximal extractable value as the value that can be captured from block production beyond the standard reward and gas fees, by including, excluding or reordering transactions.

Daian and co-authors documented the phenomenon in 2019 under the title Flash Boys 2.0, showing bots competing in priority-gas auctions to front-run trades on decentralized exchanges. The market has industrialized since. For a desk executing on-chain, the practical consequence is that a swap sent naively can be traded against before it lands.

The forms it takes

Three patterns account for most of what a trader loses. Front-running places a transaction ahead of the victim’s to buy what the victim is about to buy. Sandwiching does that and adds a sale immediately after, capturing the price impact the victim created. Back-running, arbitrage against the pool’s price after a large trade moves it, takes value from liquidity providers rather than the trader directly. Ethereum’s documentation describes each of these and notes that the tolerance a user sets on slippage is the size of the target they paint on themselves.

  • Front-running: buying ahead of a visible order to sell into its price impact
  • Sandwiching: a buy before and a sell after the victim’s trade, extracting the impact both ways
  • Back-running: arbitrage against a pool immediately after a large trade moves its price
  • Liquidation racing: competing to be the liquidator of an under-collateralized loan, which is benign for the protocol and costly for the borrower

How the plumbing changed

After Ethereum’s move to proof of stake, most blocks came to be assembled by specialized builders and sold to validators through an auction, a design known as proposer-builder separation and implemented through MEV-Boost. Builders compete on the value of the block they can construct, which means the value of ordering flows largely to validators rather than being dissipated in gas wars. It also creates a channel: a transaction can be sent directly to builders rather than to the public mempool.

That channel is what private order flow uses. Flashbots Protect, for example, routes a transaction to a private pool where it is hidden from front-running and sandwich bots until it is included, and can return part of the value a builder extracts from it. On Solana, where the block production model differs, Jito provides bundles and a fast path to block builders that serve a similar purpose. Batch auction designs such as CoW Protocol take another route, settling all trades in a batch at a uniform clearing price so that ordering within the batch has no value to extract.

What execution quality means here

A desk that measures its exchange fills against arrival price should measure on-chain fills the same way. The benchmark is the price the pool quoted when the decision was made. The cost is the difference between that and the price actually received, decomposed into the position’s own impact, the fee, gas, and anything extracted by someone who saw the transaction first. The last component is the one that private routing addresses, and it can be measured by comparing fills sent privately with fills sent publicly on the same pair in the same conditions.

Slippage limits are the other lever. Set wide, they invite sandwiching, because a bot can move the price to the limit and still have the transaction succeed. Set tight, they cause failures in ordinary volatility, and a failed transaction still pays gas. The right limit depends on the pair’s volatility at the moment of sending, which argues for setting it dynamically rather than as a fixed default.

Operational rules that follow

Route through private relays or order-flow auctions wherever the chain supports them, and treat public mempool submission as an exception that needs a reason. Split large legs across venues and blocks so that no single transaction carries impact worth attacking. Bundle multi-step operations so that they succeed or fail together, which removes the exposure of being left mid-sequence. Simulate every transaction against current state before broadcast so that its outcome is known. And record the arrival price for every on-chain fill so that the cost of execution is a measured number rather than an impression. The mempool is a public place. Execution quality on-chain is mostly the discipline of not doing business in it.

Sources

  1. 01Ethereum.org, Maximal extractable value (MEV)
  2. 02Daian et al., Flash Boys 2.0: frontrunning, transaction reordering, and consensus instability in decentralized exchanges
  3. 03Flashbots documentation, Flashbots Protect overview
  4. 04CoW Protocol documentation, MEV protection
  5. 05Jito documentation