All Things You Need to Know About Decentralized Exchanges (DEX)

2022-04-15 16:39:09

Since 2020, DeFi has harvested the most attention in the cryptocurrency industry. As the most important segment in the DeFi ecosystem, the decentralized exchange (DEX) has expanded rapidly since its representative product UniSwap became popular. For some traders, the DEX has developed into a substitute for the centralized exchange (CEX). According to data from The Block, DEX’s total monthly trading volume is stable at more than $100 billion, higher than the figure of some centralized exchanges.

 

Source: The Block

 

For newcomers to cryptocurrency investment, the CEX, which is more similar to the traditional brokerage trading model, may be more friendly. As we all know, the trading process consists of order placement, order matching and fund settlement, and users go through the whole process on a centralized exchange, relying on matching by the platform.

 

In contrast, in a DEX, all transactions are placed on the blockchain, and operations are automatically performed by smart contracts without third-party intervention. In this way, users do not need to worry about manipulation or rug pulls by some malicious exchanges, and can query all transactions on the chain. What’s more, most centralized exchanges currently require KYC authentication, and those who care about their privacy will prefer a DEX that does not require KYC authentication.

 

 

Compared with the CEX, the DEX innovatively introduces the AMM (Automated Market Maker) mechanism, which is hailed as one of the most important innovations in DeFi. In traditional exchanges, transactions can only be completed when there are both buyers and sellers. If a trading pair does not have sufficient liquidity or depth, the market could be prone to severe fluctuations in the case of a block trade. That’s why the CEX has introduced market makers who buy and sell assets through their own accounts to provide liquidity for the exchange, thereby reducing the slippage of transactions, safeguarding the trading process, and preventing drastic price fluctuations.

 

Totally different from the traditional order book trading model, AMM does not require direct trading between buyers and sellers. Instead, users establish a liquidity pool on the chain by themselves, and the DEX will calculate the buying and selling price according to formulas such as the Constant Product Market Maker (CPMM) model. That way, users provide continuous quotations for the market, and then traders buy or sell cryptos based on the market quotations and the liquidity pools on the chain.

 

The formula of the CPMM is X*Y=K. First, let’s look at this formula. X and Y respectively represent the number of two tokens in a certain market, and K is a constant. The system will keep the K value unchanged before and after the transaction to offer quotations and complete the transaction for traders.

 

 

For example, in the CET/USDT market, there are now 50 CET and 50 USDT in the liquidity pool. According to the above formula, the K value stands at 2,500. If a user needs to buy 1 CET, how much USDT should he pay?

 

According to the CPMM formula, the K value remains unchanged before and after the transaction, and the formula after the transaction becomes (50-1)*(50+m)=2,500, where m, which is approximately 1.02, represents the USDT that the user needs to pay. In other words, 1.02 USDT is the quotation provided by the exchange for buying 1 CET. The transaction fees are neglected for convenience of calculation.

 

This calculation process is how quotations are provided under AMM. AMM requires no manual intervention but just automatic execution by smart contracts. At the same time, the transaction fees generated in the process will be distributed to liquidity providers as a reward.

 

When providing liquidity for the DEX, users also need to care about the temporary losses in the pool due to market price fluctuations, which is often referred to as “impermanent loss”. Such loss would disappear when the crypto price returns to the price at which users provided liquidity. However, in most cases, the crypto price cannot get back to its original level, making impermanent loss inevitable, and the transaction fee reward can be regarded as a compensation for impermanent loss. If the price of a trading pair is just fluctuating slightly without sharp rises or falls, then the liquidity provider will suffer little impermanent loss and earn considerable transaction fee rewards.

 

 

DEXes in the market are getting improved and more newbie-friendly with the development of Layer 2 and public chain technology. Common DEXes on the market include UniSwap, SushiSwap, Compound, Curve, Balancer, dYdX, OneSwap, etc., all available on CoinEx Wallet.

 

 

Users only need to open CoinEx Wallet and tap [Discover], select the corresponding public chain, and then enter the DEX project they want to experience. It is believed that with the growing crypto assets and evolving crypto technology, the DEX will surely play an essential role in the crypto investment. If you’re interested, why not try it out in CoinEx Wallet: https://wallet.coinex.com/download

 

Related Articles