What is a DEX

A decentralized exchange (DEX) is a set of smart contracts that lets people swap tokens directly on a blockchain, from wallets they control. There is no company taking deposits and no account to open: prices come from code and pooled liquidity, and every swap settles as an on-chain transaction.

7 min readUpdated July 2026

How does a decentralized exchange work?

A centralized exchange keeps an order book and a ledger of customer balances on its own servers. A DEX replaces both with smart contracts deployed on a public blockchain: the code holds pooled liquidity, quotes a price for any swap and settles it by rules anyone can inspect. No operator sits between you and the market, which is why DEXes are often called permissionless.

Using one is a short loop. You connect a wallet, pick a pair, review the quote and sign a transaction. The contract verifies the math, takes your input token into the pool and sends the output token to your address, all inside the same transaction. If any condition fails, the swap reverts and your tokens never move, though the network still charges gas for the attempt.

Two more moving parts sit around every DEX swap. Your wallet is the signer: it holds the keys and approves what a contract may move, one token allowance at a time. And the network charges gas for the computation, so the same swap costs more when the chain is busy. The gas fees guide covers how to time and trim that cost.

What is an automated market maker?

Most DEXes price swaps with an automated market maker (AMM): a formula that quotes prices from the balances of a liquidity pool instead of matching individual buyers and sellers. In the classic version, the product of the two pool balances stays constant, so the more of a token you take out, the more expensive the next unit becomes. Uniswap launched the first widely used AMM in November 2018, and the model now powers most on-chain markets. Newer designs concentrate liquidity into chosen price ranges, which deepens the market around the current price.

  • A pool holds a pair of tokens, and its formula quotes a price for any swap size
  • Anyone can add tokens to a pool and collect a share of the fees swappers pay
  • Fees vary by pool: Uniswap v3 tiers range from 0.01% to 1% per swap, per its documentation
  • Larger swaps move the price further, which is why big orders in small pools get worse rates

How is a DEX different from a centralized exchange?

The practical differences are custody, access and price formation. On a centralized exchange you trade from a deposited balance the company controls; on a DEX you swap from your own wallet and the venue never holds your funds. The DEX vs CEX guide compares the two models point by point.

Custody
Tokens stay in your wallet; a contract touches them only inside the swap transaction
Account
None. You connect a wallet and interact with the venue's contracts directly
Listings
Permissionless: anyone can open a pool for a token pair, which cuts both ways
Price formation
Pool formulas or on-chain order books, readable by anyone
Availability
The venue is a contract, so it runs whenever the chain does

Neither model wins outright. Centralized venues still clear most spot volume and remain the bridge to bank money; DEXes give you custody, open access and markets that exist nowhere else. Many people use both, for different jobs.

Where do DEXes fit in decentralized finance?

Decentralized finance (DeFi) is the branch of finance built as smart contracts on public blockchains: swapping, lending, borrowing and stablecoins, all usable from a wallet without an intermediary approving each step. DEXes are the most used building block of the DeFi space, because nearly every on-chain position starts or ends with a swap. Lending markets liquidate through DEX pools, stablecoins rebalance through them and dashboards read prices off them, which makes DEX volume a good pulse check for on-chain activity as a whole.

The scale is measurable. DefiLlama, the reference tracker of the DeFi industry, counted about $75 billion of value locked in DeFi protocols in July 2026, spread across more than 350 chains. DEX trading keeps growing against centralized venues too: CoinGecko's 2026 trading activity report put DEXes at 13.6% of global spot volume in January 2026, roughly double their share of two years earlier and below the record 24.5% reached in June 2025.

13.6%of global spot volume settled on DEXes in January 2026, per CoinGecko
24.5%record monthly DEX share of spot volume, set in June 2025 (CoinGecko)
$75Blocked across DeFi protocols in July 2026, per DefiLlama
2,000+DEX protocols tracked by DefiLlama across 350+ chains

What are the risks of using a DEX?

Self-custody removes the exchange as a counterparty, and it also removes the safety net. None of the following is a reason to avoid DEXes; all of them are reasons to know what you are signing. Five risks to understand before your first on-chain swap:

  • Smart contract bugs: pool code can carry flaws, so audited and battle-tested contracts matter
  • Fake tokens: anyone can list a token under any name, so verify the contract address before you swap
  • Price impact and slippage: thin pools move sharply, and the final rate can differ from the quote
  • MEV bots: public transactions can be front-run or sandwiched, which costs part of your rate
  • No recovery desk: a swap into the wrong token or on the wrong chain cannot be reversed for you

Two of these risks have their own guides: how slippage moves your final rate and how MEV protection shuts the bots out.

Do you swap on one DEX or across many?

Liquidity is scattered. The same pair often has pools on several DEXes across several chains, each with its own depth and fee tier, and the venue with the deepest pool changes over time. Checking each one by hand is the manual version of what aggregation automates.

1inch is not a DEX. It is an aggregation protocol: it runs no pools of its own, compares prices across DEX liquidity and can split one swap across several sources. The result is competitive rates, aggregated across 300+ sources, signed from your own wallet. Read how a DEX aggregator routes one swap across venues.

No. 1inch is an aggregation protocol and interface: it routes each swap across liquidity that lives on DEXes rather than operating its own pools. You keep custody the whole time, and the quote reflects competitive rates, aggregated across 300+ sources.

No. A DEX has no accounts, only wallet addresses. You connect a wallet, sign the swap and settlement happens on-chain. The flip side is that wallet security rests entirely with you.

They are structured differently. A DEX swap pays the pool fee plus network gas. A centralized exchange charges a spot fee per trade, 0.1% at the base tier on Binance for example, plus a withdrawal fee when you move coins to your own wallet. Which route is cheaper depends on the pair, the size and the chain, so compare the final amounts received.

On-chain trading experiments date back to the mid-2010s, but the model spread when Uniswap launched its automated market maker on Ethereum in November 2018. Permissionless pools made market making open to anyone, and DEXes have grown from a niche to a double-digit share of spot trading since.

Swap on-chain, keep your keys

1inch routes each swap across DEX liquidity for competitive rates, aggregated across 300+ sources.

Start swapping