What Is DEX in Crypto?

A DEX (decentralized exchange) is a smart-contract-based venue where users trade assets without handing custody to a company. Trades settle on-chain against either a liquidity pool (AMM) or an on-chain order book. Uniswap, Curve, PancakeSwap, and Raydium are the largest AMMs; dYdX, Hyperliquid, and Serum (now GooseFX) represent the order-book camp.

Also known as: decentralized exchange, on-chain exchange

Ask Stingray anything about DEX

How DEXs differ from CEXs

CEXDEX
CustodyExchange holds your fundsYou hold your funds in your wallet
SettlementInternal ledger; withdrawal optionalOn-chain every trade
ListingExchange chooses which assets to listAnyone can create a pool
KYCRequired for most featuresNone at the protocol level
SpeedSub-second order matchingBound by block time (1-15s)
Fees5-30 bps taker5-100 bps swap + gas
RecourseCustomer support, insurance fundsSmart-contract code is the only rule

The DEX advantage — self-custody, no listing gatekeepers, no KYC — comes with real costs: slower execution, higher fees for small trades, MEV exposure, and zero recourse if something breaks.

DEX architectures

  • AMM — pricing via pool formula (Uniswap, Curve, PancakeSwap). The dominant pattern.
  • On-chain order book — limit orders posted on-chain, matched by a relayer or smart contract (dYdX v3, Serum). More capital-efficient but harder to bootstrap liquidity.
  • RFQ / intent-based — users sign a request; solvers or market makers compete to fill. UniswapX, CoW Swap, 1inch Fusion. Reduces MEV exposure.
  • Perpetual DEXsHyperliquid, GMX, dYdX, Synthetix. Offer leveraged futures with on-chain settlement.

Risks and considerations

Self-custody shifts risk from exchange solvency to smart-contract correctness + your own opsec. Common failure patterns:

  • Smart-contract exploits — SushiSwap’s MISO, Nomad Bridge, Multichain bridge, Curve Vyper bug. Hundreds of millions lost to pool-level exploits.
  • Front-end compromise — attackers replace the DEX’s UI with a malicious version that signs drain-wallet transactions. Always verify the exact contract address.
  • Fake tokens — anyone can create a pool named “USDC” for a token that isn’t USDC. Verify token contract addresses, not just ticker symbols, before every swap.
  • Slippage and MEV — covered in the Slippage and MEV entries. The practical impact is real — 1-3% on unprotected trades.

Modern DEX aggregators (1inch, 0x, Paraswap, CoW Swap) abstract most of this. They route through the best pools, include MEV protection, and surface slippage clearly. For any trade above a few hundred dollars, use an aggregator rather than going directly to a single DEX.

See also on Stingray

Related terms