How Decentralized Exchanges Work
A clear explanation of how decentralized exchanges let people trade directly from their own wallets, using automated market makers.
Jump to section
What to remember
- A DEX lets users trade directly from their own wallet, without depositing funds to a central operator.
- Many DEXs use automated market makers, pricing trades against liquidity pools rather than an order book.
- Liquidity providers earn fees but take on impermanent loss risk.
- Check pool depth and slippage tolerance before executing a large trade.
Trading without a central operator
A decentralized exchange, or DEX, lets people trade crypto assets directly, through smart contracts, rather than depositing funds with a company that manages trades internally.
Automated market makers
Many DEXs use an automated market maker model, pricing trades with a formula based on the ratio of assets in a liquidity pool, rather than matching individual buy and sell orders the way a traditional order book does.
Liquidity pools and providers
A liquidity pool holds reserves of two or more tokens. Liquidity providers deposit assets into these pools and generally earn a share of trading fees in return, while taking on the risk of impermanent loss if the pooled assets' prices diverge.
What connecting a wallet actually does
Using a DEX means connecting a self-custody wallet directly and approving specific smart contract interactions, rather than creating an account and depositing funds. This means you retain custody of your assets until the moment a swap executes.
Check pool depth and slippage before a large trade
A large trade against a shallow liquidity pool can move the price significantly against you, a cost known as slippage. Checking a pool's depth, and setting a reasonable slippage tolerance, are practical steps before executing a sizable swap.
What to remember
- A DEX lets users trade directly from their own wallet, without depositing funds to a central operator.
- Many DEXs use automated market makers, pricing trades against liquidity pools rather than an order book.
- Liquidity providers earn fees but take on impermanent loss risk.
- Check pool depth and slippage tolerance before executing a large trade.
Related concepts
Decentralized Exchange
Read the Decentralized Exchange glossary definition
Automated Market Maker
Read the Automated Market Maker glossary definition
Liquidity Pool
Read the Liquidity Pool glossary definition
Liquidity Provider
Read the Liquidity Provider glossary definition
Impermanent Loss
Read the Impermanent Loss glossary definition
The Evolution of DEX Design: Order Books to AMMs to Aggregators
Read the research article