# CEX vs DEX: Centralized vs Decentralized Crypto Exchanges

> A CEX is run by a company that holds your funds; a DEX runs on smart contracts and you keep custody. Compare fees, liquidity, risks and how perp DEXs work.

Updated: 2026-09-23

**A centralized exchange (CEX) is a company-run platform that holds users' funds and matches trades on its own servers, while a decentralized exchange (DEX) is a set of smart contracts on a blockchain that lets users trade directly from wallets they control.** Both let you buy, sell and trade derivatives on [cryptocurrencies](/learn/what-is-cryptocurrency). The main differences are who holds the funds, how prices are formed and what can go wrong.

## Key takeaways

- **Custody**: a CEX holds your funds; on a DEX you keep them in your own wallet.
- **Pricing**: CEXs use **order books**; many spot DEXs use **AMM liquidity pools**.
- **Costs**: CEXs charge maker and taker fees; DEXs add **gas** and sometimes **price impact**.
- **Perp DEXs** such as Hyperliquid and dYdX offer perpetual futures on-chain, often with **hourly funding**.
- Price and funding differences **between CEXs and DEXs** create arbitrage opportunities.

## CEX vs DEX at a glance

| | CEX | DEX |
|---|---|---|
| Who holds funds | The exchange | You, in your wallet or a smart contract |
| Account | Email and usually KYC | Connect a wallet |
| Price formation | Off-chain [order book](/learn/what-is-an-order-book) | AMM pool or on-chain order book |
| Fees | [Maker and taker fees](/learn/maker-vs-taker-fees) | Pool or trading fee plus gas |
| Speed | Very fast matching | Depends on the chain |
| Asset listings | Chosen by the exchange | Often permissionless |
| Fiat on-ramp | Often available | Usually not |
| Main risks | Exchange failure, frozen withdrawals | Smart contract bugs, oracle issues, phishing |

## How a CEX works

You deposit funds to an address controlled by the exchange. Your balance becomes an entry in the exchange's internal database, and trades happen off-chain in its matching engine. Only deposits and withdrawals touch the blockchain. This makes trading fast and cheap per trade, but you depend on the exchange staying solvent and keeping withdrawals open.

## How a DEX works

On an AMM DEX, liquidity providers deposit two tokens into a pool, and a formula sets the price. Every swap is a blockchain transaction you sign from your wallet. You never hand custody to a company, but you pay gas, and large trades move the pool price. See [what is slippage](/learn/what-is-slippage) for how AMM price impact is calculated.

## Perp DEXs

Perp DEXs offer [perpetual futures](/learn/what-are-perpetual-futures) without a centralized custodian. Designs vary:

| Design | How it works | Examples |
|---|---|---|
| On-chain order book | A dedicated blockchain runs a matching engine with bids and asks | Hyperliquid, dYdX |
| Pool and oracle | Traders trade against a liquidity pool at oracle prices | GMX-style designs |

Perp DEXs often pay funding **every hour**, while many CEX contracts pay every 8 hours. Comparing rates requires converting both to the same unit, which ArbTide does on the [live funding rates page](/funding-rates).

## Worked example: cost of a $5,000 spot trade

Illustrative numbers for buying $5,000 of a token:

| Cost | CEX | AMM DEX |
|---|---|---|
| Trading fee | 0.10% taker = $5.00 | 0.30% pool fee = $15.00 |
| Gas | $0.00 | $2.00 |
| Price impact | 0.02% = $1.00 | 0.10% = $5.00 |
| **Total** | **$6.00** | **$22.00** |

In this example the CEX is cheaper per trade. But moving funds onto the CEX may cost a withdrawal or network fee, and the DEX may list a token the CEX does not. Real costs depend on the pool, the chain and the exchange's fee tier.

## CEX-DEX arbitrage

Because prices form separately on each venue, the same asset can trade at different prices on a CEX and a DEX. Traders who hold funds on both can buy on one and sell on the other. Gas, price impact, deposit times and the risk of two unrelated tokens sharing a ticker all affect the result. Read more in [what is crypto arbitrage](/learn/what-is-crypto-arbitrage), and see which CEXs and perp DEXs ArbTide covers on the [exchanges page](/exchanges).

## Which one to use?

Neither is better for every case. A CEX suits fast trading, fiat access and deep order books on major pairs. A DEX suits self-custody, new tokens and on-chain strategies. Many traders use both and spread funds across venues to limit exposure to any single one.

## Frequently asked questions

### What is the difference between a CEX and a DEX?

A centralized exchange (CEX) is operated by a company that holds users' funds and matches trades on its own servers. A decentralized exchange (DEX) runs on a blockchain through smart contracts, and users trade from wallets they control.

### Is a DEX safer than a CEX?

Each has different risks. A DEX removes the risk of an exchange company losing or freezing your funds, but adds smart contract, oracle and wallet security risks. A CEX adds counterparty risk but usually offers account recovery and customer support.

### What is a perp DEX?

A perp DEX is a decentralized exchange for perpetual futures. Some, such as Hyperliquid and dYdX, run on-chain order books on their own blockchains, while others use liquidity pools and oracle prices.

### Do DEXs require KYC?

Most DEX smart contracts do not require identity verification, because users connect a wallet directly. Front-end websites may still restrict access by region, and rules differ by country.
