Centralized vs decentralized crypto exchanges.
A centralized exchange (CEX) is a company that holds your deposits, checks your identity and matches orders on its own servers. A decentralized exchange (DEX) is a set of smart contracts that swaps tokens straight from your own wallet. With a CEX you trust a company; with a DEX you rely on the code and on your own care.
เนื้อหานี้ยังมีเฉพาะภาษาอังกฤษ

You hold 1,000 USDC and want ether. You could send it to an exchange company and let the company hold the ether. Or you could connect your own wallet to a blockchain program and swap with no company involved.
The first route uses a centralized exchange (CEX). The second uses a decentralized exchange (DEX). You end up with ether either way, but who holds your coins along the way, and who can help when something breaks, differs completely.
How a centralized exchange works
A CEX is a business with customer accounts, the kind described in what a crypto exchange is. You sign up, pass identity checks and deposit into wallets the company controls.
Its servers run the order book and match your orders against other customers' orders. Because the company holds everything, trades are instant and carry no network fee.
A CEX can connect to banks, so you can pay in with dollars or euros and cash out the same way. If you lose your password, support can restore access after checking who you are.
That control also works against you. The exchange can freeze your account, pause withdrawals, or lose customer funds through a hack or bad management. While your coins sit there, their safety depends on the company's security and its finances.
How a decentralized exchange works
A DEX is a set of smart contracts: programs on a blockchain that follow their code with no company approving each step.
You connect a self-custody wallet and approve the swap. The contract sends the new tokens back to that wallet in the same transaction.
Many DEXs price trades with liquidity pools in place of an order book. A typical pool holds two tokens supplied by users, who earn a share of the fees.
The contract prices each swap from the ratio of the two tokens, a design called an automated market maker.
The contract asks for no account and no identity, only a wallet address. There is also no password reset and no support desk.
If you approve a malicious contract or buy a fake token with a familiar name, nobody can reverse it.
What a swap costs on each
Costs are built differently on each, so compare them for your own trade size. The figures below are round and illustrative; real fees differ by exchange, network and day.
Take one swap of 1,000 USDC into ether. The USDC already sits on the exchange for the CEX route and in your wallet for the DEX route.
| Cost | CEX | DEX |
|---|---|---|
| Trading or pool fee | 0.1% = $1 | 0.3% = $3 |
| Price impact | $1 | $1 |
| Network fee for the swap | None | $5 |
| Moving the ether to your wallet | $3 withdrawal fee | Already there |
| Total | $5 | $9 |
If your USDC starts in your own wallet, sending it to the CEX adds a network fee to that column too.
The percentage fees grow with your trade. The network and withdrawal fees are flat, so they hurt small trades most. On a 100 USDC swap, a $5 network fee alone is 5 ÷ 100 = 5%.
Network fees vary a lot between blockchains and with how busy a network is. On some networks the $5 network fee falls to cents, and on a congested one it can rise far above this example.
A swap that fails on a DEX can still cost the network fee. The network charges for processing the transaction even when the contract rejects the trade.
Where the risks sit
| Risk | CEX | DEX |
|---|---|---|
| Company fails or freezes withdrawals | Possible | No company holds your coins |
| Platform hack | Customer funds held in one place | A contract bug can drain a pool |
| Your own mistake | Support may help in some cases | Usually final |
| Fake tokens | Listings are screened, imperfectly | Anyone can create a token and a pool |
| Lost login | Reset through support | Lose the seed phrase, lose the coins |
Two DEX risks catch newcomers. The first is token approval: on Ethereum and similar chains, you give the contract permission to spend a token before it can swap it. An unlimited approval stays active until you revoke it.
A later bug in that contract, or a fake site you approved by mistake, can use the approval to move your tokens. Approving only the amount you are swapping limits that.
The second is front-running. On chains with a public mempool, your swap waits there briefly, where bots can see it, buy just before you and sell just after. A lower slippage tolerance setting gives them less room.
Which kind fits which job
A CEX fits jobs that touch the banking system, such as paying in from a bank account and cashing out. It also suits active trading with limit and stop orders, and anyone who wants a support desk.
A DEX fits jobs on the blockchain itself, such as swapping coins you already keep in your own wallet or using other DeFi apps. It also lists tokens no CEX carries, which brings more fake and abandoned tokens with it.
The line between them is blurring. Some DEXs run order books on-chain, and some CEXs offer self-custody wallets.
A common pattern is a CEX for moving money in and out of the banking system, and a self-custody wallet with a DEX for everything on-chain.
คำถามที่พบบ่อย
Is a DEX safer than a CEX?
Each carries a different risk. A DEX removes the risk of a company losing or freezing your coins, and adds smart contract bugs, fake tokens and mistakes nobody can undo.
Do decentralized exchanges require KYC?
The smart contract itself only sees a wallet address. Some websites that give access to a DEX block users from certain countries, and the rules on this vary by country and change over time.
Can I buy crypto with dollars on a DEX?
Not directly, because a DEX only swaps tokens that are already on a blockchain. To start from bank money you need a fiat on-ramp, such as a centralized exchange or a payment service built into a wallet.
Why did my DEX swap fail and still cost a fee?
The network charges for processing a transaction even when the contract rejects it, for example because the price moved past your slippage limit. You lose the network fee, and no pool fee is charged.
เรียนต่อ
บทที่ 1What is a crypto exchange?A crypto exchange is a marketplace where you swap government money for coins, or one coin for another. It lists trading pairs, matches buy and sell orders, and charges a fee on each trade. Most exchanges also hold the coins you deposit, so the exchange is your custodian as well as your market.
บทที่ 1How to choose a crypto exchange.Check five things in order: that the exchange is allowed to serve people where you live, how it holds customer funds, the full cost of buying and withdrawing under your own plan, whether its order books are deep enough for your trade size, and how a small test deposit and withdrawal go before you move larger sums.
บทที่ 1What are fiat on-ramps and off-ramps?A fiat on-ramp is any service that turns government money, such as dollars or euros, into crypto. An off-ramp does the reverse and pays the money back to your bank account. Exchanges, card payment providers and peer-to-peer markets all do this job, and each one charges its fees in different places.
บทที่ 1KYC and 2FA on crypto exchanges.KYC, short for know your customer, is the identity check an exchange runs before you can deposit, trade or withdraw, usually with an ID document and a selfie. 2FA, two-factor authentication, asks for a second proof at login and withdrawal, such as an app code or a hardware security key. KYC protects the financial system; 2FA protects your account.