Curriculum·J302 Swap Execution: AMMs, MEV, and DEX Architectures·about 32 min
Intents and solvers
By the end of this lesson you can
- →Distinguish stating a route from stating an outcome, and what each exposes
- →Explain what solver competition provides and what it requires you to delegate
- →Compute the mempool exposure an intent route removes
- →Evaluate an intent system by its bond, its allowlist and where user funds rest
Junior · enrolled learners
This lesson opens with The CoW Swap solver exploit, 7 February 2023.
- What happened
- CoW Swap fills user intents through a competition among allowlisted solvers, each of which must post a bond before entering production. A solver called Barter entered the competition on 27 January 2023, passed through staging, deposited its bond and was allowlisted. Shortly afterwards it set an approval from the settlement contract to a contract of its own called SwapGuard. A flaw in SwapGuard permitted arbitrary call execution, and an attacker used that path together with the existing approval to move funds out of the settlement contract, taking around 551 BNB, roughly $181,600, which was sent through Tornado Cash. User funds were not compromised at any point. The protocol's design required each solver to post collateral of $500,000 in cUSDC and 1.5 million COW precisely so that misbehaviour could be covered by slashing.
- The decision point
- Two things are true and both are the lesson. A permissioned party with production access introduced a contract that could be exploited, which is exactly the risk an intent system takes on when it delegates execution. And no user lost anything, because the architecture never rests user assets in the contract that was drained and requires a bond larger than the exposure. The failure occurred where the design predicted it would and was contained by the mechanism built for it.
- Recorded loss
- $181,600
What you will be able to answer
- →What is an intent?
- →What does an intent route remove and what does it add?
- →What is the coincidence of wants worth?
- →How do you evaluate an intent system?
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://blog.cow.fi/cow-swap-solver-exploit-post-mortem-07-02-2023-2faa9f918e29
- https://cointelegraph.com/news/cow-swap-hacker-milks-over-550-bnb-using-solver-exploit
- https://thedefiant.io/news/defi/market-maker-hacks-cow-swap
- https://medium.com/neptune-mutual/how-was-the-cow-protocol-exploited-3ca6d0cd82cf
Confidence high·Volatility high·Reviewed 2026-08-06·Owner unassigned
Contested
Reported losses range from about $166,000 to $181,600 depending on the BNB price used. Bond sizes and allowlisting procedures change and the figures here are those reported at the time of the incident, so they should be checked rather than assumed current.
This lesson deliberately reports an outcome where the architecture worked. Per P6 that is as important to state as the failures elsewhere in this course, and it is the reason the evaluation questions focus on containment rather than on whether a failure can occur.
