Decentralized exchanges allow people to trade cryptocurrency tokens directly with each other. They have some advantages over centralized crypto exchanges, as well as some drawbacks.
In brief
- DEXs allow trading without intermediaries.
- Users don’t need to give up custody of their coins.
- The main drawback for some: you are responsible for your own security.
A decentralized exchange, or DEX, is a platform where people can trade cryptocurrencies without an intermediary. To better understand what a decentralized exchange is, it’s important to first know how centralized exchanges work.
How do centralized exchanges work?
A centralized exchange like Binance or Coinbase is a website or app where people can buy, sell, or trade cryptocurrencies and tokens listed on that exchange.
Suppose you want to buy Bitcoin.
You can go to an exchange, sign up by providing some banking details and identification, and deposit some cash. (Sometimes, this process can take days, which is one drawback of centralized exchanges compared to DEXs.) The exchange will quote you a price based on an “order book” of people buying and selling at different amounts, and you can complete the transaction.
So, what happens next?
The exchange will show those Bitcoins in your account, and you can trade them for other tokens on the exchange. But you don’t actually hold them because you’re trusting the exchange to act as a custodian on your behalf. Any trading you do, such as exchanging Bitcoin for Ethereum, doesn’t happen on a blockchain but within the exchange’s database.
Exchanges pool users’ cryptocurrencies into wallets (often “hot wallets” connected to the internet) controlled by the exchange. The exchange controls your private keys. (There are ways around this, as exchanges allow you to transfer your tokens to a private wallet, but this adds an extra-step later if you want to trade that crypto.)
The appeal of decentralized exchanges, say DEX advocates, is security. A centralized exchange can limit your access to your crypto, restrict or stop your ability to trade it, or even be vulnerable to hackers.
On the other hand, centralized exchanges are generally much easier for newcomers to use and often offer fast trades because they don’t rely on blockchain infrastructure. This has been Coinbase’s biggest achievement: becoming the household name in the U.S. for crypto-curious individuals who want to dip their toes into buying cryptocurrencies but feel intimidated by the process. For these people, letting Coinbase (or any other centralized exchange) act as the custodian of their funds is fine.
Other examples of centralized exchanges are Binance and CEX.io.
How do decentralized exchanges work?
A decentralized exchange uses smart contracts (self-executing protocols) to facilitate trades between individuals but doesn’t take control of their coins.
DEXs achieve this in one of three ways: an on-chain order book, an off-chain order book, or an automated market maker (AMM) approach.
In an on-chain order book, every transaction is written to a blockchain—not just the actual purchase but also the requests to buy or cancel an order. This is the ultimate in decentralization, but the need to record everything on a blockchain can make it slower and more expensive.
With off-chain order books, everything happens elsewhere, and only the final transaction is settled on the blockchain. Since orders aren’t stored on-chain, this method may have some of the security issues of centralized exchanges, but it’s not as slow or expensive as on-chain order books.
Automated market makers (AMMs) do away with order books. With order books, if you hold Chainlink tokens and want to buy Compound, you’d need someone with Compound who wants Chainlink and is willing to trade at an agreed price. AMMs eliminate counterparties and introduce algorithms to set the price, letting you trade Chainlink for Compound regardless of whether there’s someone on the other side of the trade. To enable this, they usually use “liquidity pools,” which essentially pay users to keep some of their funds in a smart contract that can then be leveraged for trades. Individual users, therefore, play a key role in facilitating exchanges.
Advantages of DEXs
Privacy
Decentralized exchanges don’t require U.S. citizens to enter private information, such as Social Security numbers or addresses, which centralized exchanges are obligated to request under the Bank Secrecy Act. So far, because DEXs don’t take control of assets, they’ve avoided such regulations.
Many options
DEXs like Uniswap allow anyone to create a token pair. You can mint a new token and start trading it for a friend’s token instantly. In this way, DEXs enable people to own tokens for use in decentralized finance (DeFi)—services that let them save, borrow, lend, or trade without going through a bank or other financial institution.
Less risk
Since your coins aren’t held on a centralized exchange but in a wallet with private keys you control, they’re immune to attacks. And while centralized exchanges may go down for maintenance, you can continue trading on a DEX.
Disadvantages of DEXs
No bank card links
Decentralized exchanges only deal with cryptocurrency assets and not fiat money (like USD), as enabling crypto-to-fiat transactions would require the involvement of banks. (Dollar transactions can’t be settled instantly like blockchain-based ones.) So, you must already have cryptocurrency to use a DEX.
Complexity
Uniswap and many other DEXs are built on the Ethereum blockchain. All tokens traded there must also exist on the Ethereum blockchain. This means no Bitcoin or other popular tokens from competing blockchains. In fact, technically, there’s no ETH either. Instead, users must convert their ETH to “Wrapped Ether” (WETH), which has the same price as ETH, to trade.
No customer service
Centralized exchanges operate like banks. They have customers they aim to keep happy. But on a truly decentralized exchange, there’s no actor on the other side. The developers who created the protocol don’t have the same relationship with users. While entire communities of DEX users exist, you’re ultimately responsible for your own funds.
Your choice
Decentralized exchanges generally aim to embody the blockchain spirit of “trustlessness” and privacy. Your tokens remain in your possession until you trade them. Some people find this comforting from a security perspective. Others, however, see this level of responsibility as intimidating, and the risks as concerning.
Most DEX advocates agree: these are the trade-offs for true decentralization.