What is a decentralized exchange?
A decentralized exchange (DEX) is a trading venue run by smart contracts instead of a company. You connect your wallet, choose a pair and sign one transaction. The contract takes your tokens and sends the other token back in the same step.
That step is atomic: either both sides of the trade happen, or the transaction reverts and you keep your tokens (minus the gas spent). There is no deposit to make first, no balance held by an operator and no withdrawal queue.
Order book vs liquidity pool
A centralized exchange matches your order against other users' orders in a private order book, using funds you deposited earlier. An automated market maker (AMM) has no order book: you trade against a pool of tokens, and the price comes from the ratio of what is in it.
In the example pool, the spot price is 2,400 USDC per ETH. Selling 1 ETH adds ETH to the pool and removes USDC, so you get slightly less than 2,400. The bigger the trade relative to the pool, the more the price moves: that is price impact, covered in Slippage explained.
Anyone can add tokens to a pool and earn a share of its trading fees. Those liquidity providers take on impermanent loss in exchange.
CEX vs DEX at a glance
| Aspect | DEX | CEX |
|---|---|---|
| Custody | You keep your keys; funds leave your wallet only inside the trade | The exchange holds your funds |
| Account | None: connect a wallet | Sign-up and identity checks |
| Costs | Pool fee, network gas, sometimes a front-end fee | Trading fee, plus deposit and withdrawal fees |
| Speed | One block: about 12 s on Ethereum, 1-2 s on most layer 2s | Milliseconds, off-chain matching |
| Token choice | Any token with a pool, including scams | Curated list chosen by the exchange |
| Main risks | Contract bugs, malicious tokens, your own mistakes | Insolvency, hacks, frozen withdrawals |
| If it goes wrong | No one can reverse a transaction | Support desk, but you depend on its goodwill |
Many people use both: a centralized exchange to turn euros or dollars into crypto, and a DEX for everything after that.
Types of DEXs
Automated market makers
Traders swap against a pool of two (or more) tokens priced by a formula. Liquidity providers deposit the tokens and earn the trading fees. The most common design by far.
Examples: Uniswap, Curve, PancakeSwap, Balancer
Order-book DEXs
Buyers and sellers post limit orders that a protocol matches, usually on a dedicated chain. Familiar to traders and efficient for liquid markets, but they need active market makers.
Examples: Hyperliquid, dYdX
Request-for-quote (RFQ)
A professional market maker signs a firm price for your exact trade, and a contract settles it on-chain. Often the best price on large trades of major pairs.
Examples: Market makers behind 0x and other aggregators
Aggregators
They hold no liquidity of their own. They search many pools and market makers, split your order when that helps, and settle the whole route in one transaction.
Examples: 0x, KyberSwap, ParaSwap
Why aggregators get better rates
The same pair trades in dozens of pools across many DEXs, each with its own depth and fee. The best price for ETH to USDC may be in one pool, and for a large order a mix of three pools may beat any single one. Checking them by hand before every trade is not realistic.
An aggregator does that search for you and settles the resulting route in one transaction. ChainBridge goes one level up: it asks 0x, KyberSwap and ParaSwap in parallel, then keeps the quote that leaves you the most after fees and gas. Each of those aggregators does its own pool search and order splitting. See How DEX aggregators work for the details.
Risks to watch
- Contract risk. A bug in a pool or router contract can lose funds. Prefer established protocols; ChainBridge only sends transactions to contracts on its allowlist.
- Gas. Every swap pays a network fee. On Ethereum mainnet it can outweigh the trade on small amounts; on layer 2s it is usually cents.
- MEV. Bots can trade around your swap in the public mempool. A tight slippage tolerance limits what they can take. See MEV protection.
- Approvals. Approving a token lets a contract spend it later. Review old approvals on the approvals page.
Trying a DEX swap
Connect your wallet
ChainBridge never asks for your recovery phrase or keys. Connecting only shares your address.
Pick the network and tokens
Ethereum, Arbitrum, Base, Optimism, Polygon, BNB Chain, Avalanche and Linea are supported. Search by name, or paste a contract address to import a token.
Read the quote
Check the amount out, the minimum received, price impact and fees. The transaction is simulated before you sign.
Sign and wait one block
The tokens arrive in your wallet when the transaction confirms.