Short answer: A decentralized exchange (DEX) is an on-chain application that lets a wallet trade tokens through smart contracts. The user usually keeps custody, but also carries responsibility for the wallet, network, token contract, approvals, slippage and transaction fees.
| Feature | DEX | Centralized exchange |
|---|---|---|
| Custody | User signs from a wallet | Platform controls account assets |
| Execution | Smart contract/on-chain | Platform ledger and matching engine |
| Asset access | Any compatible token contract may appear | Platform lists selected assets |
| Recovery | No password reset for a lost seed phrase | Account recovery may be available |
| Main risks | Contract, approval, token, MEV and network risk | Counterparty, custody, access and platform risk |
How a DEX Trade Works
- You open the verified DEX interface and connect a compatible wallet.
- You choose the network, input token, output token and amount.
- The interface requests a token approval when required.
- A router or pool calculates an expected output and price impact.
- You review slippage tolerance, network fee and minimum received.
- You sign the transaction in the wallet.
- Validators include it on-chain and the smart contract updates balances.
“Decentralized” does not mean every interface, developer process or dependency is decentralized. The front end, oracle, admin keys, bridges and wallet provider can create additional risks.
AMMs, Order Books and Aggregators
Automated Market Makers (AMMs)
AMMs price trades against liquidity pools instead of matching a buyer with a seller. Larger orders relative to pool liquidity create more price impact. Liquidity providers can earn fees but face smart-contract and impermanent-loss risk.
On-Chain or Hybrid Order Books
Order-book DEXs display bids and asks. Depending on the design, matching may occur on-chain or through a hybrid system while settlement remains on-chain.
DEX Aggregators
Aggregators compare routes across multiple pools. A route can improve output but may add contracts, bridges or execution complexity. Review the full path before signing.
DEX Costs: Gas, Fee, Spread and Price Impact
A DEX is not automatically cheaper. The total cost can include network gas, protocol fee, liquidity-provider fee, spread, price impact, bridge fees and failed transactions. Compare the minimum amount received, not only the displayed exchange rate.
Slippage and Price Impact
Slippage tolerance is the maximum change you allow between quote and execution. Setting it too low can cause a transaction to fail; setting it too high can produce a poor fill or increase exposure to sandwich attacks. Price impact reflects how much your order changes the pool price. The Ethereum.org DEX guidance treats slippage, minimum received and price impact as separate decision fields.
Eight Safety Checks Before a Token Swap
- Verify the domain: use the project’s official documentation and bookmark it.
- Verify the network: confirm the wallet is on the intended chain.
- Verify the token contract: use an official project source or trusted block explorer.
- Review liquidity: thin pools create large impact and difficult exits.
- Read approval scope: avoid unlimited approvals when a smaller amount is practical.
- Preview minimum received and gas: do not sign a blank or confusing request.
- Start small: make a test swap before using a larger amount.
- Check the result on a block explorer: save the transaction hash and revoke unused approvals.
Wallet Approvals Are Not the Same as a Swap
An approval can authorize a smart contract to spend a token later. A malicious or compromised contract may use an excessive allowance. Read the wallet prompt, limit the amount when supported and revoke approvals that are no longer needed.
Never enter a seed phrase on a DEX website. A legitimate interface asks the wallet to sign; it does not need the recovery phrase.
Token and Liquidity Risks
- Fake tokens can copy the name and ticker of a real asset.
- Honeypot logic may allow buys but block or tax sells.
- Admin keys may change fees, pause contracts or upgrade logic.
- Liquidity can be removed, making exits expensive or impossible.
- Bridged assets add bridge and issuer dependencies.
- Stablecoins can de-peg or be frozen depending on design.
Use the crypto project Trust Score checklist before interacting with an unfamiliar token or protocol.
When a Centralized Exchange May Be Simpler
A regulated centralized platform may be easier when you need fiat deposits, customer support or account recovery. A DEX may be appropriate when you understand wallet custody and need on-chain access. Neither structure is automatically safe.
For the centralized flow, read how to buy crypto on an exchange safely. For wallet responsibilities, use the crypto wallet guide.
Beginner DEX Workflow
- Create and back up a dedicated wallet.
- Fund it with only the amount needed plus estimated gas.
- Open the verified DEX domain.
- Check chain, token contract, route, impact and minimum received.
- Approve only the required amount.
- Test a small swap.
- Verify the transaction and revoke unused permissions.
DEXs remove some intermediaries but transfer more operational responsibility to the user. Review the crypto risk framework before using unfamiliar protocols.