Curriculum·J302 Swap Execution: AMMs, MEV, and DEX Architectures·about 32 min

The four architectures

By the end of this lesson you can

  • Classify any venue by where price is formed and where matching happens
  • State what each architecture does well and the specific way each one fails
  • Identify which component of a venue is on-chain and which is somebody's server
  • Select an architecture from the property you need rather than from familiarity

Junior · enrolled learners

This lesson opens with Four architectures, four failure shapes.

What happened
This is a pattern drawn from the verified incidents in this course and this level rather than a single event, and it is labeled as such. An automated market maker failed when its accounting assumed a transfer moved the stated amount and a token class existed for which that was false, draining pools of about $450,000. An on-chain order book was rendered unusable not by a defect but because one company held its upgrade authority and collapsed. An aggregator lost about $11.6M from 153 wallets that had granted it unlimited approvals, when a newly added component allowed arbitrary calls. An intent settlement system lost about $166,000 when a permissioned solver introduced a contract with an arbitrary call path, while user funds were untouched because they never sat in the contract that was drained.
The decision point
Each architecture failed at the component that is distinctive to it. The market maker failed at its pricing assumption, the order book at its upgrade key, the aggregator at the approval it requires to function, and the intent system at the party it delegates execution to. None of them failed in a way the others were exposed to, which means choosing a venue is choosing which failure surface you accept rather than choosing a level of safety.

What you will be able to answer

  • What are the four architectures?
  • What is the classifying question?
  • Where does each one fail?
  • What does choosing a venue actually choose?

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

Confidence high·Volatility medium·Reviewed 2026-08-06·Owner unassigned

Contested

J302 owns the mechanics of a single swap, being constant product pricing, price impact and slippage, the transaction lifecycle, MEV and execution discipline. This course owns venue selection. The split resolves a conflict between two versions of the curriculum map and is stated in both courses so it cannot be reopened silently.

The four-way taxonomy is a simplification and real venues combine elements, with hybrid designs holding an order book off-chain and settling on-chain, or routing through pools while accepting intents. The classifying question in this lesson resolves hybrids correctly because it asks about components rather than labels.