TLDR:
Traditional exchanges are marketplaces for selling financial instruments like securities, commodities and derivatives.
Centralised exchanges (CEXs) in Web3 are companies where you can create an account and trade between coins, tokens, and fiat money.
Decentralised exchanges (DEXs) in Web3 are always online apps, often ran without a company, that allow you to trade tokens directly with your Web3 wallet.
There are many differences between CEXs and DEXs such as: usability, custody, use of fiat, KYC, transparency & privacy. Which is best depends on your use-case.
I began this week writing a post on how to bridge between ETH and BTC with Thorchain. However, as I started writing I found myself needing to explain the difference between centralised and decentralised exchanges (CEXs and DEXs), and I ended up writing so much that I decided to turn it into its own post.
Today’s post is more beginner level than the content I usually write, since anyone who’s in Web3 will have used an exchange at some point, but I’ve tried to make it quite comprehensive. It serves as an important base for many different conversations and the comparison of CEXs and DEXs is a worthwhile distinction to make through the lens of how Web2 is different to Web3.
Following from what I’ll cover this week, the next couple weeks I’ll show how a DEX works and then get back to Thorchain. For now though let’s jump into understanding the difference between CEXs and DEXs!
Traditional Exchanges
To begin its important to understand what we mean by an exchange in the first place. In traditional finance (TradFi) an exchange is a marketplace for selling financial instruments like securities, commodities and derivatives.
In layman’s terms an exchange is where you go to buy the stock of your favourite companies like Google or Apple. A couple of the biggest examples are the New York Stock Exchange and the NASDAQ.
If a company wants to sell their stock on the open market to raise capital, they list it on a stock exchange, then buyers can purchase the stock in the hopes of a return. A long time ago exchanges were physical places but today they are online digital platforms. Yet, TradFi exchanges still have plenty of human intervention and its not unusual to call through to a broker to access more liquid markets.
Centralised Exchanges (CEXs)
Centralised exchanges in the world of Web3 and crypto are a pretty natural evolution of their traditional counterparts. They are digital platforms, that are always online, and almost entirely automated. CEXs are some of the real juggernauts in the space.
However, while the traditional markets still have some legacy limitations like “trading hours” to open and close (a throwback to when exchanges were housed in physical buildings), CEXs allow crypto trading 24h of the day. Plus, in traditional exchanges you often need to contact brokers, but in CEXs its the opposite as its all automated and you’ll struggle to speak with people even for customer support!
Two of the most successful exchanges in the space are Coinbase and Binance. When looking at how they run as a business there are a lot of differences, but fundamentally the service they provide is very similar. As with all CEXs, they allow you to send your crypto in and then trade between other cryptos and fiat directly on the platform.
For example many CEXs allow you to send in some BTC, then perhaps sell half of it for ETH and the other half for USD. Then proceed to withdraw the ETH to a personal Ethereum account and the USD to your own dollar bank account.
The concept is simple, yet big businesses are built out of these. Its clear to imagine why when you consider that there’s a lot of trading going on and these exchanges take a small % cut out of all the transactions on their platform.
CEXs operate very much with a Web2 model where users log in with an email and password. They faciliate Web3 transactions but do so off-chain within their own internal databases, the only moment there’s any Web3 on-chain activity is on sending money in and out.
Decentralised Exchanges (DEXs)
Decentralised exchanges also share plenty of similarities to their TradFi and CEX brothers. They are marketplaces where people come to trade financial assets in the form of crypto coins and tokens. If you want to buy your favourite company’s stock you may go to the NASDAQ, and similarly if you want to buy the token for your favourite Web3 protocol, you may go to a CEX or a DEX.
Just like a CEX they are digital platforms, that are always online, run 24h a day, and are fully automated. However, beyond this point things start to change significantly.
Firstly, whereas CEXs still operate primarily like a Web2 business, a DEX sits very much within the Web3 paradigm. So unlike a CEX they are not necessarily even real companies incorporated in a country! Instead they operate entirely online and are often ran as “decentralised autonomous organisations” (DAOs) - I’ll talk more on DAOs in a future post.
DEXs are built using smart contracts to take care of the trading and trades are done entirely on-chain. Due to this they are not connected to the traditional financial world and cannot be used to trade from crypto (eg. BTC) to fiat (eg. USD), only between cryptos.
Since they use smart contracts to trade, you don’t need to lose custody of your assets either. While in CEXs you send your money over to an exchange, in a DEX you just connect your Web3 wallet and perform a trade atomically (ie. send and receive tokens within a single transaction) without ever having to hand over your crypto nor create an account.
Moreover, listing new tokens can be done by absolutely anyone with an Internet connection, there aren’t any gatekeepers since its all decentralised, which is very different to TradFi or a CEX where you’d need someone to “accept” your token listing.
Furthermore, providing tokens as liqudity for others to trade between is incentivised in a more complex way than in its centralised brothers, where basically the protocol shares some of the fees it makes from trading with the liquidity providers. This would be like if a CEX paid you for just leaving money in their platform!
The most popular DEX is hands down Uniswap. Its a special type of DEX known as an “automated market maker” (AMM) that I’ll cover next week. Another popular DEX on Ethereum is DYDX, which looks a lot more like the other CEXs since it has an order book.
So, which is better?
We’ve looked at both CEXs and DEXs. Now the next logical question is:
Which is better?
To think through this we should look at some key differences:
Usability - CEXs follow the standard Web2 models most people are used to, so they are easier in general to grasp and use. Its harder to make a mistake that will lose a lot of money since all the money is held within the platform.
DEXs can have some very intuitive and easy to use interfaces, yet they also allow you to make some pretty bold and incorrect decisions that can make you lose a lot, or all, of your money. Therefore they are not ideal for beginners, but once you know your way around Web3 they can be a lot faster and simpler than a CEX.Custody - When operating in a centralised model the centralised entity holds all the funds for everyone, in other words they act as a custodian keeping all your money. If they go under due to a hack or any other reason, then there’s very limited recourse to get that money back.
Meanwhile DEXs do not require you to give up the custody of your money. With a DEX you trust a smart contract to simply transact atomically on the spot for you and send your new tokens. If you decide to leave your money in the DEX by providing liquidity then there’s always the risk of it being hacked, but you are also rewarded for running that risk from transaction fees, which you are not in a CEX.Fiat - CEXs will often connect up to the traditional financial system in some way or another. This means that many, but not all, can provide a way to trade between fiat money (like USD) with crypto (like ETH).
Meanwhile DEXs by their very nature are fully on-chain and do not allow you to transact with fiat. DEXs are very much limited in this sense as they cannot allow you to convert in and out of crypto, only within crypto. Although there are services being created to connect directly in and out of DEXs.Know Your Customer (KYC) - There are complex regulatory frameworks in TradFi that have made their way into all finanical companies. Anti-money laundering (AML) rules around the world require all financial instutions to get personal information about their customers like name, email, ID, address, etc.
These KYC rules have made their way into CEXs, so to use them you will usually need to identify yourself. Meanwhile DEXs are not formal companies and do not operate in specific jurisdictions, so they do not have KYC measures, meaning you can use them without needing to identify yourself.Transparency and Privacy - CEXs jumble up everyone’s money together in a way that makes it hard to interpret by just looking at the blockchain. They act like mixers when tracking a person’s activity on-chain, since its hard to match an individual’s transactions in and out. Only the CEX itself knows how much money each individual KYC’d person has sitting in their own private databases.
DEXs by their nature of being fully on-chain do not mix up your funds. Its generally quite easy to trace wallets that have traded between tokens on a DEX and see where they have moved those new funds. Yet, since there’s no KYC, its hard to know the exact identity of who owns what, so its very private!
So, when answering the original question of whether a CEX or DEX is better, like with many things in life, the answer is:
It depends!
Neither is fundamentally better than the other. It all depends on the specific use-case.
That’s all for this week
Hopefully this post will be informative for anyone still trying to get their head around some of the fundamentals of the Web3 space.
Exchanges are a crucial part of Web3 and having an understanding of both CEXs and DEXs should be basic knowledge to navigate the space since they provide the ramps for you to get in and out.
Next week I’ll discuss the most popular type of DEX, namely the automated market maker, where I’ll get deeper into the likes of Uniswap that I briefly discussed above!