TL;DR
A DEX is a non-custodial exchange where users trade tokens directly from their wallets through smart contracts, without a centralized intermediary holding funds.
Unlike centralized exchanges (CEXs) like Binance where you deposit funds and the exchange manages your trades, DEXs execute swaps entirely on-chain. You connect your wallet, approve a transaction, and the smart contract handles the swap atomically — either the entire trade succeeds or it reverts. Your tokens never leave your wallet’s control until the moment of the swap.
Solana has two main DEX types. AMM-based DEXs (Raydium, Orca, PumpSwap) use liquidity pools and mathematical formulas for pricing. Order book DEXs (Phoenix, OpenBook) match limit orders like traditional exchanges, offering tighter spreads and no impermanent loss for market makers. Jupiter aggregates across both types to find optimal trade routes.
DEXs offer self-custody, permissionless listing, and transparency but have higher per-trade costs (gas + slippage), potential MEV exposure, and require managing your own wallet security. CEXs offer faster execution, fiat on-ramps, and customer support but require KYC and trusting the exchange with your funds. Most active Solana traders use both — CEXs for large trades and fiat conversion, DEXs for new tokens and DeFi.