A DEX (decentralized exchange) is a trading service that runs on a blockchain through smart contracts instead of a company’s private order book. When you swap on a DEX, you trade one token (a coin tracked on-chain) for another — from a wallet you control, without creating an exchange account.
If you have not used a dApp (decentralized app) yet, read What is a dApp? first. This guide assumes you have a wallet with a small amount of crypto and know what gas fees are.
What a swap is — and what it is not
On Coinbase or Kraken, you click Buy and the exchange updates its internal database. Your coins sit on their books until you withdraw.
On a DEX, nothing updates a company ledger. You send a transaction — a signed instruction — that tells a smart contract to pull token A from your wallet and send token B back. The trade is recorded on the public blockchain for anyone to read.
| Centralized exchange (CEX) | DEX swap | |
|---|---|---|
| Account | Email, password, KYC | Just a wallet address |
| Who holds coins | The exchange, until withdrawal | You, in your wallet |
| How price is set | Order book or internal pricing | Pool math or on-chain order book |
| Undo button | Sometimes support can help | No — confirmed means final |
| Fees | Trading fee + spread | Gas + often a small pool fee |
A swap is not “free trading.” You pay gas (network fee) on every step, and the pool usually takes a cut of the trade.
How most DEX swaps work (AMM)
Most beginner-friendly DEXs — Uniswap, SushiSwap, Project X on HyperEVM — use an AMM (automated market maker). Instead of matching your order with another person’s bid, you trade against a liquidity pool: a smart-contract vault holding two tokens (for example ETH and USDC).
The pool uses a formula (often “constant product”) to quote a price. When you buy ETH with USDC, you add USDC and remove ETH. The ratio shifts, so larger trades move the price more — especially in thin pools with little liquidity (not much money sitting in the vault).
Typical flow:
- Connect wallet — the site reads your address and balances; it does not get your private keys. See What is a dApp?.
- Choose tokens — what you are selling (“From”) and what you want (“To”). Double-check the contract address on obscure tokens — same name, different scam coin happens daily.
- Approve (first time only per token/router) — you grant the swap contract permission to move the token you are selling. See Token approvals.
- Review slippage and output — the interface shows expected receive amount and slippage tolerance (explained below).
- Confirm swap — your wallet shows gas cost; you sign; you wait for confirmation on-chain.
Some platforms (including Hyperliquid’s Core trading side) use an order book instead — bids and asks matched like a traditional exchange. Same word “trade,” different machinery. See Hyperliquid map for when you are on a pool vs an order book.
Slippage, price impact, and minimum received
Between clicking Swap and your transaction landing in a block, other trades can move the pool price. Slippage tolerance is the worst price you agree to accept if the market shifts.
| Term | Plain meaning |
|---|---|
| Expected output | What the interface thinks you will receive right now |
| Minimum received | The floor after slippage — if the pool moves worse than this, the swap reverts (fails) |
| Price impact | How much your own trade size moves the pool price before anyone else trades |
| Slippage % | Your buffer for movement while the transaction is pending |
Default slippage (often 0.5%–1%) is fine for large pools and small trades. Thin pools, volatile tokens, or large sizes may need a higher setting — or should prompt you to trade smaller chunks instead.
Failed swaps still cost gas. The network ran your transaction even if the contract rejected it. Budget for that when experimenting.
Why people swap on a DEX
Honest reasons — not hype:
- Access tokens not listed on your local exchange.
- Stay self-custodied — coins never leave your wallet except for the swap itself.
- Trade on-chain where a specific DeFi app or network needs a particular token (e.g. swap to USDC before lending — see Stablecoins and Lending & borrowing).
- Move between assets without selling through a bank-linked CEX.
Swapping is a utility, not a strategy. The question is whether you need on-chain assets for something you understand — not whether “DEX volume” is trending.
Risks beginners should know
- Phishing sites — fake Uniswap clones with one letter changed in the URL. They drain wallets on the first approval. Bookmark official links; never trust DMs.
- Wrong token — scammers deploy “USDC” lookalikes. Verify contract address on a block explorer or the project’s official docs.
- Bad fills — low liquidity means high price impact. A meme coin pool can eat 10% on a modest trade.
- Slippage set too high — protects against failure but lets a frontrunner or sudden move give you far less than you expected.
- Unlimited approvals — convenient for repeat swaps; dangerous if the router contract is exploited. Prefer exact approvals when offered. See Token approvals.
- Wrong network — your wallet must be on the chain where the pool lives. Sending tokens on the wrong crypto network is a separate disaster.
- Gas without native token — you cannot pay gas in USDC on Ethereum; you need ETH (or the chain’s native gas token). See Gas fees.
A sensible first swap — checklist
- Pick a well-known DEX on a chain with cheap gas for learning (an L2 like Base or Arbitrum, or HyperEVM if you are already on Hyperliquid).
- Type the URL yourself or use a bookmark — not a search ad or Discord link.
- Hold a little native gas token in the same wallet (ETH, HYPE, etc.).
- Swap a tiny test amount — ten dollars worth is enough to learn the popups.
- Read both popups — approval first, swap second. Check token names and amounts.
- Leave slippage at default unless the interface warns you; note minimum received.
- Wait for confirmation — check a block explorer if the UI lags.
- Revoke or limit approvals if this was a one-off experiment on a site you will not reuse.
After one clean swap, you have the template for staking, lending, and yield farming — same connect-approve-confirm rhythm, different contracts.
A DEX swap is irreversible the moment it confirms. There is no support desk to email. If the URL, token address, or approval looks off — close the tab. Missing a trade beats funding a lesson you cannot unlearn.