What is DEX (decentralized exchange)?

An exchange that runs as smart contracts on a blockchain, matching trades directly between users' wallets without a company holding funds.

Not yet verifiedHow we verify

3 min read

In this entry

An exchange that runs as smart contracts on a blockchain, matching trades directly between users' wallets without a company holding funds.

DEXs do not require kyc but cannot accept fiat currency directly. Contrast with cex, where a company holds your balance and you sign in with an account. On a decentralized exchange you connect a wallet, approve the contract to move a token, and the trade settles on chain in the same transaction.

The common misunderstanding is that a decentralized exchange is cheaper. It removes the custodian, not the cost. You still pay a pool fee, a network fee, and price impact, and on a busy chain the network fee alone can exceed what a centralized venue charges on a small order.

How it works

Most decentralized exchanges use an automated market maker rather than an order book. A liquidity pool holds two tokens and a formula sets the price from their ratio. In the constant product design described in the Uniswap v2 white paper, the product of the two reserves stays fixed across a trade, so the more you buy, the worse the price you get on the last unit.

Fees are set per pool. The Uniswap v3 documentation lists pool fee tiers of 0.01%, 0.05%, 0.30%, and 1.00%, with the tier chosen to suit how correlated the pair is. That fee goes to the liquidity providers, not to a company.

Three costs stack on every swap: the pool fee, the network fee paid to the chain, and price impact from moving the pool's ratio. Aggregators split an order across several pools to reduce the third.

Settlement is atomic. Either the whole swap happens in one transaction or the transaction reverts and you keep your tokens, though you still pay the network fee for the failed attempt.

Example

Take an illustrative swap of $500 through a pool charging 0.30%. The pool fee is $1.50. Add an illustrative $2 network fee and 0.15% of price impact, which is $0.75. Total cost is $4.25, or 0.85% of the order. The same $500 at a centralized venue charging a 0.40% taker fee costs $2.00 plus the spread. Which is cheaper depends entirely on the chain's fee at that moment and the depth of the pool.

Why it matters when you buy

If you are buying with a bank transfer or a card, you need a cex or a fiat gateway first, because a decentralized exchange has no way to take government currency. Decentralized venues matter mainly for tokens that are not listed anywhere custodial. Compare what a listed asset costs on centralized venues at the fee comparison and check measured depth at the liquidity pages before assuming a pool is the better route.

cex — the custodial alternative, automated market maker — the pricing formula behind most pools, liquidity pool — where the tokens actually sit, slippage — the gap between quoted and filled price, token approval — the permission a swap requires, impermanent loss — what pool providers risk.

Questions

Do I need to verify my identity to use a DEX?

No. A decentralized exchange has no account, so there is no identity check. That does not remove your tax obligations, and it also means there is no support desk and no way to reverse a mistake.

Can I buy crypto with a debit card on a DEX?

Not directly. Some interfaces embed a third-party fiat gateway that sells you the chain's native token first, which you then swap. That gateway does run identity checks and charges its own fee.

Why did my swap fail and still cost money?

The chain charges for the computation it performed, even when the transaction reverts because the price moved past your slippage tolerance. Raising tolerance reduces failures but exposes you to a worse fill.

Guides that use this term

  • How Crypto Exchanges Make Money

    A crypto exchange earns most of its money from trading fees charged on both sides of every trade, and adds revenue from the spread built into simple buy buttons, deposit and withdrawal charges, listing arrangements, interest on customer balances, and paid products such as staking and derivatives.

  • How to Read an Order Book

    An order book is a live list of every unfilled buy and sell order for one trading pair, sorted by price, with buyers stacked below the current price and sellers stacked above it, and reading it tells you what your order will actually cost before you place it.

  • How to Verify a Token Contract Address Before You Buy

    A token's contract address is its only real identity, so verifying one means getting the address from the project's own official channel, confirming the same address independently from a second source, and checking on a block explorer that the contract is what it claims to be before you trade against it.

  • What Is a Memecoin, and Why Most Lose Their Value

    A memecoin is a token whose price rests on attention rather than on revenue, a product, or a claim on any asset, and the structural reason most end up worthless is that attention is the only thing holding the price up and it always moves on to something else.

  • Centralized vs Decentralized Exchanges: Which Should You Use

    A centralized exchange holds your coins and your identity documents but lets you buy with a bank transfer or card, while a decentralized exchange requires no account and never takes custody but can only swap crypto you already own, so most people start on the first and use the second for assets it does not list.