What Is a DEX? Decentralised Exchanges Explained
A decentralised exchange — a DEX — lets you swap one crypto token for another straight from your own wallet, with no account, no sign-up, and no company holding your coins. It's one of the building blocks of DeFi, and for a lot of people it's the first place crypto stops feeling like an app and starts feeling like genuinely open finance. This guide explains how a DEX works, how it differs from an exchange like Coinbase, and the risks you need to understand before you ever click 'swap'.
The 20-second version
A DEX is a set of smart contracts that swaps tokens directly between users' wallets. You stay in control of your coins the whole time — but that also means there's no support desk, no password reset, and no one to reverse a mistake.
Read this first
DEXs are powerful but unforgiving
On a DEX there is no account recovery and no refunds. Send to the wrong token, approve a malicious contract, or fall for a fake link and the money is usually gone for good. This guide is education, not financial advice — only ever use funds you can afford to lose, and never borrow to trade.
What is a DEX?
A centralised exchange (a 'CEX') like Coinbase or Binance works a lot like a bank. You create an account, prove your identity, deposit money, and the company holds your coins for you and matches buyers with sellers behind the scenes. It's familiar and convenient — but it also means a company sits between you and your money, and you're trusting them to stay solvent, stay honest, and not freeze your withdrawals.
A decentralised exchange does the same core job — swapping one token for another — but removes that company from the middle. There's no sign-up form and no account. Instead, the whole thing runs on smart contracts: self-executing code that lives on a blockchain such as Ethereum or Solana. The contract is the exchange. It can't take a holiday, play favourites, or quietly run off with the float, because it only ever does exactly what its code says.
Because there's no company custody, you connect a wallet like MetaMask or Phantom, approve the swap, and the tokens move directly between your wallet and a liquidity pool. You're in and out in seconds, and you never hand your coins to anyone. Popular DEXs include Uniswap, PancakeSwap, Curve and Raydium — between them they handle billions in trades without a single login screen.
How a DEX actually works
Here's the part that surprises newcomers: most modern DEXs don't use a traditional order book at all. There's no list of buyers and sellers waiting to be matched. Instead they use an automated market maker — a maths formula that prices trades against a shared pot of tokens supplied by other users. When you swap, you're not trading against a specific person; you're trading against that pot, and the formula sets the price based on how much of each token is in it.
It sounds abstract, but the actual experience is just four steps:
- You connect your wallet — the DEX never holds your funds; it just reads your address and asks for your signature.
- You approve the token — a one-time permission letting the contract move that specific token on your behalf.
- You swap — the AMM calculates the price and executes the trade instantly, on-chain, with no waiting for a counterparty.
- You pay a network fee (gas) plus a small pool fee that goes to the liquidity providers who supplied the tokens.
That 'approve' step is worth pausing on, because it's where a lot of people get burned. Approving a token is like handing a contract a key to that part of your wallet. With a trustworthy DEX that's completely routine — but a malicious contract can use the same mechanism to drain you. Only approve contracts you reached through a project's real website.
DEX vs centralised exchange
Neither is strictly 'better' — they trade convenience against control, and the right choice depends on what you're doing. Lots of people use both: a regulated CEX to turn pounds into crypto, and a DEX to actually explore the wider world of tokens.
- Custody: A DEX is self-custody — you hold the keys, so no one can freeze or seize your coins. A CEX holds your coins for you, which is easier but means trusting the company.
- Access: A DEX needs no ID, no account and works the same for everyone, everywhere; a CEX usually requires identity checks and can be restricted by region.
- Risk: A DEX exposes you to smart-contract bugs and scam tokens; a CEX can be hacked, freeze withdrawals, or collapse entirely (as several spectacularly have).
- Recovery: A CEX may help if you forget a password or make a mistake; a DEX never can — the code has no concept of 'oops'.
Watch out for fake tokens
Anyone can create a token with any name on a DEX. There can be ten different 'USDC' lookalikes, only one of them real. Always paste the official contract address from a project's own site — never trust the first search result or a link from a stranger, which is often a scam clone designed to look identical.
Where to go next
To really understand a DEX, learn how its pricing engine works in what is an AMM and where the tokens themselves come from in what are liquidity pools. New to the wider topic? Start with what is DeFi, and make sure you've read how to avoid crypto scams first — on a DEX, that knowledge is your only safety net.
Key takeaways
- A DEX swaps tokens directly between wallets using smart contracts — no company in the middle.
- You keep custody of your coins, but there's no support desk and no way to reverse mistakes.
- Most DEXs price trades with an automated market maker, not an order book.
- Fake tokens and malicious contracts are common — verify addresses and only risk what you can afford to lose.
Frequently asked questions
Do I need to verify my identity on a DEX?
Typically no — you just connect a wallet and start swapping. That makes DEXs permissionless and open to anyone, but it also means there's no one to call, and no account to recover, if something goes wrong.
Is a DEX safer than Coinbase or Binance?
It's different, not simply safer. A DEX removes custody risk — no company can freeze or lose your coins — but adds smart-contract and scam-token risk that falls entirely on you. Many beginners start on a regulated exchange before exploring DeFi.
Why did my swap cost so much in fees?
You pay a network 'gas' fee plus a small pool fee. On busy networks like Ethereum, gas can spike sharply during congestion. Trading in a low-liquidity pool can also cause heavy 'slippage', moving the price against you mid-trade.
Keep reading
What Is an AMM? Automated Market Makers Explained
How automated market makers (AMMs) price crypto trades without an order book — the x*y=k formula, slippage, an
What Are Liquidity Pools? A Beginner's Guide
Liquidity pools explained simply: how depositing token pairs powers DeFi swaps, how providers earn fees, and t
What Is DeFi? Decentralised Finance Explained
A beginner's guide to decentralised finance: what DeFi is, how lending, trading and yield work without a bank