Exchanges: An overview
Involvement in Web3 starts with the fundamentals of buying and selling tokens. To do this, users will engage with either a decentralized exchange (DEX) or a centralized exchange (CEX). Users looking to trade tokens will need to understand the difference between a CEX and a DEX.
What is a centralized exchange?
Centralized exchanges prompt users to deposit funds into the exchange to allow for the swap of tokens. This means that users will rely on the exchanges to custody their funds, relinquishing custody themselves. CEXs are owned and operated by a centralized private company and are subject to the rules and regulations of the jurisdiction it operates in, with the majority of CEXs requiring users to complete Know-Your-Customer (KYC/AML) processes to be able to trade on the platform.
CEXs maintain an order-book system to facilitate trading similar to traditional finance. Orders are submitted by users and recorded by the system which matches these orders to a corresponding order, thereby filling them. These orders can only be filled if there is a counter-party willing to meet the opposite side of the trade.
What is a decentralized exchange?
Decentralized exchanges allow users to custody their own tokens and trade without the need for an intermediary, using smart contracts to facilitate transactions. To interact with a DEX, a user will need a self-custody wallet such as Metamask or Rabby wallet to access decentralized applications (dApps). Decentralized exchanges reduces counterparty risk as there is no middle man required to facilitate a trade. Additionally, as DEXs operate using smart contracts, their source code is entirely transparent with transactions being permanently and immutably recorded to the blockchain.
There are two primary types of DEXs; Automated Market Makers (AMM) and order-book DEXs. Order-book DEXs maintain a ledger with buy and sell orders using smart contracts to match these orders. The most widely used type of a DEX is a AMM, which utilise liquidity pools that users can swap their tokens against with the price being determined by an algorithm based on the proportion of tokens held in the pool. These algorithms can always provide a price for the user, ensuring that swaps are always available in low liquidity markets.
DEXs typically have lower fees compared to CEXs, but will require users to pay a network fee to execute transactions. CEXs will typically charge a fee to execute transaction and may charge additional fees for deposits or withdrawals.