A cryptocurrency exchange that operates through smart contracts on a blockchain, allowing peer-to-peer trading without a central intermediary holding funds.
A DEX replaces the order book and custodial infrastructure of a centralised exchange (CEX) with smart contracts that execute trades directly from users' wallets. The two dominant DEX models are automated market makers (AMMs) and order-book DEXes. AMMs - used by Uniswap, Curve, and PancakeSwap - replace the traditional bid-ask order book with liquidity pools: users deposit token pairs and earn fees when others trade against the pool. Prices are set algorithmically based on the ratio of tokens in the pool.
The key advantages of DEXes are non-custodial access (users never relinquish control of private keys), permissionless listing (any token can be created and traded), and censorship resistance. The trade-offs are higher slippage on illiquid pairs, gas fee costs on every transaction, and the absence of the customer support and fiat on-ramps available on CEXes.
For active crypto traders, DEXes are the primary venue for accessing new tokens before they list on major centralised exchanges and for participating in DeFi strategies like liquidity provision and yield farming. MEV (Miner Extractable Value) - where block producers reorder transactions to extract profit - is a significant friction cost on high-volume DEX trades, often widening effective spread.
Worked Example
A trader wants to buy a newly launched token not yet on Binance or Coinbase. They connect their MetaMask wallet to Uniswap, swap ETH for the new token, and pay a 0.3% LP fee plus gas. The trade executes on-chain with no account registration - but they accept higher slippage and gas costs compared to a CEX.