Skip to main content
Menu

⚠️ Risk Warning: Trading forex, CFDs, and cryptocurrencies involves substantial risk of loss and may not be suitable for all investors. This platform provides educational content only and does not constitute financial advice.

◎ Level 3 · Intermediate Market Structure & Exchanges Decentralised Exchanges (DEX)

Order Book DEXs

Understand decentralised order book exchanges, on-chain and off-chain orders, settlement, sequencers, custody and cancellation risk.

Progress 0%

Reading progress — saved on this device

MARKET STRUCTURE & EXCHANGES · DECENTRALISED EXCHANGES (DEX)

An order-book DEX organises bids and asks like a centralised venue while using blockchain-based contracts, specialised chains or hybrid infrastructure for custody and settlement. The label “DEX” describes a spectrum of architectures rather than one standard design.

Risk first. Self-custody does not eliminate protocol risk. Off-chain relays, sequencers, admin keys, bridges and smart contracts can create liveness or security dependencies even when final settlement is on-chain.
Last reviewed: 21 August 2026 · Educational content only

Map three separate layers

To understand an order-book DEX, ask where each of these functions occurs:

LayerPossible designsMain question
Order storageOn-chain, off-chain relay, specialised chainWho can see/censor orders?
MatchingSmart contract, sequencer, off-chain engineWho decides ordering/priority?
SettlementL1/L2 contract, appchainWhen is ownership final?

A system can be non-custodial at settlement while still relying on a central relay for order discovery or a sequencer for liveness. That is different from giving the relay custody of funds.

Signed orders and cancellation

  • Some DEXs store every order on-chain, giving strong transparency but higher transaction/storage cost.
  • Hybrid systems can let users sign orders off-chain; a relayer or matching service distributes them without moving assets.
  • When a match occurs, a smart contract verifies signatures and transfers assets according to permissions.
  • Cancellation can be off-chain, on-chain or nonce-based depending on design.
  • Gas, block time and sequencing affect how quickly a cancellation becomes economically final.
Key distinction: a relayer can be a liveness dependency without necessarily being able to steal funds. Analyse availability and custody separately.

Architecture risk map

On-chain order book

Transparent state; potentially higher gas/storage cost and public-order MEV exposure.

Off-chain relay

Cheaper order placement; relay can affect discovery or censorship depending on alternatives.

Sequencer/appchain

Higher throughput; additional ordering/liveness assumptions.

Smart-contract settlement

Self-custody benefits; code, upgrade and permission risk remain.

Displayed depth also needs scrutiny. A large order book is less useful if settlement throughput, oracle/risk controls or chain congestion prevent the advertised liquidity from being executed reliably.

Worked example

A trader signs a limit order off-chain: “sell 10 tokens at £50 or better”. The signed message goes to a relay, but the tokens remain in the trader's wallet or margin account.

A taker accepts 4 tokens. The settlement transaction submits both parties' signed instructions to a contract, which checks validity and transfers assets. Six tokens remain unfilled under the order's rules.

If the trader sends an off-chain cancel but the relay has not propagated it—or cancellation requires an on-chain nonce update—the old signed order may still be fillable under protocol rules. The user must understand which action actually invalidates the signature.

Decision discipline: document custody location, signature validity, cancellation finality, sequencer/relay role and settlement chain before trading meaningful size.

Common mistakes and misunderstandings

  • Assuming every DEX order book is stored fully on-chain.
  • Equating self-custody with absence of protocol or admin risk.
  • Ignoring cancellation latency during volatile markets.
  • Comparing displayed depth without checking settlement capacity.
  • Calling a sequencer “custodial” merely because it controls ordering.
Signature risk: understand what you are signing and how it is invalidated. A wallet disconnect in a web interface does not necessarily cancel previously signed orders.

Knowledge checkpoint

  1. Why should order storage, matching and settlement be mapped separately?
  2. How can a relay be a liveness dependency without controlling funds?
  3. Why can cancellation latency create risk even if assets remain self-custodied?
  4. What would make displayed order-book depth less useful than it appears?

FAQ

❓ Are order book DEXs fully on-chain?

Not always. Hybrid architectures are common.

❓ Are they always non-custodial?

Often, but inspect the actual custody and settlement design.

❓ Do they avoid MEV?

No. Ordering and settlement design determine MEV exposure.

❓ Why can cancellation take time?

The protocol may require sequencer or blockchain state to invalidate the order.

Summary

  • Order-book DEXs combine bid/ask market structure with blockchain-based settlement.
  • Order storage, matching and settlement can live in different places.
  • Self-custody reduces some counterparty risk but not contract/liveness risk.
  • Cancellation and signature validity are core operational concepts.

This building block is educational and not a trade recommendation.

BUILD YOUR OWN PATH

Want this in a personalised order?

Take the crypto assessment and get a custom path of 10 modules matched to what you already know. Free, no card required.

Build my path →