Skip to content
buybitcoinsmart

Glossary / Buying & exchanges

Decentralized exchange

Also known as DEX.

Definition
A decentralized exchange swaps one token for another inside a smart contract, with no company holding the funds, no account, and no way to accept a bank transfer.

A DEX replaces the matching engine with code anyone can call, and replaces the market maker with a pool of deposited tokens. Uniswap launched in November 2018, and the v3 release of May 2021 prices swaps in tiers of 0.05, 0.30, or 1 percent. For a bitcoin buyer the catch is structural: bitcoin does not live on the chains these contracts run on.

How it works

Most decentralized exchanges are automated market makers rather than order books.

Instead of matching a buyer to a seller, the contract holds a reserve of two tokens and prices every trade off the ratio between them. Send token A in, the formula tells you how much of token B comes out, and the pool's price shifts by an amount that depends on how large your trade was relative to the reserves. Liquidity providers deposit both sides and earn the swap fee. Nobody signs off on the trade, because there is nobody to sign: the contract executes for whichever wallet calls it, which is what "permissionless" means here.

Two consequences follow immediately. The first is that you pay the chain's gas fee on top of the swap fee, and on a congested day that can exceed the swap fee several times over. The second is that everything happens in public before it settles, so bots can see your pending swap and trade around it, a cost usually described as sandwiching.

Where you see it

Decentralized exchanges matter to bitcoin owners mainly through what they cannot do.

There is no fiat door. A DEX has no bank account, so it cannot take a card, a wire, or a SEPA transfer, which means your first bitcoin cannot come from one. There is also no native bitcoin. Bitcoin's own chain has no smart contract layer capable of running these pools, so what trades on an Ethereum or Solana DEX under a bitcoin ticker is a wrapped token: an IOU minted by a custodian who holds real coins somewhere else. WBTC, the largest of them, depends entirely on that custodian staying honest and solvent, and the arrangement is not static. Control of WBTC custody was restructured in August 2024 to include a Hong Kong trust company tied to Justin Sun, and Coinbase responded by suspending WBTC trading on December 19, 2024. That is custodian risk, reappearing inside a product marketed as trustless.

So the honest summary for someone buying bitcoin: a DEX is a tool for trading tokens on a chain that is not bitcoin, and if you use one for bitcoin exposure you have swapped a regulated custodian for an unregulated one plus a smart contract. The bitcoin-native equivalents are peer-to-peer marketplaces with multisig escrow and atomic swaps, both of which move real coins.

Decentralized exchange vs atomic swap

A decentralized exchange is a shared pool that anyone trades against; an atomic swap is a single trade between two named parties. The DEX needs both assets to exist on the same chain and needs liquidity providers to have funded the pool in advance. An atomic swap needs neither: it uses matching hash-locked contracts on two separate chains so that either both legs complete or both expire, which lets real bitcoin change hands without a pool, a token wrapper, or a company. Atomic swaps are slower and thinner, and they are the only one of the two that trades bitcoin itself.

Not to be confused with

Frequently asked questions

Can I buy bitcoin on a decentralized exchange?

Not real bitcoin, and not with bank money. A DEX has no fiat rails and cannot trade bitcoin's own chain, so what you receive is a wrapped token issued by a custodian who holds the actual coins.

Are decentralized exchanges cheaper than centralized ones?

Rarely, once everything is counted. Uniswap v3 pools charge 0.05, 0.30, or 1 percent per swap, and on top of that you pay network gas plus the cost of bots trading around your pending transaction.

Read next

Related terms

More in Buying & exchanges