Who Can See a Trade Before It Executes?
Follow a swap from wallet to public or private flow to a block, separating intent, pending content, and shared executed state.
- Separate a signed intent, a pending transaction, and an executed block
- Explain why ordering changes the next quote
- Identify when a searcher gains usable information
- PREVIOUSCourse introduction
- CURRENTWho Can See a Trade Before It Executes?
Follow a swap from wallet to public or private flow to a block, separating intent, pending content, and shared executed state.
- NEXTWhat Does a Sandwich Searcher Extract?
Think about these questions first.
Choose an answer before opening the explanation. You can add anything unexpected to your review list.
Q01How can others use a transaction before it is onchain?+
The public mempool broadcasts pending intent. Searchers simulate how it will change state, submit surrounding transactions, and compete to place them in the same block.
A signed transaction is not immediately a fact every node agrees on. It can enter a public mempool, be observed and reordered by a searcher or builder, and only change balances and pool reserves when a block executes it.
Pending is not executed
“Submitted” in a wallet, pending in a node, and executed in a block are three different states. A public mempool is a waiting room: it reveals intent to other participants without promising the final order.
Who gets to choose the order?
Put one swap into a deterministic pool, then watch visibility, ordering, slippage protection, and extraction change the result.
- 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 starts with a user swapping 12,000 credits for TOKEN. Submit it to the mempool and watch the quote appear while reserves stay unchanged; only after a block order is built and executed does the state settle.
Expand: how this step works
wallet signs transaction
→ public/private pending flow
→ builder chooses an order
→ proposer publishes a block
→ every node replays the same state transition
A public mempool is not the consensus layer; private order flow is not the absence of ordering power. A sound design names visibility, cancellation/replacement, censorship, and execution boundaries separately.
Why has a pending transaction not become shared state yet?
The audit question left behind
When you see an “MEV profit” number, ask three things: who saw what, who chose the order, and which execution moved the asset. Keep those boundaries separate before moving to sandwiches and back-runs.