What is Decentralized Exchange (DEX)

In conjunction with the rapid growth of DeFi in recent years, the decentralized exchange (DEX) has also shown equally strong growth. So, what exactly is a decentralized exchange?

What is DEX

DEX, also known as a decentralized exchange, differs from the traditional centralized exchange (CEX). It has the following three features:

On-chain execution: All transactions are executed through smart contracts and have to wait for confirmation on the blockchain before they are completed. In contrast, traditional exchanges have their data recorded in a centralized database that can be rolled back at any time but does not need to wait for any confirmation on a blockchain or pay gas fees.

No need for identity verification: As long as users have a decentralized wallet account, they can directly log in to different DEXs across different blockchains for trading without complicated registration or KYC verification.

No asset custody: In decentralized exchanges, crypto assets are kept directly in the user’s wallet, and the user has absolute control over the assets, greatly reducing the risk of exchange runaways or malpractice.

The development history of DEX

The main concept of the earliest DEX development was to copy the CEX model which already has a mature market, i.e. using the market-making model of order book + aggregated trading. As all transactions needed to wait for on-chain confirmation and were limited by block confirmation time, gas fees, and others, the transaction efficiency was low and the user experience was severely lacking compared to centralized platforms.

Hence, early DEX platforms such as Bancor and Kyber had generated some market attention but found difficulty in achieving user growth.

That is, until the birth of Uniswap. Instead of trading with the traditional order book model, it opted for the AMM (Automated Market Maker) mechanism. It was the advent of AMM that allowed users to swap desired tokens directly and quickly in their wallets, thus helping the DEX to truly reach the mass market.

Uniswap – the rising unicorn DEX

In Uniswap, there is no pending order interface as with traditional CEXes. Users get the tokens they want by swapping on the DEX, with the exchange rate between tokens being determined by the liquidity pool and the AMM (automated market-making) algorithm.

The AMM algorithm uses a mathematical formula to reflect the current price of the token. Specifically, the market maker (LP) pledges each of the two coins in a pair to a liquidity pool. The ratio of these two coins in the pool determines the initial exchange rate, and when a user swaps, the price will fluctuate according to the AMM constant product formula.

The constant product formula used in the AMM


Where X and Y represent the number of two coins in the pool and K is a constant number, i.e., no matter how many times X and Y are traded between them, their multiplication product is constant.

If there are 10 ETH and 100 USDT coins in the pool and we take 1 ETH to exchange for USDT: The ETH liquidity pool increases to 11, and as the product (constant K) remains unchanged, the total amount of the USDT pool should be reduced. This reduced amount is the amount of 1 ETH that can be exchanged for USDT. However, the above example is just the theory, and the actual calculation of fees such as slippage and other transaction fees must be considered.

The Uniswap platform offers all liquidity providers (LPs) a 0.3% cut of the transaction fee as an incentive. AMM model DEXs that sprang up after Uniswap, such as Sushiswap and Pancakeswap, also offer token incentives to all LPers participating in liquidity mining, which also helps to keep the amount of locked-in funds in the DEX market growing.

Currently, Uniswap’s pool lockup has exceeded $8 billion USD, with an average daily trading volume of hundreds of millions of dollars. It has repeatedly surpassed the world’s top exchange Coinbase in terms of trading volume in 2021, and many analysts in the industry agree that the DEX is not too far away from surpassing or even replacing the CEX.

Closing thoughts

The automated market-making DEX has achieved rapid growth in users and market share in the past years with its simple user experience, liquidity mining incentives, and lower threshold for the token listing to meet more speculative market demand. However, it is a question mark as to whether it will replace traditional centralized platforms.

The AMM is not perfect and has many limitations. For example, it can only complete instant transactions, and the cost of on-chain transactions is still high compared to CEXes. Also, there may be some regulatory risks in the future due to its lack of censorship; there is still a need for both platforms. At least for now, it appears that the DEX and CEX are likely to coexist for the foreseeable future.

Disclaimer: Trading crypto involves significant risk and can result in the loss of your invested capital. The materials are not related to the provision of advice regarding investment, tax, legal, financial, accounting, consulting, or any other related services and are not recommendations to buy, sell, or hold any asset. MEXC Learn solely provides information, but not financial advice. You should ensure that you fully understand the risk involved before investing.

MEXC Academy

Share your love to MEXC
Default image
MEXC Academy