DEX Explained: What Is a Decentralized Exchange?
A DEX (decentralized exchange) is a protocol that lets you swap tokens directly from your wallet — no account registration, no deposit, no custody. Trades are executed on-chain by smart contracts that hold liquidity pools contributed by other users.
How a DEX prices trades
Most DEXs use an automated market maker (AMM) model rather than an order book. An AMM holds reserves of two tokens in a pool. The pricing formula ensures that after every trade, the product of the two reserves stays constant. This creates a price curve: as you buy more of one token, each additional unit costs more because the reserve shrinks.
Uniswap popularized this model on Ethereum. Curve Finance modified it for stablecoin pairs where minimal slippage matters more than price discovery. Polygon and other Layer 2 networks host DEX deployments with lower gas costs.
Liquidity providers
Anyone can add liquidity to a DEX pool by depositing both tokens in the correct ratio. In return, they receive LP tokens representing their share of the pool and earn a percentage of every trade that passes through. This is the fundamental mechanism behind yield farming in DeFi.
The risk for liquidity providers is impermanent loss: if the price ratio between the two tokens changes significantly after deposit, the pool rebalances and the provider ends up holding proportionally more of the cheaper token. Trading fee revenue must outweigh this loss for liquidity provision to be profitable.
DEX projects on ChainClarity
- Ethereum — hosts Uniswap, Curve, and the majority of DEX volume
- Polygon — low-cost Layer 2 with major DEX deployments
- Aave — lending protocol that works alongside DEXs in the DeFi stack
- Chainlink — oracle network that provides price data for DEX and lending protocols
Browse all DeFi protocols →
Frequently asked questions
What is a DEX?
A DEX (decentralized exchange) is a protocol that allows users to trade crypto tokens directly from their wallets using smart contracts. Unlike centralized exchanges (CEXs), a DEX never takes custody of your funds — trades execute on-chain between the user's wallet and the protocol's liquidity pools.
How does an AMM work?
An automated market maker (AMM) prices trades using a mathematical formula rather than an order book. The most common formula is x * y = k (the constant product formula used by Uniswap): the product of the two token reserves must remain constant after each trade. As you buy one token, its reserve shrinks and price rises proportionally. This creates deterministic, continuous liquidity without requiring matching buyers and sellers.
What is impermanent loss?
Impermanent loss is the opportunity cost of providing liquidity to an AMM pool instead of simply holding the tokens. When token prices diverge significantly from when you deposited, the pool rebalances in a way that leaves you with less value than if you had just held. The loss is 'impermanent' because it only crystallizes when you withdraw — but it often does crystalize, especially in high-volatility pairs.
What is slippage on a DEX?
Slippage is the difference between the expected trade price and the actual execution price. It occurs because each trade shifts the pool's reserves and thus the price. Large trades relative to pool depth cause significant slippage. DEX interfaces let you set a slippage tolerance — transactions that would execute worse than your threshold are automatically rejected.
What is the difference between a DEX and a CEX?
A CEX (centralized exchange) like Coinbase or Binance holds your funds in their custody and uses traditional order books. A DEX is non-custodial — you keep your keys, and trades settle on-chain. CEXs are generally faster and have higher liquidity for major pairs; DEXs are permissionless, censorship-resistant, and allow trading of any token without approval.