A decentralized exchange, or DEX, is a peer-to-peer marketplace where people trade crypto directly from their own wallets. There is no central company holding customer funds or brokering the swap. Smart contracts on a blockchain handle the trade from start to finish.
DEXs are non-custodial, which means you keep control of your private keys and assets the whole time. Orders are executed by code rather than a human operator. Trades settle on the blockchain rather than on an exchange’s internal database. This setup cuts out counterparty risk that comes from trusting a custodian.
Most DEXs run as a set of smart contracts. Instead of a traditional order book, many use automated market makers, or AMMs, that rely on pools of tokens to quote prices and fulfill swaps. The code determines the price based on the pool’s balances, then completes the trade atomically if the conditions fit. Some DEXs still use order books, but AMMs are the common pattern.
Liquidity pools are shared reserves of two tokens. Users known as liquidity providers deposit an equal value of each token to seed a market. In return, they get a cut of trading fees. On many AMM DEXs, a typical swap fee is around 0.30 percent, paid by traders and distributed to liquidity providers, although exact fees vary by protocol.
DEXs focus on crypto-to-crypto swaps. They do not handle fiat on-ramps themselves, so you trade one token for another rather than moving between cash and crypto. Because anyone can create a token and a pool on a supported network, DEXs often list assets long before centralized exchanges. That openness also brings more unvetted tokens.
Two costs apply when you trade on a DEX. First is the protocol’s swap fee that goes to liquidity providers. Second is the network’s gas fee to execute the transaction on-chain. On networks like Ethereum, gas can dominate the total cost during busy periods. Scaling solutions reduces typical gas costs and speeds up confirmation times.
To use a DEX, you connect a compatible crypto wallet to the app’s website, pick the token pair, and approve the swap. You also need the network’s native token for gas, such as ETH for many Ethereum-based DEXs. Always check the pool you are using, the quoted price, and the expected gas before you confirm.
Centralized exchanges match orders and custody assets. DEXs rely on smart contracts and usually AMMs, with users retaining custody at all times. Centralized platforms tend to vet listings and can offer advanced order types and fiat rails. DEXs favor permissionless access and composability but shift more responsibility to the user.