Curriculum·J302 Swap Execution: AMMs, MEV, and DEX Architectures·about 33 min
MEV
By the end of this lesson you can
- →Name the parties in the ordering supply chain and what each one is trusted with
- →Distinguish the extractive forms of MEV from the ones the system depends on
- →Compute the swap size at which you become worth sandwiching, given a tolerance
- →Evaluate private routing as a substitution of counterparty risk rather than a removal
Junior · enrolled learners
This lesson opens with The mev-boost relay exploit, 3 April 2023.
- What happened
- Under proposer builder separation, a relay holds a block's contents and releases them to the proposer only once the proposer has irrevocably signed a commitment to that block. On 3 April 2023 a proposer exploited a vulnerability in the open source mev-boost-relay implementation maintained by Flashbots. They first baited sandwich bots with swaps sent to the public mempool with infinite slippage, then submitted a signed but deliberately invalid block, with the parent root and state root set to zero, to the ultra sound relay. The relay replied with the transactions that should have been included. Because the block was invalid it was never propagated, but the proposer now knew the intended contents and could reorder them, reversing sandwich bundles against the searchers who had built them. Flashbots reported roughly $20M taken. On 21 April the exploiter emailed Justin Drake, samczsun and Robert Miller of Flashbots with a further disclosure, asking to be called low-carb-crusader. In May 2024 the United States Department of Justice charged two brothers, alleging about $25M taken within about twelve seconds. A federal judge declined in 2025 to dismiss most of the charges, the November 2025 trial ended in a mistrial when the jury could not reach a verdict, and a retrial has been set for June 2027. Neither brother has been convicted.
- The decision point
- The parties robbed were the sandwich bots, which is the detail that makes this instructive rather than merely ironic. Every participant in that supply chain, including the searchers who extract from ordinary users, was relying on one assumption: that the relay would not reveal a block's contents to a proposer who had not committed to publishing it. That assumption was load-bearing, undocumented as a risk, and false. Anybody routing transactions privately to avoid the public mempool is relying on the same class of assumption.
- Recorded loss
- $20,000,000
What you will be able to answer
- →What is MEV?
- →Where does extracted value actually go?
- →At what size do you become worth sandwiching?
- →Which forms of MEV does the system depend on?
Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.
It is free. We do not sell the list and there is nothing to buy at the end of it.
Sources and review
- https://collective.flashbots.net/t/post-mortem-april-3rd-2023-mev-boost-relay-incident-and-related-timing-issue/1540
- https://www.halborn.com/blog/post/explained-the-mev-bots-hack-april-2023
- https://unchainedcrypto.com/doj-alleges-two-brothers-stole-25-million-from-mev-bots-last-year/
- https://collective.flashbots.net/t/disclosure-mitigation-of-block-equivocation-strategy-with-early-getpayload-calls-for-proposers/1705
- https://www.justice.gov/usao-sdny/pr/two-brothers-arrested-attacking-ethereum-blockchain-and-stealing-25-million
- https://www.courtlistener.com/docket/68532791/united-states-v-peraire-bueno/
- https://cointelegraph.com/news/crypto-trader-loses-least-215000-stablecoins-from-sandwich-attack
Confidence high·Volatility high·Reviewed 2026-08-06·Owner unassigned
Contested
Loss figures differ by source, with Flashbots reporting roughly $20M and the DOJ alleging $25M. The mechanism is not in dispute. The legal case is not resolved: on the SDNY docket (United States v. Peraire-Bueno, 24-cr-293), the court denied the motions to dismiss in 2025 except on the receiving stolen property count, declared a mistrial on 7 November 2025 after the jury failed to return a verdict on any count, heard argument on a joint motion for acquittal in March 2026, and on 2 April 2026 set a retrial for 7 June 2027. This lesson describes what was alleged and what was disclosed rather than asserting guilt, and should be re-checked against the docket at each review.
The 96 percent split in the worked example is one documented sandwich, from Michael Nadeau's reading of the transactions as reported by Cointelegraph. It illustrates where value can go under builder competition and is not a measured average across sandwiches.
Lessons 9 and 10 of this course own aggregators, routing and intents as venue architecture. This lesson covers only what private routing does to your mempool exposure and what it substitutes. Keep the split.
Whether sandwiching should be characterized as theft or as a permissionless market activity is genuinely contested and this lesson does not settle it. What is not contested is the arithmetic of when it happens to you, which is what a reader can act on.
