Free module
Block building, ordering and MEV, taught defensively
Learn how blocks are built and how MEV harms users, hands on: the mempool, sandwich attacks, proposer-builder separation and the defences.
The lessons
Each lesson is free and interactive. Press Start lab to run its commands in a live lab and to sit its quizzes and tasks, with no account needed.
1 · Container lab
The mempool and why transaction order matters
I can explain why the order of transactions in a block changes what each user gets.
Read the lesson2 · Container lab
Front-running and sandwich attacks on a swap pool
I can calculate what a sandwich around a swap costs the user on a constant-product pool.
Read the lesson3 · Container lab
Block builders, relays and proposer-builder separation
I can pick the winning bid in a proposer-builder auction and say who does what.
Read the lesson4 · Container lab
How users defend against sandwich attacks
I can work out whether a slippage limit would have blocked a sandwich and what it saved the user.
Read the lesson5 · Container lab
Commit-reveal, encrypted mempools and fair ordering
I can verify commit-reveal openings and put the valid orders in commit order.
Read the lesson6 · Container lab
Measuring MEV: who gets the value
I can measure how extracted value is shared out and how concentrated block building is.
Read the lesson
Worked in a real lab
Every lesson of this module is worked in a lab started for you alone. The labs it uses:
Teaching a class? Set this module for your students with a teacher guide, marked assignments and a lab for every student.