Skip to content

Cryptocurrency Exchange: CEX, DEX, Costs, and Custody

Learn how cryptocurrency exchanges connect buyers and sellers, how CEX and DEX execution differs, and how to evaluate custody, liquidity, fees, networks, and withdrawal risk.

Updated

For educational purposes only; not investment, legal, tax, or custody advice. Crypto trading and custody can result in loss or loss of access.

Direct answer

A cryptocurrency exchange is a venue or protocol for buying, selling, or swapping crypto assets. It may connect fiat money with crypto, match buyers and sellers through an order book, or let a wallet trade against on-chain liquidity. An exchange provides access and execution; it does not make an asset safe, liquid, or suitable.

A centralized exchange (CEX) operates customer accounts, controls deposited assets, and records most trades in an internal ledger. A decentralized exchange (DEX) normally lets a user trade from a self-controlled wallet through smart contracts. These models shift risk rather than remove it: a CEX concentrates custody and operator risk, while a DEX places more responsibility on the user to verify contracts, tokens, approvals, routes, and transaction terms.

Before using either model, identify the legal or protocol counterparty, the exact asset and network, how the price is formed, every material cost, who controls the keys, and how a completed trade can be withdrawn or verified.

How it works

  1. Fund or connect. On a CEX, the user deposits fiat or crypto and receives an internal account credit after the platform’s checks. On a DEX, the user connects a wallet and keeps control of the keys until a signed transaction or order is executed.
  2. Choose the market. Confirm the trading pair, chain, token contract, and settlement asset. The same ticker can refer to different tokens or networks, and not every platform supports every version.
  3. Inspect the quote. An order-book venue shows bids and asks at different prices and sizes. An automated market maker quotes against liquidity pools. Check depth or price impact, spread, trading or protocol fee, network fee, and any deposit, withdrawal, or conversion charge.
  4. Set execution terms. A market order seeks immediate execution at available prices, not a guaranteed displayed price. A limit order controls price but may remain unfilled. A DEX swap should enforce an acceptable minimum received or maximum paid; a wider slippage tolerance permits a worse result rather than improving the quote.
  5. Verify settlement. A CEX fill usually changes internal balances before any withdrawal occurs on-chain. A DEX trade normally settles through smart contracts. In both cases, verify the final amount, fees, asset, network, transaction status, and destination rather than relying only on an interface message.

Worked example

Suppose a CEX order book offers 1 ETH at 2,980 USDT and another 3 ETH at 2,990 USDT. A market order to buy 2 ETH consumes both price levels: 1 ETH fills at 2,980 USDT and 1 ETH at 2,990 USDT. The average price before fees is 2,985 USDT, not the best displayed ask of 2,980 USDT. At a 0.10% trading fee, the fee is 5.97 USDT. The resulting ETH is still an internal account balance until a withdrawal reaches the user’s wallet.

Now suppose a DEX quotes about 2 ETH for 5,970 USDT, with 0.35% price impact, a 0.30% protocol fee, an estimated 8 USDT network fee, and 0.50% slippage tolerance. The user must compare the enforceable minimum received with the quote. If execution would fall below that minimum, the swap should revert, although the failed transaction can still consume a network fee.

The two screens use different cost and custody models. A useful comparison combines execution price, spread or price impact, trading or protocol fees, network and withdrawal fees, settlement time, and the risk of leaving assets with an operator or authorizing a smart contract.

Risks and controls

  • Platform and legal risk: Confirm the operating entity, jurisdiction, permissions, account agreement, dispute process, and rules for withdrawals, asset use, segregation, and insolvency. A familiar brand can serve customers through different entities.
  • Custody risk: With third-party custody, the provider controls access to the private keys. Ask how assets and liabilities are recorded, whether customer assets may be commingled, lent, pledged, or subcontracted, and what happens after a hack, shutdown, or bankruptcy. A displayed balance or proof-of-reserves snapshot alone does not establish complete liabilities or continuing solvency.
  • Asset and network risk: Verify the chain, token contract, address, and any memo or tag before depositing or withdrawing. Test an unfamiliar destination with a small amount. A transfer on an unsupported network may not be credited and may be difficult or impossible to recover.
  • Execution and liquidity risk: Inspect market depth, active pool liquidity, quote expiry, and order rules. Large or urgent trades can cross several price levels or move a pool price. Split orders only after weighing lower price impact against extra fees, time, and market exposure.
  • Account and contract risk: Protect CEX accounts with a unique password, strong multifactor authentication, withdrawal safeguards, and minimally permitted API keys. On a DEX, verify the domain, contract, token, spender, approval amount, and signed transaction; self-custody does not protect against a malicious approval or mistaken signature.
  • Product risk: Spot trading, margin, perpetuals, options, lending, and staking have different rights and failure modes. Leverage, funding, liquidation, collateral, and rehypothecation can create losses beyond ordinary spot-price movement. Do not infer product protections from the word “exchange.”

Keep records of deposits, orders, fills, fees, withdrawals, transaction identifiers, and support messages. Periodically test whether withdrawals work, but prepare secure backups and recovery procedures before moving long-term assets to self-custody. Convenience and control are a trade-off, not a guarantee on either side.

Common misconceptions

Myth 1: A large exchange cannot have custody problems

Scale and authorization may improve some controls, but they do not eliminate cyberattack, commingling, fraud, operational failure, legal restraint, liquidity stress, or insolvency. Evaluate the exact entity and custody terms.

Myth 2: A market order executes at the displayed price

A market order consumes available liquidity. Its average execution price can differ from the latest trade or best quote, especially when the order is large or the market moves quickly.

Myth 3: A DEX requires no trust

A DEX reduces reliance on an exchange custodian, but users still depend on contract code, token behavior, interfaces, routing, infrastructure, and the transaction they sign. Permissionless access is not a security review.

Myth 4: The lowest advertised fee means the cheapest exchange

Total cost can include spread, price impact, trading or protocol fees, currency conversion, network fees, withdrawal charges, failed transactions, and the economic cost of delayed or unavailable access.

Sources

Navigation

Search the wiki...