ONCHAIN SYSTEMS · COURSE 001

Who Gets to Choose the Order?

MEV is not a mysterious profit number. It is a state transition shaped by visibility, execution order, slippage protection, and block-builder power.

4 lessonsabout 55 minbeginner friendly
COURSE EXAMPLEWho gets to choose the order?

Put one user swap through a public mempool, a builder, a proposer, and an AMM. Compare visibility, ordering, protection, and value extraction.

PARTICIPANTS
  • UUser: signs a swap with a minimum-output boundary
  • SSearcher: scans visible intent for an executable sequence
  • BBuilder: chooses a block order and bundle
  • PProposer: publishes the block and receives ordering payment
COURSE OUTLINE

One question per lesson

The lessons are ordered so that each one uses concepts introduced earlier.

  1. 01
    MEMPOOL · ORDERING · STATE

    Who Can See a Trade Before It Executes?

    KEY QUESTIONHow can others use a transaction before it is onchain?

    Follow a swap from wallet to public or private flow to a block, separating intent, pending content, and shared executed state.

    MempoolTransaction orderingBlock proposerVisibilityState transition
    12 MIN
  2. 02
    SANDWICH · SLIPPAGE · USER PROTECTION

    What Does a Sandwich Searcher Extract?

    KEY QUESTIONIf the user transaction succeeds, how can a sandwich still harm it?

    Place a searcher before and after the user, then compare minimum output, pool price, and extracted difference.

    Sandwich attackSlippage limitPrice impactSearcherExtraction
    15 MIN
  3. 03
    BACKRUN · ARBITRAGE · PRICE GAP

    Who Back-runs the Price Gap a User Creates?

    KEY QUESTIONA backrun repairs price. Why call it value extraction?

    Let a user swap move the pool, then let a searcher back-run the new price and put inventory and tips on one ledger.

    Back-runArbitragePrice gapInventoryOrdering tip
    13 MIN
  4. 04
    BUILDER · PRIVATE FLOW · TRADE-OFF

    Does Hiding a Trade Make Ordering Fair?

    KEY QUESTIONDoes keeping an order out of the public mempool eliminate MEV?

    Compare public and private order flow to see what searcher visibility changes—and which trust boundaries remain.

    BuilderPrivate order flowProposerCensorshipTrust boundary
    15 MIN
WHAT IT COVERS

Questions covered in this course

01

Why pending intent is not shared executed state

02

How a sandwich changes output and how slippage guards create a revert boundary

03

Why back-run arbitrage depends on the user's earlier state change

04

What private order flow removes—and which trust boundaries remain