Assembling core
Skip to content
Web3

CEX and DEX: the two decisions that actually separate them

Matching latency and custody are the real dividing lines between centralised and decentralised exchanges, not ideology. How each choice propagates through architecture, risk and compliance.

8 min read

Comparisons between centralised and decentralised exchanges usually collapse into a values argument. That is not useful when you are building one. Architecturally there are two independent decisions, and almost every difference in behaviour, cost and regulatory exposure follows from them.

Decision one: where matching happens

A centralised matching engine holds the order book in memory on a single machine, or a tightly coupled cluster, and processes orders sequentially. Throughput reaches hundreds of thousands of orders per second and cancel latency is measured in microseconds. Nothing decentralised approaches this, and the reason is structural: consensus exists to make many parties agree, and agreement takes time.

Cancel latency in particular determines who is willing to make markets. A maker who cannot cancel quickly is exposed to being picked off on stale quotes, and prices that risk into the spread. This is the mechanism behind most liquidity differences between venue types.

Decision two: who holds the assets

Custody is orthogonal to matching, and this is the point most comparisons miss. A venue can match off-chain while never taking custody — settlement occurs on-chain against balances the user controls. That combination gets much of the latency benefit without the custody risk, which is why it keeps being rebuilt.

Custody is also what drives the regulatory profile. Holding customer assets makes an operator a custodian, with the licensing, segregation, audit and reporting obligations that follow. A non-custodial venue faces a different, and generally lighter, set of questions.

What each decision propagates into

  • Failure modes. Custodial venues fail catastrophically and rarely — an operator loses or misuses funds. Non-custodial venues fail narrowly and more often — a contract bug, an oracle deviation, a sequencer stall.
  • Listing. Permissionless listing is a property of on-chain settlement, not of matching. It is why long-tail assets appear on-chain first.
  • Auditability. On-chain settlement makes solvency verifiable continuously. Custodial venues approximate this with proof-of-reserve attestations, which are point-in-time and rely on the auditor.
  • Recovery. A centralised operator can reverse an erroneous trade. A settled on-chain trade is final. Finality is a feature until the day it is not.

Where the line is moving

The interesting venues no longer sit at either pole. Off-chain matching with on-chain settlement takes the latency of one and the custody model of the other. Intent-based routing hides venue choice from the user entirely. Meanwhile centralised venues have adopted on-chain settlement rails and reserve attestations, borrowing verifiability in the other direction.

For a team building in this space, the useful framing is not which side to take but which of the two decisions the product actually depends on. A derivatives venue serving professional makers is constrained by cancel latency. A spot venue for long-tail assets is constrained by listing and custody. They are different systems, and treating them as points on one axis produces an architecture that serves neither well.

Ready to scope it properly?

Bring the problem, the constraints and the deadline. We will come back with an architecture and an honest view of effort.