How a DEX works
On a centralized exchange you deposit funds and trade against an order book the company runs. On a DEX, you connect a wallet, approve a transaction and swap tokens directly against on-chain liquidity. The smart contract executes the trade and the tokens land back in your wallet. No account and no deposit is needed.
Automated market makers
Instead of matching buyers and sellers, most DEXs use liquidity pools: pairs of tokens deposited by liquidity providers. A formula sets the price from the pool's ratio, and each trade shifts that ratio. Bigger trades relative to pool size cause more price impact (see *slippage*).
Aggregators
Services like Jupiter on Solana route your trade across many DEXs and pools to find the best overall price, which is why many wallets integrate them directly.
Advantages
- Self-custody: no counterparty holding your funds
- Open access: no sign-up, and access to tokens not listed centrally
- Transparency: trades and liquidity are visible on-chain
Risks
- Scam and fake tokens: anything can be listed — check the mint or contract address
- Slippage and price impact in thin pools
- Smart-contract risk: bugs can be exploited
- Irreversibility: a wrong swap or address can't be undone
Using one safely
Verify token addresses, check liquidity, set a sensible slippage tolerance and start small.
Checking a token before you swap
Verify the token's mint or contract address against an official source rather than trusting its name or logo, look at how much liquidity it has, and be wary of tokens that appeared in your wallet unasked. A token that is easy to buy but has almost no liquidity can be impossible to sell for anything close to the displayed price.