A DEX (decentralized exchange) is a peer-to-peer marketplace running on smart contracts that lets you trade crypto directly from your own wallet, without depositing funds with a company, without creating an account, and without trusting a centralized intermediary. You maintain custody of your assets until the exact moment of the trade.

What Is a DEX?

3 min read

The short version

A DEX is like a farmers market where buyers and sellers trade directly, with the market rules enforced by a transparent machine instead of a manager. Nobody takes your money "for safekeeping." You show up with your produce, swap it for what you want, and walk away, the market machine just ensures the exchange is fair according to its published rules.

How It Works

Most DEXs use one of two models: (1) AMM (Automated Market Maker), Uniswap, Curve, Balancer. Liquidity providers deposit token pairs into pools. Prices are determined by a mathematical formula (x*y=k for Uniswap V2) based on pool ratios. Traders swap against the pool, paying a fee (0.01%-1%) distributed to liquidity providers. No order book, no matching engine, just math. (2) Order book DEXs, dYdX, Serum (discontinued). Operate like traditional exchanges with limit/market orders, but settlement happens on-chain. Less common on Ethereum L1 (gas costs make per-order operations expensive) but viable on L2s and other chains. Key advantage: non-custodial. Your tokens leave your wallet only during the atomic swap transaction. If the DEX frontend goes offline, the smart contracts still work, you can interact directly.

Swapping ETH for USDC on Uniswap V3

You connect your MetaMask wallet to app.uniswap.org. You select: swap 1 ETH for USDC. Uniswap queries on-chain liquidity and quotes: 2,985 USDC (after 0.05% pool fee and price impact). You set slippage tolerance to 0.5%. You approve the swap, MetaMask shows the transaction for signing. You confirm. One transaction executes: your 1 ETH goes into the pool, 2,985 USDC comes out to your wallet. Total time: one block (~12 seconds). At no point did Uniswap hold your ETH or have the ability to refuse the trade. If Uniswap Labs shut down their website tomorrow, you could interact with the same contracts via Etherscan or any other frontend.

What People Get Wrong

  • DEXs are anonymous

    DEXs do not require accounts or KYC, but all transactions are on a public blockchain. Your activity is linked to your wallet address. Blockchain analytics firms can often connect addresses to real identities through exchange deposit histories and other on-chain patterns.

  • DEXs always have better prices than CEXs

    DEXs often have wider spreads and higher price impact for large orders due to limited liquidity depth. CEXs with professional market makers frequently offer tighter spreads for popular pairs. DEX aggregators (1inch, Paraswap) help find the best price across pools.

  • DEX smart contracts can be changed by the team

    It depends on the DEX. Uniswap V3 core contracts are immutable, the team cannot modify them. Others use upgradeable proxies or admin keys. Always check: is the contract upgradeable? Does a multisig control it? Has the team renounced admin access?

  • You can trade any token safely on a DEX

    Anyone can list a token on a permissionless DEX. This includes scam tokens designed to steal your money (honeypots, fake tokens with the same name as legitimate ones). Always verify token contract addresses against official sources before trading.

Sources & Further Reading

Questions People Also Ask

What is the largest DEX?
By trading volume: Uniswap (Ethereum and L2s) consistently leads with $1-3 billion daily volume. By TVL (Total Value Locked): Curve Finance historically competes for the top spot for stablecoin liquidity. Rankings shift, check DeFiLlama for current data.
Do DEXs charge fees?
Yes. Pool fees (paid to liquidity providers) typically range from 0.01% to 1% depending on the pool. You also pay blockchain gas fees for the transaction. Combined, a DEX trade usually costs more in fees than a CEX market order, but you keep custody and avoid withdrawal fees.
Can I trade Bitcoin on a DEX?
Not native BTC (which runs on its own blockchain). You can trade Wrapped BTC (WBTC) on Ethereum DEXs, an ERC-20 token backed 1:1 by BTC held in custody. For native BTC DEX trading, look at atomic swaps or Bitcoin-native DEX protocols (less mature).

More in Exchanges, Liquidity & Trading

See all →
Was this page helpful?

Page last checked