DeFi Financial Commodity Series: DEX Decentralized Exchange

Before going further into decentralized exchanges, let’s start with something that everyone is more familiar with: centralized exchanges.

The way we buy and sell in centralized exchanges is similar to how securities trading and spot trading happen. There is first a process by which users open their accounts. In a centralized cryptocurrency exchange, this process will happen online. First, users register on the exchange’s website using their email address or mobile number. Next, there will be a KYC (Know Your Customer) identity authentication process that has to be completed. Due to different laws in different countries and different strategies among exchanges, some exchanges allow you to perform cryptocurrency transactions right after you complete registration. However, if users want to perform transactions with fiat currency, it generally requires the completion of the KYC process. In a KYC process, users need to provide proof of identity like an ID document, proof of residence, or bank account. Users can only perform transactions once they are approved, a process which may take around three to seven days.

Most centralized exchanges nowadays provide two types of transactions: The first is currency-to-currency trading. In this type of trading users can trade the cryptocurrencies they already have on hand. They could have obtained them through mining, transactions outside the exchange, or through other means. Users fund the personal account they have created in the exchange by transferring over cryptocurrency, and then they can start trading. For example, if they are shorting BTC, then they can trade their BTC to USDT, and wait until the BTC market is better to buy it back. The second (and more common) type of transaction is fiat currency trading. In this type of transaction, users first need to have a bank account linked to the centralized exchange. Next, they must transfer funds from their bank account to the personal account they’ve created in the exchange. Using the funds in their exchange account, users can purchase BTC or ETH to start trading cryptocurrency.

The process of trading cryptocurrency relies on makers and takers. A user can place a market order to sell their cryptocurrency at a certain price, and wait for another user to take the order, or vice versa. If there are many market orders with the same price that are pending, transactions will be matched based on the rules and logic set out by the exchange.

When a user wants to make a profit, they can always withdraw the cryptocurrency or fiat currency they have to their personal wallet or bank account. However, since it is a centralized exchange model, there are two things to pay attention to:

  1. Before the withdrawal, their cryptocurrency is actually under the exchange’s custody
  2. Before the withdrawal, their fiat currency is under the custody of the exchange’s banking partner Any personal assets that they see on the exchange’s dashboard, are actually just numbers pulled from a database. When they want to withdraw their assets, their transaction has to first go through two steps:
  3. The cryptocurrency transaction has to be approved by the exchange
  4. The fiat currency has to be approved by the exchange’s banking partner. As a result, there is a limit to how fast this withdrawal can occur. For cryptocurrencies, it may take a few minutes, but for fiat currencies it may vary from a few hours to a few days.

From what we’ve described above, it can be said that centralized exchanges face a couple of issues:

  1. The KYC identity verification process can be complicated and can detract from a user’s willingness to join
  2. Customers’ assets may be stolen if there are any successful malicious attacks on the centralized exchange
  3. Due to a lack of transparency in the exchange’s matching engine, makers and takers may wonder if their orders will be fulfilled according to their preferred settings
  4. The varying amount of time needed to complete the withdrawal process. These are all unavoidable problems of a centralized exchange.

Decentralized exchanges use smart contracts to write and determine trading logic, and then distribute these contracts on the blockchain. Decentralized exchanges combine the traits of open-source programs, private keys on the blockchain, and the ability to have personal accounts. By doing this, they have solved some of the issues that centralized exchanges face:

  1. Having a private key means having an account. To start performing transactions, a user only has to download a wallet and create a private key, which in turn creates an account. This protects the user’s privacy and eliminates the cumbersome process of identity authentication.
  2. There is no need to have a central asset custodian. In a decentralized exchange, transactions take place on the blockchain and a user’s asset is in their own wallet at all times. This eliminates the risk of stolen assets in case a centralized system is attacked.
  3. The logic and process behind buying and selling are open, transparent, and can be found on the blockchain for all to see. This avoids the possibility of users questioning or second-guessing the transactions.
  4. Because the assets are in each user’s wallets, each transaction is reflected immediately in the user’s account. This eliminates some of the issues presented in centralized systems, such as lengthy review processes and delays in withdrawals.

Because of the advantages of decentralization mentioned above, in September of 2020 DEX Uniswap's single-day trading volume surpassed centralized exchange Coinbase's volume to reach $426 million USD. This record was later surpassed in March of 2021 by DEX PancakeSwap. To date, both DEXs have broken the record of 1 billion USD in single-day trading, which shows the amazing potential for DEXs. That being said, this does not mean that DEXs do not have drawbacks:

  1. The gas fee is high. Since all pending market orders are on the blockchain, any message that needs to be on the blockchain will have a ‘handling fee’. Recently, gas fees for ETH transactions have risen along with the price of ETH to reach around $30 USD in gas fees per transaction. This high transaction fee has caused many people to stop placing orders. PancakeSwap, which runs on Binance Smart Chain (and therefore not a fully decentralized blockchain), was able to take advantage of this situation. They implemented low gas fees to dig into Uniswap’s ETH market. However, due to overall high gas fees, many users are adopting a wait-and-see approach to understand how the market will play out. This further emphasizes that high gas fees is an obstacle that decentralized exchanges must resolve.
  2. Cryptocurrencies cannot be exchanged into fiat currency. Currently, decentralized exchanges are unable to directly exchange your cryptocurrency into fiat currency. Users who have this requirement will still need to use centralized exchanges.
  3. Since users must be the custodians of their assets, they must pay extra attention to the security of their wallet. If a user does not have enough knowledge on how to securely manage their wallet or private key, the likelihood of their assets being stolen could be even higher.

In conclusion, there are advantages and disadvantages to using DEXs (decentralize exchanges) or CEXs (centralized exchanges.) Regardless of which platform a user decides to use, a good practice is to always start with a product that they are familiar with. They should understand it thoroughly and avoid making large investments at the beginning to ensure the safety of their assets.

Learn more about blockchain and cryptocurrencies in our Knowledge Center.