Decentralized exchanges (DEXes) have stood as pillars against centralization and tyranny where too much power is in too few hands. Rooting for this advocacy, although progressive and honorable, has its inevitable drawbacks. Compared to centralized exchanges (CEXes), DEXes are often more expensive in terms of transaction fees and slippage. Understandably, DEXes are still in their infancy and more innovations are yet to come. Different DEXes are constantly designed to attain the capacities that are usually just found in CEXes. This article shares with you the three main mechanisms of DEXes and where to find them.
AMMs have three main elements - liquidity pool, liquidity providers, and traders. Liquidity pools contain the tokens to be swapped against each other, which are provided by liquidity providers in exchange for various incentives. For example, an ETH/USDC swap would entail tokens coming from the ETH/USDC liquidity pool. Depending on the design, the mechanisms of AMMs require a constant product on the value of the liquidity pool.
The algorithm to maintain this equilibrium is also used in determining the price in a token swap - not directly upon a counterparty. This also means that it is possible to execute a token swap even when there is no party on the other side to receive the sold tokens. As long as there is liquidity, a swap is possible. The price and slippage, however, are subject to the liquidity pool size and many other factors.
This type is the most similar to CEXes. There is an order book where a user may accept an offer from the list or simply open another order. This means that trades are between two users. No counterparty means that no exchange may transpire. Unlike AMMs, there is no need for a liquidity pool, simply because the liquidity comes from the counterparty.
Traders may also use Order Book DEXes to do what they normally would do in traditional finance - leverage trading, perpetual contracts trading, and spot trading. Since these transactions are very time-sensitive, Order Book DEXes are normally in blockchains with minimal network fees like Arbitrum, Fantom and Polygon.
A DEX aggregator is a protocol that does not necessarily have its own liquidity pool, it simply serves as a search engine for all the DEXes it connects with to give the best trade or swap price for the user. There is no need for users to open multiple browser tabs to compare the prices between different exchanges. DEX aggregators do that work for them.
The quality of service provided by DEXes largely depends upon the liquidity they hold - whether it may be from liquidity pools or from users. More liquidity equates to more accurate prices with less fees & slippage, which in turn attracts more users and thus more liquidity. In short, the influx of liquidity triggers a positive flywheel.
Source: Token Engineering Academy
Looking at Token Terminal’s data, Uniswap is leading with $4.5 billion total value locked, followed very closely by Curve with $3.7 billion. The last two exchanges that have reached at least a billion locked are Pancakeswap with $2.8 billion and Balancer with $1.4 billion. These four are all AMM-centric and live on the Ethereum blockchain except for Pancakeswap, which lives on the Binance Smart Chain. With the nature of DEX aggregators not requiring on-hand liquidity to function, they won’t be seen in exchanges with the most value locked. Nevertheless, some of the most popular aggregators are 1Inch, Slingshot, KyberSwap, and Matcha.
As to trading volume, Uniswap still leads with a $1.19 billion trading volume. The succeeding contender is dYdX, a Order Book DEX on the Ethereum blockchain. Two order book DEXes have also made it to the the top ten list, which are GMX on Ethereum and Gains Network on Polygon. Perpetual Protocol is built to be an AMM with a twist - perpetual contracts trading is available. This is just one of the innovations that are yet to be seen in the DeFi space.