Deck: A decentralized exchange lets you swap one token for another straight from your own wallet, with no account and no company holding your funds. Instead of matching buyers and sellers, many use a pool of tokens and a formula. Here's how that sets the price, and where the costs and traps are.
Last reviewed: October 24, 2026
On a regular crypto exchange, you make an account, deposit money and place an order that the platform matches with someone else's. A decentralized exchange, or DEX, works differently. You connect a wallet, pick two tokens and press swap. There's no one on the other side of the trade in the usual sense, just a smart contract holding a pile of both tokens.
That design raises fair questions. Who set the price? Why did the screen warn about "price impact"? What is the slippage setting for? This guide walks through how a typical DEX swap works, using a made-up example, so the numbers on a swap screen make sense.
The short version
- A DEX is an app on a blockchain for swapping tokens. ethereum.org describes it as "a type of Ethereum app that lets you swap tokens with peers on the network."
- You trade from your own wallet. There's no account to open, but you sign each step yourself, including token approvals.
- Many DEXs use liquidity pools instead of order books. A pool is a smart contract holding two tokens, and a formula sets the price from how much of each it holds.
- Your trade moves the price. The bigger your trade compared with the pool, the worse your average price. That's price impact.
- Slippage tolerance is a safety limit. It sets the least you're willing to receive before the swap is set to fail.
- Liquidity providers fund the pools and earn fees, but can end up worse off than if they'd just held the tokens.
- Anyone can usually create a pool, so copycat and scam tokens are common. Check the token's contract and the pool's size.
What a DEX is, and how it differs from an exchange
A centralized exchange is a company. It holds customers' funds, keeps its own records and matches buy and sell orders in an order book. (Our guide to how a crypto exchange works explains order books.)
A DEX is software running on a blockchain. ethereum.org's DeFi page puts the appeal simply: "Decentralized exchanges (DEXs) let you trade different tokens whenever you want. You never give up control of your assets." Markets run around the clock because the contracts never close.
"Never give up control" comes with an asterisk, though. To swap, you usually grant the contract permission to move a token from your wallet. That permission is called a token approval, and an unlimited approval to a bad or buggy contract is a real risk. Our DeFi basics and token approvals guide covers how approvals work and how to review or revoke them.

Neither model is simply better. They trade off different things: who you rely on, what you're responsible for and where the costs show up. Our exchange vs. self-custody guide goes into that side.
How a liquidity pool sets the price
ethereum.org defines a liquidity pool as "a collection of funds locked in a smart contract and used to facilitate trading on a decentralized exchange." The contract that runs it is often called an automated market maker, or AMM.
The simplest and most common design, as the Bank for International Settlements (BIS) describes it, keeps one number fixed:
Amount of Token A × Amount of Token B = a constant
When you put one token in, the contract gives you enough of the other that the two amounts still multiply to the same number. The price isn't set by anyone. It comes out of the ratio of the two tokens in the pool.
Here's a made-up example. A pool holds 100 Token A and 10,000 Token B, so the starting price is 100 B per A. Ana pays in 1,000 Token B.
- The pool now has 11,000 B. To keep 100 × 10,000 = 1,000,000, it needs about 90.9 A.
- So Ana gets out about 9.09 Token A, not 10.
- Her average price is about 110 B per A, roughly 10% above the starting price.
- The pool's price afterward is about 121 B per A, because it now holds less A and more B.
Two things follow from this. First, the price on a DEX only stays close to prices elsewhere because traders step in when it drifts and trade it back, which is called arbitrage (ethereum.org's MEV page describes how competitive DEX arbitrage is). Second, every trade pushes the price against the trader making it.
Price impact: why pool size matters
Price impact is how much your own trade moves the price you get. On a pool, it depends on the size of your trade compared with what's in the pool.

A trade that's tiny next to the pool barely moves the price. A trade that's large next to the pool can cost far more than the price shown before you started. That's why pools with very little in them deserve extra caution, and why a high price-impact warning is a reason to stop and look again.
This is the same idea as slippage on a centralized exchange, where a large market order eats through several price levels of the order book. The "Market orders and slippage" section of our exchanges guide shows that version.
Slippage tolerance and "minimum received"
There's a gap between seeing a quote and your swap actually landing in a block. Other trades can hit the same pool in between, so the price can move. A slippage setting protects you from moving too far.
ethereum.org's design guide for DEX apps explains the math: "If you have slippage set at 1%, then the minimum you can expect to receive = expected output-1%." It also notes that "'minimum received' and 'slippage' are two sides of the same coin." If the pool would pay you less than that minimum, the swap fails instead of going through. A failed swap can still cost you: on Ethereum, ethereum.org notes the network fee "is paid regardless of whether a transaction succeeds or fails."
In Ana's case, an expected 9.09 Token A with 1% tolerance means a minimum of about 9.00.

Price impact on a swap screen is often shown as how much less you get than at the starting price (about 9.1% for Ana), while the table above shows how much more you pay per token (about 10%). They describe the same trade from two sides.
Why not set slippage very high? Because a wide tolerance gives others room to profit from your trade. The BIS points out that on a blockchain, "the order quantities become public knowledge before their price impact has materialised," which opens the door to front-running. ethereum.org describes one version, the sandwich: someone trades just before and just after you, and "users who are sandwiched face increased slippage and worse execution on their trades." A tight tolerance limits how much of that you can be exposed to, at the cost of more failed swaps when prices move.
What it costs to swap
A DEX swap usually has three costs, and only some of them are labeled as fees:
- The pool fee. Each swap pays a fee that goes to the pool's liquidity providers. The BIS says these fees "may range from a few basis points to several percentage points."
- The network fee. Every swap is a blockchain transaction, so you pay the network's fee, and an approval is often a separate transaction with its own fee. Fees vary a lot between networks. See crypto network fees explained and layer 1 vs. layer 2.
- Price impact. Not a fee, but a real cost that grows with trade size, as the table shows.
Liquidity providers and impermanent loss
The tokens in a pool come from people called liquidity providers. They deposit both tokens, in proportion to what's already in the pool, and receive liquidity tokens in return. ethereum.org says those liquidity tokens "represent the participant's share of the pool and can be redeemed later for the initial deposit plus a portion of the trading fees."
That can sound like easy income. The catch is that the pool keeps rebalancing as people trade. If one token's price moves a lot compared with the other, providers end up holding more of the token that fell and less of the one that rose. The BIS explains that providers "can suffer losses if the relative price … diverges substantially," and that "the transaction fees may not be high enough to offset this loss, which is commonly referred to as 'impermanent loss'." The loss is called impermanent because it can shrink if prices move back, but it becomes permanent if a provider withdraws while prices are apart.
Providing liquidity also means trusting the pool's smart contract with your tokens. This page explains the idea; it isn't a suggestion to do it.
Traps to watch for
Copycat and scam tokens. On many DEXs, anyone can create a token and a pool for it, including a token with the same name and ticker as a well-known one. The name on the screen proves nothing. The token's contract address is what identifies it, and our coin vs. token guide explains why. ethereum.org notes that "scam tokens typically have tiny liquidity pools, if any, because the scammers don't want to risk real assets." A tiny pool also means extreme price impact.
Rug pulls. A project's creators can pull their own liquidity out of a pool, leaving holders with a token that's hard to sell. Our rug pull guide covers the warning signs.
Fake DEX sites. Look-alike websites and sponsored search ads can lead to a page that asks for an unlimited approval, or for your recovery phrase. No real swap needs your recovery phrase. See how to avoid crypto scams.
Wrong network. The same token name can exist on several blockchains as different tokens. Check which network your wallet is connected to before you swap.
Common mix-ups
"The price on the screen is the price I'll get." It's an estimate. Price impact and other trades in between can change it, which is why there's a minimum received.
"Slippage tolerance is a fee." It's a limit, not a charge. A higher setting doesn't cost more by itself, but it allows a worse result.
"No account means no risk." It means no company holds your funds. You take on the work of checking contracts, approvals and links yourself.
"A big pool means a safe token." Pool size affects price impact. It doesn't tell you whether a token or its contract is trustworthy.
"Liquidity providers just earn fees." They also take on impermanent loss and smart contract risk.
Words you'll keep hearing
- DEX (decentralized exchange): an app on a blockchain for swapping tokens from your own wallet.
- Liquidity pool: a smart contract holding two tokens that traders swap against.
- AMM (automated market maker): the formula and contract that set a pool's price.
- Price impact: how much your own trade moves the price you get.
- Slippage tolerance: the most the result may fall short of the estimate before the swap fails.
- Minimum received: the estimate minus the slippage tolerance.
- Liquidity provider (LP): someone who deposits tokens into a pool in return for a share of fees.
- Impermanent loss: what providers can lose compared with just holding, when the two tokens' prices move apart.
- Front-running / sandwich: trading just before (and after) someone else's visible trade to profit from its price impact.
More terms are in our crypto glossary.
Frequently asked questions
How does a decentralized exchange work? Many DEXs use liquidity pools: smart contracts holding two tokens. You swap one token in and get the other out, and a formula sets the price from how much of each token the pool holds.
What is the difference between a DEX and a centralized exchange? A centralized exchange holds your funds in an account and matches orders in an order book. A DEX lets you swap from your own wallet against a smart contract, with no account.
What is price impact on a DEX? It's how much your own trade moves the price. The larger your trade compared with the pool, the worse your average price. A high price-impact warning is a reason to pause.
What slippage tolerance should I set? There's no single right number. A tighter setting protects you from bad fills and front-running but fails more often; a wider one goes through more often but allows a worse result.
Why did my DEX swap fail? Often because the price moved past your slippage tolerance before the swap landed, so the contract stopped it. On Ethereum and similar networks, you usually still pay the network fee.
What is impermanent loss? It's what liquidity providers can lose compared with just holding their tokens, when the two tokens' prices move apart. Trading fees may or may not make up for it.
Is it safe to use a DEX? It carries different risks than an exchange: token approvals, smart contract bugs, scam tokens, fake sites and price impact. Check every approval, token address and link.
Where to go next
- DeFi Basics and Token Approvals, for the approval step every swap starts with.
- How a Crypto Exchange Works, especially its "Market orders and slippage" section, for the order-book version of these ideas.
- Exchange vs. Self-Custody, for the custody trade-off.
- Crypto Network Fees Explained, for the fee every swap pays.
- Coin vs. Token, for why the contract address matters.
- How to Spot a Rug Pull, for one of the traps above.
- What Are Stablecoins?, for a token often found on one side of a pool.
- Crypto Glossary, for any other term.
Sources
- ethereum.org: Glossary (decentralized exchange, liquidity pool and liquidity token entries; last updated October 22, 2026).
- ethereum.org: Decentralized finance (DeFi).
- ethereum.org: Best practices for decentralized exchange (DEX) design.
- ethereum.org: Gas and fees.
- ethereum.org: Maximal extractable value (MEV).
- ethereum.org: How to identify scam tokens.
- Bank for International Settlements: Trading in the DeFi era: automated market-maker, BIS Quarterly Review (December 6, 2021).
All diagrams and animations are original Fueled Crypto graphics. Ana, Token A, Token B and all numbers are made-up examples.
Fueled Crypto publishes news and education, not investment, tax, or legal advice. Crypto assets are volatile and can lose value. Do your own research and consider a licensed professional before making financial decisions. See our full disclaimer.
Want plain-English crypto news once a week? Subscribe to Fueled Crypto.