Skip to content
Trading & AMMs

DEX

Decentralized Exchange

Exchange operating without central authority using smart contracts

Definition

A decentralised exchange settles trades in smart contracts while you keep custody of your assets: there is no account, no deposit and no withdrawal, only an approval and a swap. Most volume runs through AMMs such as Uniswap, Curve, Balancer and the Velodrome and Aerodrome family, where you trade against pooled liquidity. A second group runs genuine on-chain order books on fast execution environments, notably Hyperliquid and dYdX. A third and growing group is intent-based, with CoW Swap and 1inch Fusion having solvers compete to fill your order rather than executing it against a pool directly. The defining property across all of them is permissionless listing: anyone can create a market for anything, which is simultaneously why long-tail assets exist on-chain and why scam tokens are trivially easy to list.

A DEX lets you swap tokens straight from your wallet through a smart contract. No account, no custody transfer, and no one to ask permission from, including for tokens that should not exist.

Example

Swapping 1 ETH for USDC on Uniswap is two transactions the first time, an approval and the swap, then one thereafter. You pay the pool's fee tier, 0.05% on a deep ETH/USDC pool, plus price impact and gas, and it settles in the next block without an account of any kind. Curve does the equivalent for stablecoins at around 0.01% to 0.04% with a curve built for assets that should trade near parity. DEX spot volume has gone from a rounding error in 2019 to a persistent double-digit percentage of centralised exchange volume.

1

How it works

You approve a token and call a swap. The contract prices the trade against pooled liquidity or routes it to a solver, and settlement happens on-chain in one transaction.

2

Why it matters

It is the base trading layer of DeFi and the only venue for most on-chain assets. Its permissionless nature is both the reason the ecosystem exists and the reason scams are one deployment away.

3

What to check

Verify the contract address, look at pool depth and age against your trade size, set a slippage tolerance, consider a private relay or intent venue for size, and periodically revoke old approvals.

Risks to Consider

  • Anyone can deploy a token with any name and ticker, so trading by ticker rather than by verified contract address is how people buy the fake one
  • Smart contract risk is real and unrecoverable: the pool, the router and the token all have to behave
  • Public mempools expose trades to sandwiching and other MEV unless you use a private relay or an intent-based venue
  • Front ends are a separate attack surface: Curve's DNS was hijacked in 2022, so a correct protocol can still be served through a hostile interface

Common Questions

DEX or centralised exchange?

DEX for custody, for access to assets that are not listed anywhere else, and for composability with the rest of DeFi. CEX for deep books on majors, for fiat rails, and for order types and leverage that on-chain venues still execute less well. Most people end up using both, and the honest framing is that a CEX is a counterparty you are choosing to trust while a DEX is a contract you are choosing to trust.

How do I avoid buying a fake token?

Always trade by contract address taken from a source you trust, such as the project's own documentation or a reputable aggregator's verified list, never by ticker alone. Check the pool's liquidity and its age, check whether other holders have successfully sold, and simulate a sell before buying something new. On most DEXes the token list is community-curated at best and unreviewed at worst.

Are DEXes cheaper than centralised exchanges?

On fees, often yes: 0.01% to 0.30% against typical CEX taker fees. On total cost, it depends entirely on size and chain. Gas plus price impact plus potential MEV can easily exceed a CEX fee for a small trade on mainnet, while a large trade in a deep pool on an L2 can be dramatically cheaper. Compare the amount actually received, never the fee line.