Start typing to search this publication.
BlazePhoenix logo BlazePhoenix
Open menu
BlazePhoenix logo

Subscribe to BlazePhoenix

Get new posts delivered straight to your inbox.

MEV Lives in the Gap Between Quote and Execution

BlazePhoenix avatar BlazePhoenix
2 min read

Every sandwich attack needs one ingredient: time.

Not much. A few seconds. But in those seconds, the price you were shown and the price you will get are two different numbers, and somebody is paid to stand between them.

Let us slow a swap down to five moments and look at where the gap opens.

T0: The quote

A server reads a set of pools and runs a simulation. It sends you a number. From this moment on, that number gets older.

T1: You decide

You look at the number, maybe compare it with another app, set your slippage, click. Human time. Seconds, sometimes longer.

T2: You sign

Your wallet builds the transaction. It includes a route (picked at T0) and a minimum output (derived from the T0 quote and your tolerance).

T3: The mempool

Your transaction is now public. Anyone can read the route, the size and the minimum. A searcher can compute exactly how far the price can be pushed before your swap would fail, and trade right up to that edge.

T4: Execution

The chain runs your swap against the pools as they are now, not as they were at T0. If the result is above your minimum, it succeeds.

The gap

Look at the timeline again. The route was chosen at T0. The money moves at T4. Everything between them is exposure: stale routes, stale prices, and a public minimum that tells a searcher how much room there is.

You cannot make T1 zero. You are human. But you can change what happens at T0 and T4.

Closing the gap from both ends

Disclosure: I work on BlazePhoenix, an on-chain DEX aggregator. Here is how we approach the timeline.

At T0, the quote is computed on-chain. The Quoter contract produces it, and you can reproduce it with a plain eth_call on your own RPC, with no API key. The forecast stops being a black box: you can check it against the same state the chain will use.

At T4, the route is decided at execution. The route is computed inside the transaction that executes it, so the path reflects the pools at T4, not the pools at T0.

The minimum is enforced on-chain. The swap reverts unless you receive at least the minimum you signed.

If T4 is better than T0, you keep it. Execution surplus goes to the user.

What this does not do: it does not make the mempool private, and it does not remove the incentive for searchers. A tight minimum is still your best defense against being traded around. What it removes is the stale route and the unverifiable quote.

We are pre-launch. The contracts are not yet audited by an external firm; an independent external audit is scheduled.

One habit

Next time you swap, count the seconds between the quote appearing and your click. Then remember the route was frozen at the start of that count.

If that bothers you, read how on-chain quoting works at blazephoenix.xyz.

Subscribe to BlazePhoenix