Decentralized exchanges have been gaining in popularity in recent years, thanks to the many advantages they offer users. However, there are still many who are unfamiliar with the various types of decentralized exchanges that exist. In this post, we'll take a look at two of the most popular types of decentralized exchanges: AMMs and CLOBs.
An AMM, or automated market maker, is a type of decentralized exchange that allows users to trade cryptocurrencies without the need for an order book. Instead, trades are executed automatically at pre-determined prices. The most popular AMM is Uniswap, which launched in 2018.
A CLOB, or central limit order book, is a type of decentralized exchange that does use an order book. Unlike a traditional centralized exchange, however, a CLOB does not require orders to be matched by a centralized entity. Instead, orders are matched peer-to-peer. The most popular CLOB is Project Serum, which was launched in 2020.
How AMMs and CLOBs Work
AMMs take a simple approach to trade cryptocurrencies: you send your cryptocurrency to the AMM contract, and you receive another cryptocurrency in return at a pre-determined price. This price is based on a formula that takes into account the amount of each cryptocurrency in the AMM pool as well as the total value locked (TVL) in the pool.
CLOBs work similarly to traditional centralized exchanges: you submit an order to buy or sell a cryptocurrency at a specific price, and when someone else submits an order with matching criteria, the trade is executed automatically. However, unlike on a traditional centralized exchange, the order book is stored on the blockchain, and orders are matched peer-to-peer.
Advantages and Disadvantages
There are several advantages and disadvantages to both AMMs and CLOBs.
One advantage of AMMs is that they don't require an order book; there is no need for liquidity providers, which can make AMMs more affordable to operate than CLOBs. Additionally, because trades are executed automatically at pre-determined prices, there is no need for users to wait for their orders to be filled—they can simply trade and receive their cryptocurrency immediately.
However, there are also some disadvantages to using an AMM. One disadvantage is that because there is no order book, users cannot see what prices other users are willing to pay or sell at—they can only see the pre-determined price set by the AMM contract. Additionally, because trades are made automatically at pre-determined prices, users may not always get the best price possible for their trade.
CLOBs do have some advantages over AMMs—namely, because they use an order book, users can see what prices other users are willing to trade at and can choose whether or not to execute their trade at those prices. Another advantage of using a CLOB is that because liquidity providers are required, users can be sure that there will always be someone available to match their trade. However, one significant disadvantage of using a CLOB over an AMM is that they tend to be more expensive to operate due to the need for liquidity providers. Additionally, because trades on a CLOB must be matched by another user before they can be executed, there may be some delays in getting your cryptocurrency — particularly if you're trying to buy or sell during off-hours.
Both AMMs and CLOBs have their own set of advantages and disadvantages. Which one you choose will ultimately depend on your needs as a trader. An AMM might be right for you if you're looking for convenience and speed. However, if you're concerned about getting the best price possible for your trade, then you might prefer using a CLOB.