Transaction ordering on some chains is an auction. Understanding it explains surprising
fills and unexpected losses.
What happens behind the scenes
When you broadcast a transaction, it does not always go straight into a block. On many
chains, a block builder or proposer decides the order.
Specialised participants observe pending transactions and reorder them profitably. This is
commonly called maximal extractable value.
The common practices
Front-running. Placing a transaction before yours that benefits from the price movement your
transaction causes.
Back-running. Placing a transaction immediately after yours, often for arbitrage.
Sandwich attacks. Placing a buy before yours and a sell after, capturing the price impact
your trade creates. This is most common with large slippage tolerances.
Priority auctions. Paying a higher fee to be included sooner, which is legitimate competition
for block space.
Why your transaction gets ordered that way
- Your fee is low relative to pending transactions
- Your trade is large relative to pool depth, making the price impact visible and exploitable
- Your slippage tolerance is high, which tells an observer how much you will accept
- The chain's ordering rules allow reordering
What you can do
- Set slippage tolerance to what the market needs, not higher
- Split large orders into smaller ones
- Use private or protected routing where available, which avoids public mempool exposure
- Time transactions away from periods of extreme volatility
- Accept that on many chains, ordering is not first-come-first-served
The takeaway
Ordering is part of the execution, not an accident of it.
Lower slippage, smaller orders, and protected routing reduce what is extractable from you.