Answer · Answers

Swap vs. DEX: What's the Difference?

Illustration of two tokens swapping inside an exchange hub connected to a wallet and routing nodes
On this page

The short answer

A DEX is a platform and a swap is an action. A decentralized exchange is a set of smart contracts (plus usually a website) where people trade crypto from their own wallets. A swap is the trade itself: giving up one token and receiving another in a single transaction. You can swap on a DEX, but “swap” buttons also appear in wallets, aggregators and centralized exchanges, and those work quite differently under the hood.

So asking “swap or DEX?” is a bit like asking “purchase or shop?” The useful question is where your swap actually happens and who holds your funds while it does.

Platform vs. action DEX Platform Smart contracts Liquidity pools Swap Action Input token Output token One token for another
A DEX is the platform: its contracts and pools make trading possible. A swap is the action of exchanging one token for another.

What is a DEX?

A DEX lets you trade tokens without handing them to an exchange. Most DEXs are automated market makers (AMMs): instead of matching you with another trader, a smart contract prices your trade against a liquidity pool funded by other users. Some DEXs use on-chain order books instead. Either way, you connect a self-custody wallet, sign a transaction, and the contract settles it on the blockchain. Examples include Uniswap on Ethereum and its layer 2s, PancakeSwap on BNB Chain and Orca on Solana.

A DEX usually does more than swaps: you can also provide liquidity and earn fees, create pools, and on some DEXs place limit orders or trade perpetual futures.

What is a swap?

A swap is a direct token-for-token exchange, such as trading ETH for USDC, without first converting to dollars. On a DEX, one transaction does the whole thing:

  1. You choose the token to sell, the token to buy and the amount.
  2. The interface shows a quote, the price impact and the minimum you’ll receive after your slippage tolerance.
  3. You sign. The contract takes your input token, executes against the pool and sends the output token to your wallet. If the price has moved beyond your limit, the transaction fails instead.

That’s why so many DEXs are named “something-Swap”: swapping is their core product.

Where you can swap, and how they differ

Where the swap happens Who holds your funds What actually executes it Typical extra costs
Directly on a DEX You (self-custody wallet) The DEX’s own pools Pool fee, network gas, price impact
DEX aggregator You Pools across many DEXs, split for the best price Gas, sometimes an aggregator fee
Wallet’s built-in swap You Usually an aggregator behind the scenes Wallet fee on top (e.g. 0.875% on MetaMask’s standard swaps)
Cross-chain swap protocol You, until the protocol takes the deposit Pools or solvers that settle on two chains Protocol fees, gas on both chains, bridge-style risk
CEX “convert” or “swap” The exchange The exchange’s internal order book or desk Spread and conversion fee
Instant-exchange service The service, during the trade The service’s own liquidity Spread built into the rate

The first four keep you in control of your keys. The last two are custodial: for the length of the trade, or longer, you are trusting a company.

DEX vs. aggregator

An aggregator doesn’t hold liquidity. It searches many DEXs and splits your order to get the best net price. Jupiter on Solana and 1inch or CoW Swap on EVM chains are well-known examples. For most everyday swaps of popular tokens, an aggregator is often cheaper than any single DEX. Some newer systems, such as CoW Swap and UniswapX, are intent-based: you sign an order describing what you want, and third-party solvers compete to fill it, sometimes from DEX pools and sometimes from their own inventory. See our explainer on DEX aggregators.

Routing is not custody ROUTE Swap request from wallet Aggregator searches or solvers compete DEX pools or own inventory FUNDS Your wallet You sign Smart contract settles the swap Your wallet Output arrives The aggregator does not hold the liquidity
The aggregator or solver layer finds a route, but it is not the custodian. You sign from your wallet, and settlement sends the output back to it.

DEX vs. wallet swap

The “Swap” button in a wallet such as MetaMask or Trust Wallet is a convenience layer. It usually routes your trade to aggregators and DEXs, then adds a service fee. Our page on whether Trust Wallet is a CEX or DEX explains this distinction for one popular wallet.

DEX swap vs. CEX convert

On a centralized exchange, a “convert” or “swap” feature trades balances inside your exchange account. Nothing happens on-chain until you withdraw, and the exchange holds your coins throughout. You get customer support and fiat access, but take on custody risk. Our DEX vs. CEX comparison covers the full trade-off.

Other meanings of “swap” in crypto

The word turns up in a few other places that have nothing to do with exchanging tokens on a DEX:

  • Perpetual swaps are futures contracts with no expiry date, traded with leverage. See perpetual contracts in crypto.
  • Interest-rate swaps exchange a fixed rate for a floating one. See interest-rate swaps in DeFi.
  • Atomic swaps are a technique for trading coins on two different blockchains directly, where either both sides complete or neither does.
  • Token swaps or migrations happen when a project replaces an old token with a new one, often at a fixed ratio.

What a swap costs

Whatever the venue, compare the amount you’ll actually receive, which bakes in:

  • the pool or trading fee (on Uniswap’s standard v3 pools, 0.01% to 1% depending on the pool, while v4 pools can set custom or dynamic fees; see how liquidity pool fees work);
  • gas fees on the network;
  • price impact and slippage;
  • any interface, wallet or aggregator fee.

Risks to keep in mind

  • Fake tokens. Anyone can create a token with a familiar name; verify the contract address.
  • Malicious approvals. The first swap of a token usually needs an approval. Only approve on sites you’ve verified.
  • Wrong network. A DEX only trades tokens on its own chain. Sending tokens on the wrong network can make them hard to recover.
  • MEV and loose slippage. Bots can exploit a wide slippage setting. Keep it as tight as the trade allows.

New to all this? Our guide on how to access a decentralized exchange walks through a first swap step by step, and our explainer on AMMs vs. DEXs untangles another pair of terms people often mix up.

Frequently asked questions

Is a swap the same as a DEX?

No. A swap is the act of exchanging one token for another. A DEX is one kind of platform where you can do it. You can also swap through a wallet's built-in feature, an aggregator, a cross-chain protocol or a centralized exchange's convert tool.

What is a DEX swap?

A DEX swap is a token-for-token trade you sign from your own wallet. A smart contract takes your input token, prices the trade against a liquidity pool or order book, and sends the output token back to your wallet in the same transaction.

Why do so many DEXs have 'swap' in their name?

Because swapping is their core function. Uniswap, SushiSwap and PancakeSwap all launched as automated market makers whose main job was letting users swap one token for another against a pool.

Is swapping in my wallet cheaper than using a DEX directly?

Not usually. Wallet swaps route to the same DEXs and aggregators but often add a fee. MetaMask's standard swap fee, for example, is 0.875%. Compare the final amount received, not just the headline rate.

Sources

  1. Uniswap developer docs: Swaps
  2. Uniswap developer docs: Fees
  3. MetaMask Support: MetaMask fees
  4. ethereum.org: Decentralized finance (DeFi)
  5. Jupiter developer docs (Solana swap aggregator)

Educational content, not financial advice. DeFi carries risk, including total loss of funds.

↑↓ to navigate ↵ to open Esc to close