Curriculum·S201 Market Structure and Price Formation·about 31 min
AMMs vs order books
By the end of this lesson you can
- →Explain how a constant-product pool sets a price without anybody quoting one
- →Compute price impact from pool reserves, and show why it is a function of trade size against depth
- →Describe how transaction ordering converts a public pending trade into an extractable position
- →Choose between venue types for a given trade, and set the parameters that bound the outcome
Sophomore · enrolled learners
This lesson opens with The $220,764 sandwich, March 2025.
- What happened
- On 12 March 2025 a trader submitted a swap of $220,764 in USDC for USDT on a Uniswap v3 pool. Within about eight seconds a searcher's transaction was ordered ahead of it, removing the USDC-side liquidity from the pool, so that the victim's swap executed against drastically worsened reserves and returned $5,271. A second transaction restored the pool afterwards. The extracted value was roughly $215,500, of which the searcher paid about $200,000 to the block builder and retained about $8,000. The same trader was reported to have been sandwiched six times across different wallets, with funds routed from a lending protocol beforehand, which led several observers to suggest the transactions may have been constructed deliberately rather than being ordinary victims.
- The decision point
- The trade was between two assets that are supposed to be worth the same thing, on the deepest venue for that pair, and it lost 98 percent. Nothing was hacked and no contract misbehaved. The pool priced the swap against whatever its reserves were at the moment of execution, and the ordering of transactions inside the block, which the trader did not control and could not see, determined what those reserves were.
- Recorded loss
- $215,000
What you will be able to answer
- →How does a constant-product pool set a price?
- →What determines price impact in a pool?
- →What is a sandwich?
- →What bounds the outcome of a pool trade?
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://cointelegraph.com/news/crypto-trader-loses-least-215000-stablecoins-from-sandwich-attack
- https://blockonomi.com/crypto-trader-loses-215000-in-mev-sandwich-attack-on-uniswap/
- https://docs.uniswap.org/concepts/protocol/concentrated-liquidity
- https://www.coindesk.com/research/market-spotlight-the-19-billion-liquidation-that-shook-crypto
Confidence medium·Volatility medium·Reviewed 2026-08-05·Owner unassigned
Contested
Several observers noted the same trader was sandwiched repeatedly across wallets with funds routed from a lending protocol, and suggested the transactions may have been constructed to move value to a builder rather than being ordinary victims. That interpretation is unproven and the mechanism is identical either way. State both and rest the lesson on the mechanism.
Extraction and builder payment figures come from on-chain reconstruction by researchers and vary slightly across accounts. The 98 percent loss on the victim's swap is the stable and load-bearing figure.
Mitigations in this area, including private submission routes and pool designs that resist extraction, change quickly. Teach the mechanism and check the mitigations at each review rather than naming current tools.
