A decentralized exchange (DEX) lets people trade crypto directly from their own wallets, without handing funds to a company. Instead of a corporate order book, a DEX runs on smart contracts — self-executing code on a blockchain.
Automated market makers and liquidity pools
Most DEXs don't match individual buyers and sellers. They use an automated market maker (AMM). Users called liquidity providers deposit pairs of tokens into a shared liquidity pool, and a formula sets the price based on the ratio of tokens in the pool. When you trade, you swap against the pool, not another person.
What makes DEXs appealing
- Self-custody: you trade from your wallet; no company can freeze your funds.
- Permissionless: typically no account or identity check to use the protocol itself.
- Access: new and niche tokens often appear on DEXs first.
The distinct risks
- Smart-contract bugs: flawed code can be exploited and funds drained. The contract is only as safe as its audit and battle-testing.
- Impermanent loss: providing liquidity can leave you with less value than simply holding, depending on price movements.
- Scam tokens: anyone can list a token. Many are worthless or designed to trap buyers ("honeypots").
- No recovery: send to a wrong address or approve a malicious contract and there's no support desk to call.
- Network fees: on busy chains, transaction ("gas") fees can be significant.
CEX vs. DEX in one view
| Centralized (CEX) | Decentralized (DEX) | |
|---|---|---|
| Custody | Platform holds funds | You hold funds |
| Identity check | Usually required | Usually none |
| Ease of use | Higher | Steeper learning curve |
| Main risk | Trusting the company | Code bugs & user error |
Key takeaways
- DEXs use smart contracts and liquidity pools instead of a company.
- You keep custody, but you also carry all the responsibility.
- Watch for contract bugs, scam tokens, and impermanent loss.