What is a decentralised exchange (DEX), and how is it different from a centralised one?
A decentralised exchange (DEX) is a set of smart contracts that lets people swap tokens straight from their own wallets, with prices set by formulas rather than a company's order book.1,2 You keep control of your tokens until the swap, which settles in one blockchain transaction.3,4
Smart contracts instead of a company
The BIS describes decentralised exchanges (DEXs) as marketplaces where trades happen directly between traders, and prices are set by automated mathematical formulas.1 ethereum.org calls a DEX an Ethereum app that lets you swap tokens with others on the network.5
Uniswap is one example. Its documentation describes it as a set of smart contracts that let anyone swap tokens, add liquidity or create new markets directly on the blockchain.2 It says a pool is just a smart contract that users operate by calling its functions.6 Module 4 explains smart contracts.
Uniswap's documentation says its core contracts cannot be upgraded once deployed. No one can pause them or reverse a trade, though Uniswap's governance can switch on protocol fees within set limits.2 Other DEXs are built differently, so check each one's own documents.
You keep custody until you swap
On a centralised exchange you deposit first. On a DEX, ethereum.org says, "you never give up control of your assets".3,7 Uniswap Labs, which runs a Uniswap website and app, says in its terms that it has no custody or control over what is in your wallet.8
The swap itself is one step. You choose the tokens and the amount, the protocol works out what you will receive, and the tokens you buy arrive in your wallet straight away.4 Uniswap Labs' terms warn that these transactions settle automatically and can't be reversed once confirmed.8
You still pay the blockchain's network fee, called gas, for each transaction.8 Module 5 explains gas.
No account, no gatekeeper
ethereum.org says DEXs are not subject to geographical restrictions like centralised exchanges: anyone can take part.5 Uniswap's documentation says its protocol has no ability to restrict who can use it.2 That openness has a downside. Anyone can also create a new market, or a token with the same name as another, which Lesson 6 returns to.2,9
Front-ends and contracts
Most people never call a smart contract directly. They use a website or app, often called a front-end or interface. The BIS says these apps are not strictly needed, since users could build their own, but they are the way in for all but the most expert users.1
The front-end and the contracts are separate. Uniswap Labs' terms say its interface is distinct from the Uniswap Protocol and is "one, but not the exclusive" way to reach it. They add that Uniswap Labs does not control or operate the protocol.8
That split matters in practice.8,10
- A front-end can add its own features. Uniswap Labs' terms say its products may show warning labels on some tokens.8
- A front-end can charge its own fee. Uniswap Labs had charged fees on its own interface. A governance proposal carried out in December 2025 said those fees would be set to zero.10
- If a website goes down, the contracts keep running. No one can pause them, and users can reach them through another interface.2,8,1
Side by side
| Centralised exchange | Decentralised exchange | |
|---|---|---|
| Who holds your tokens | The exchange, until you withdraw7 | You, until the swap3 |
| How the price is set | Orders on the exchange's order book1 | A formula in a smart contract1,2 |
| Who you trade with | Other customers, matched by the exchange11 | The pool contract directly2 |
| Where trades are recorded | The exchange's own records1 | The blockchain2,4 |
| Identity checks | Yes, under anti-money-laundering rules (in the US, FinCEN's)12 | None in the Uniswap protocol itself2 |
A DEX is not risk-free. ethereum.org warns that Ethereum products, like any software, can suffer from bugs and exploits.3 Lesson 6 covers the risks.
- The crypto ecosystem: key elements and risks (report to the G20). Bank for International Settlements, 11 July 2023.
- How Uniswap Works. Uniswap Developers documentation (read 22 October 2026).
- What is DeFi?. ethereum.org (read 22 October 2026).
- Uniswap v2 Swaps. Uniswap Developers documentation (read 22 October 2026).
- Ethereum glossary (Decentralized exchange; Liquidity tokens). ethereum.org (read 22 October 2026).
- Pools (Uniswap v2). Uniswap Developers documentation (read 22 October 2026).
- Get ETH. ethereum.org (read 22 October 2026).
- Uniswap Labs Terms of Service (last modified 28 July 2026). Uniswap Labs; read via a Wayback Machine copy of 19 September 2026, as the live page showed a bot check.
- How to identify scam tokens. ethereum.org (read 22 October 2026).
- UNIfication (onchain proposal 93). Uniswap governance vote page on Agora (read 22 October 2026; rechecked 24 October 2026).
- Exchange Matching Engine. Coinbase Developer Documentation (read 22 October 2026).
- Application of FinCEN's Regulations to Certain Business Models Involving Convertible Virtual Currencies (FIN-2019-G001). US Treasury, Financial Crimes Enforcement Network (FinCEN), 9 May 2019.
General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-24. Terms and disclaimer.