There are two types of cryptocurrency trading——centralized exchanges and decentralized exchanges. At present, centralized exchanges play an dominant role in the trading market. However, the development of decentralized exchanges cannot be ignored, which is commonly known as DEX. Its main feature is the exchange that provide swap services without KYC, registration and login.
As a blockchain-based exchange, DEX does not store user funds and personal information on the server, but only serves as an pool to match buyers and sellers who want to buy and sell digital assets. With the help of the matching mechanism, transactions occur directly between participants (peer-to-peer). Therefore, users of decentralized exchanges must keep their public keys, private keys, and mnemonics safe. Once they are lost, their assets cannot be recovered.
There are two types of DEX. The first is an P2P exchange based on order books, which uses a bid mode to complete transactions. The second is an exchange based on a liquidity pool, which completes transactions through automatic market makers. The algorithm behind the DEX based on the liquidity pool is called Automated Market Maker (AMM). For example, Uniswap uses an AMM mode that allows everyone to provide liquidity to the exchange to earn fees. The fees that users earn by providing liquidity are the share of trading on Uniswap.
Although DEX are complete decentralization, transparency and openness, it also has the disadvantages of low transaction efficiency, small scale, etc.
Currently, the commonly used DEXs include Uniswap, PancakeSwap, MDEX, JustSwap, SushiSwap, and so on.