Who Back-runs the Price Gap a User Creates?
Let a user swap move the pool, then let a searcher back-run the new price and put inventory and tips on one ledger.
- Explain why a back-run depends on an earlier state change
- Compare pool price, external reference, and searcher inventory
- Show why arbitrage profit is not minted from nowhere
- PREVIOUSWhat Does a Sandwich Searcher Extract?
- CURRENTWho Back-runs the Price Gap a User Creates?
Let a user swap move the pool, then let a searcher back-run the new price and put inventory and tips on one ledger.
- NEXTDoes Hiding a Trade Make Ordering Fair?
Think about these questions first.
Choose an answer before opening the explanation. You can add anything unexpected to your review list.
Q01A backrun repairs price. Why call it value extraction?+
It can improve the next price while allocating the temporary gap created by the user to searchers and proposers. System usefulness and fair distribution are separate questions.
A large user swap can push the pool price away from an outside reference. A back-runner does not need to beat the user; it only needs to execute after the user, against the reserves that have already changed.
Where does the gap come from?
When the user buys TOKEN with credits, the pool holds less TOKEN and more credits, so its price rises. That state can temporarily diverge from another market. The searcher sells TOKEN after the user in the same block and captures part of the gap created by the new state.
Who gets to choose the order?
Put one swap into a deterministic pool, then watch visibility, ordering, slippage protection, and extraction change the result.
Compare the pool state before and after a user trade, then inspect the back-run inventory ledger.
- 01Mempoolintent is visible→
- 02Block orderwho goes first→
- 03Statereplayed by nodes
A mempool record is not a fill. The block order is not a payout. Only execution moves balances and pool reserves.
Searcher profit, proposer tip, pool fees, and user output live on the same ledger.
Submit one user swap first. The key question is not whether the transaction is valid, but who can see and order it before it becomes shared state.
- 01
Public pool created: 120,000 credits + 1,000 TOKEN, any public transaction can change the next quote.
Use the slider to return to an earlier step. Continuing from there replaces the later history with a new sequence.
The lab keeps the searcher's starting TOKEN and credits, pool reserves, searcher P/L, and proposer tip on one ledger. A back-run does not create TOKEN; it moves inventory and price again.
Expand: how this step works
poolPrice_before = pool.quote()
execute(victim)
poolPrice_after = pool.quote()
if poolPrice_after != externalReference:
execute(searcher_backrun)
pay(ordering_tip)
Real strategies can span pools, use flash liquidity, or combine with liquidations. This teaching model keeps one pool and one deterministic order so the dependency and asset flow stay visible.
Why does a back-run depend on the user executing first?
Put the proposer on the ledger
Ordering power has a price. In this lab the searcher pays an explicit tip to the proposer; real systems can use bundles, gas, builder auctions, and other payment paths. Ask who pays, who receives, and who can reject or reorder the block.