Log In
CoinEx Academy

CoinEx Research: AMM, Leaving the Liquidity of Digital Assets More Possibilities

2023-02-26 02:37:44

As we all know, the year 2020 has witnessed the outbreak of DeFi. DEX, an indispensable part of the DeFi ecosystem, has also emerged, diverting more attention in the crypto world to the development of such projects.

In 2020, the automated market maker (AMM), an Ethereum-based DEX led by Uniswap, was introduced into the crypto world, and soon became a typical example of DEX, bringing liquidity to DeFi. As Uniswap has swept through the DeFi field, AMM, combined with the incentives provided by yield farming, has also registered explosive growth:

Compound listed the token COMP in the form of yield farming on Uniswap, which gained popularity due to its considerable profits. Many DeFi projects have then followed suit to list digital assets, such as Oikos, Balancer, and YFI that came later as an aggregator; for a time, the crypto world was immersed in a mining rush. According to relevant data, Uniswap’s transaction volume reached 15.4 billion U.S. dollars in September 2020 alone, almost $2 billion more than Coinbase’s figure.

In six months, Uniswap’s total transaction volume has exceeded 100 billion U.S. dollars. Evidently, AMM plays a vital role. So what is exactly AMM? Here are all the things you need to know.

What Are MM and AMM?

Let’s start with the market maker (MM), which is an entity that provides liquidity for the exchange and controls token prices at the same time by trading assets in its own accounts, all to make a profit. The liquidity enabled by their trading activities reduces the slippage of block trade.

Compared with MM, the automated market maker, or AMM, applies algorithmic robots to simulate those price control behaviors in electronic markets such as DeFi. Simply put, it is to calculate the buying and selling price according to the formula, so as to provide continuous quotations for the market.

AMM is one of the most critical technologies of DEX, and it has also been proven by the market to be one of the most influential DeFi innovations. It fundamentally changes the way users trade cryptocurrencies: Unlike the traditional order book transaction model, both parties of AMM transactions are interacting with the liquidity pool on the chain. The liquidity pool allows users to seamlessly switch between tokens on the chain in a fully decentralized and non-custodial manner. Liquidity providers (LP) earn passive income from transaction fees that are based on the percentage of their contribution to the liquidity pool.

AMM Risk Exposure

But AMM is not a perfect solution in the strict sense. It does have some limitations, such as low capital utilization, additional risk exposure, and the impermanent loss that is widely discussed.

The impermanent loss refers to the temporary loss caused by the fluctuation of the price in the external market when the liquidity provider provides liquidity for the fund pool under the AMM model. The impermanent loss only exists under AMM, and may disappear after the asset price recovers. However, in most cases, since asset prices cannot return to their original levels, the impermanent loss could be permanent, giving it another name, the contrastive loss. In layman’s terms, the impermanent loss is caused by the spread in the same asset’s price between different platforms.

Of course, these limitations of AMM have also prompted the latecomers, such as Uniswap and Bancor, to innovate. By improving capital efficiency, reducing volatility risks, and providing more capital allocation options, AMM becomes more attractive to larger liquidity providers. Take OneSwap for another example. Its AMM+ order book model allows users to trade at their expected prices through pending orders, effectively relieving the impermanent loss.

AMM Types

Generally speaking, AMM has the following four types: the constant sum market maker (CSMM), the constant mean market maker (CMMM), the constant function market maker (CFMM), and the constant product market maker (CPMM).

  1. The constant sum market maker (CSMM) is an ideal choice for zero-slippage trading, but it cannot provide unlimited liquidity. It follows the formula x+y=k, which will take on a straight line when drawn. If the off-chain reference price between tokens is not 1:1, CSMM allows arbitrageurs to exhaust one of the reserve assets. That will destroy the liquidity pool, forcing liquidity providers to bear losses and depriving traders of liquidity. Therefore, CSMM is not a common AMM model.
  2. The constant mean market maker (CMMM) allows users to create or own more than two tokens and is weighted outside the standard 50/50 distribution. In this model, the weighted geometric mean of each reserve asset remains unchanged. For a liquidity pool with three assets, its formula is (x*y*z)^(⅓)=k.
  3. The constant function market maker (CFMM) combines a variety of functions and parameters to achieve specific behaviors, such as adjusting the risk exposure of liquidity providers or reducing the price slippage of traders. For example, Curve AMM uses a combination of CPMM and CSMM for denser liquidity, thereby reducing slippage within a given trading range. What it presents is a hyperbolic curve (the blue line), which returns linear exchange rates to most transactions and index prices to larger transactions.
  4. The constant product market maker (CPMM) is applied by Bancor, Uniswap, and OneSwap. The function x*y=k, which it is based on, determines the price range of two tokens according to the available quantity (liquidity) of each token. When the supply of Token X increases, the supply of Token Y must decrease, and vice versa. In this way, a constant product K can be maintained. This function presents a hyperbola when drawn. Liquidity is always available, but the price will get higher and higher, with the two ends approaching infinity.

It is worth mentioning that CoinEx launched an AMM function in February 2021 to improve the liquidity of the exchange market. In terms of trading mechanism, CoinEx adopts the combination of AMM + order book, and the system automatically converts the fund pool into an order book.

Like Bancor, Uniswap, and OneSwap, CoinEx adopts the constant product market maker (CPMM) algorithm, which can provide liquidity for the market, irrespective of the size of the order book or the liquidity pool.

From Bancor through Uniswap to OneSwap, the AMM technology is providing new possibilities for the instant liquidity of any digital asset. AMM triggers price action in the previously illiquid markets in a highly secure, globally accessible, and non-custodial manner. Although AMM itself has helped democratize the supply of liquidity, the current model still needs to be constantly innovated to better uphold the spirit of DeFi. 

What Is Web3 and Why Is Web3 Important?
What Is Middleware in Web3?