Curriculum·J302 Swap Execution: AMMs, MEV, and DEX Architectures·about 31 min
On-chain order books and app-chains
By the end of this lesson you can
- →Explain why an order book is expensive to run on a shared chain
- →Compute the transaction cost of maintaining two-sided quotes on-chain
- →Identify account contention as a throughput limit independent of chain capacity
- →State what an app-chain buys and what it substitutes
Junior · enrolled learners
This lesson opens with The account that stopped a market, 14 September 2021.
- What happened
- During a token launch on Raydium's AcceleRaytor platform, Solana's transaction load peaked at around 400,000 per second, driven by bots. One of those bots structured its transactions to write-lock eighteen key accounts, among them the global SPL token program and the Serum decentralized exchange program. Because a transaction touching a write-locked account cannot execute in parallel with another touching the same account, this blocked every transaction interacting with those accounts and destroyed the parallel execution the chain relies on. The queue flooded, network-critical messaging was not prioritized, the network began to fork, and the chain was down for roughly seventeen hours until validators coordinated a restart.
- The decision point
- The property that makes an on-chain order book auditable is that its state lives in accounts anybody can read. That same property makes it contendable, because an order book is a small number of accounts and anybody willing to spend transactions can hold them. So the venue's practical throughput is bounded by contention on its own state rather than by the chain's advertised capacity, and on a shared chain that contention is created by activity which has nothing to do with the venue.
What you will be able to answer
- →Why is an on-chain order book expensive?
- →What is account contention?
- →What does an app-chain buy?
- →What does an app-chain substitute?
- →What is the hybrid design?
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://www.helius.dev/blog/solana-outages-complete-history
- https://www.theblock.co/post/190566/ftx-backed-dex-serum-calls-itself-defunct-promotes-community-fork
- https://coinmarketcap.com/alexandria/article/openbook-the-solana-dex-birthed-from-ftx-s-downfall
- https://www.coindesk.com/markets/2021/09/14/solana-validators-ready-potential-restart-amid-blockchain-outage
Confidence high·Volatility medium·Reviewed 2026-08-06·Owner unassigned
Contested
J301-02 uses the same halt to teach how to evaluate an alternative base layer, covering throughput tradeoffs, uptime as a misleading metric and the restart question. This lesson uses only the account contention mechanism and its consequence for order book venues, which J301-02 does not cover. Keep the split.
Transaction cost figures for maintaining quotes are illustrative and depend on the chain, the fee market and the strategy's refresh rate. The order of magnitude is the point, and it is what determines where this architecture is viable at all.
