What is an Automated Market Maker (AMM)?

in amm •  2 years ago 

AMM, also known as Automated Market Maker, is one of the most critical technologies for decentralized exchanges (DEX) and has proven to be one of the most influential DeFi innovations, capable of creating and running for a range of different tokens Publicly accessible on-chain liquidity.
AMM fundamentally changes the way users trade cryptocurrencies. Unlike the traditional order book trading model, both parties to AMM are interacting with the on-chain liquidity asset pool. Liquidity pools allow users to seamlessly switch between tokens on-chain in a fully decentralized and non-custodial manner. Liquidity providers, on the other hand, earn passive income through transaction fees, which are based on a percentage of their contribution to the asset pool.

  1. There are several types of AMMs: Constant Sum Market Maker (CSMM), Constant Average Market Maker (CMMM), and Advanced Mixed Constant Function Market Maker CFMM.
  2. Some of the key challenges that AMMs must overcome include impermanent losses (IL), forced multi-currency exposure, and low capital efficiency.
  3. Innovations in Bancor, Uniswap, Curve, and other projects make AMMs attractive to larger liquidity providers by improving capital efficiency, reducing volatility risk, and providing more capital allocation options.
  4. Using Chainlink oracles, Bancor aims to solve the impermanent loss (IL) problem for volatile tokens for the first time in the upcoming V2 release. By providing a more comprehensive analysis, we hope to better inform DeFi users about the challenges and innovations of AMMs, so that decentralized liquidity can reach its full potential as a fundamental component of DeFi, and the wider financial world.
    Overview of Automated Market Makers (AMMs)

软文配图.png

So-called market makers (MMs), they are entities responsible for providing liquidity to exchanges while conducting price operations. This is achieved by MM buying and selling assets from their own accounts, and their purpose is to make a profit, as their trading activity creates liquidity for other traders, which reduces slippage on block trades.
Automated market makers (AMMs) use algorithmic “bots” to simulate these price actions in electronic markets such as DeFi. While different decentralized exchange designs exist, AMM-based DEXs consistently achieve the greatest liquidity as well as the highest average daily trading volume. Currently, Constant Function Market Makers (CFMMs) are the most popular category of AMMs, and they are used to implement decentralized exchanges of digital assets. These AMM exchanges are based on a constant function that the combined asset reserve of the trading pair must remain constant. In a non-custodial AMM, user deposits for trading pairs are centralized in a smart contract that any trader can utilize to obtain token swap liquidity. Therefore, users trade based on smart contracts (collective assets) rather than directly with counterparties (such as order trades). Since 2017, three preliminary designs of constant function market makers have emerged on the market:
The first type to emerge is the Constant Product Market Maker (CPMM), which is popularized by Bancor and Uniswap. CPMM is based on the function xy=k, which determines the price range of two tokens based on the available quantity (liquidity) of each token. When the supply of token X increases, the supply of tokens for Y must decrease, and vice versa, to maintain a constant product K. When plotting this function, the result is a hyperbola, liquidity is always available, but the price gets higher and higher, approaching infinity at both ends.
The second type is Constant Sum Market Maker (CSMM), which is ideal for zero-slip trading, but it does not provide unlimited liquidity. The Constant Sum Market Maker (CSMM) follows the formula x+y=k, and when plotting it, a straight line is created. Unfortunately, this design allows arbitrageurs to drain one of the reserve assets if the off-chain reference price between tokens is not 1:1. This situation would destroy one side of the liquidity pool, force liquidity providers to suffer losses, and make traders no longer liquid. Therefore, Constant Sum Market Maker (CSMM) is not a common AMM model.
The third type is the Constant Mean Market Maker (CMMM), which allows the creation of AMMs that can own more than two tokens, weighted outside the standard 50/50 distribution. In this model, the weighted geometric mean of each reserve asset remains constant. For a liquidity pool with three assets, its formula is as follows: (x
y*z)^(⅓)=k. And with the development of AMM technology, we see the emergence of advanced mixed constant function market maker CFMM, which combines a variety of functions and parameters to achieve specific behaviors, such as adjusting the exposure of liquidity providers or reducing trades price slippage. For example, Curve AMM uses a combination of CPMM and CSMM to create denser liquidity that reduces slippage within a given trading range. Instead, it presents a hyperbola (blue line) that returns a linear rate for most trades and an index price for larger trades.
While DeFi’s first-generation AMM asset pools have experienced extensive growth over the past two years, there are still some barriers preventing their widespread adoption, including impermanent loss (IL), low capital efficiency, and multi-token risk.
Inherent problems that hinder AMM

  1. Impermanent Loss (IL) For users who provide liquidity to the AMM pool, the main and most common unknown risk they face is Impermanent Loss (IL), that is, users deposit tokens in AMM and simply deposit tokens In wallets, there is a difference in value. This loss occurs when the market price of the tokens within the AMM deviates in any direction. Since the AMM does not automatically adjust the exchange rate, arbitrageurs need to buy underpriced assets or sell overpriced assets until the price offered by the AMM matches the overall market price in the outside market. Arbitrageurs take profits out of the pockets of liquidity providers, creating losses.
    In the example above, the impermanent losses experienced in AMM were caused by changes in the market price of ETH due to trading activity on other exchanges. The AMM's internal response to such external price changes is to readjust the exchange rate in the asset pool to match the exchange rate in the external market. During the rebalancing process to swap ETH for BNT, AMM’s total reserves dropped slightly. And it is called "impermanent loss" because as soon as the relative price of the token in the AMM returns to its original value, the loss disappears and the liquidity provider keeps the fees it earns as profit . However, this is rare and means that most liquidity providers (LPs) suffer "impermanent losses" that exceed the transaction fees they incur. The graph below shows the “impermanent loss” experienced when providing liquidity to the ETH-DAI AMM pool before transaction fees are considered.
  2. Multi-token exposure AMMs usually require liquidity providers (LPs) to deposit two different tokens to provide equal liquidity on both sides of the transaction. Therefore, Liquidity Providers (LPs) cannot keep their long-term exposure on a single token, but must split their exposure by holding additional ERC20 reserve assets. Teams with large amounts of one token, or individual holders wishing to provide liquidity, are forced to purchase another asset to provide liquidity, thereby reducing their holdings in the pool’s underlying tokens and increasing their exposure to exposure to another asset.
  3. Issues with low capital efficiency AMMs have been criticized for requiring a lot of liquidity to reach the same level as order book based exchanges. This is because a significant portion of AMM liquidity is only available when the pricing curve begins to move exponentially. Therefore, most of the liquidity will never be used by rational traders due to the extreme slippage experienced. AMM liquidity providers have no control over the price points offered to traders, which has led some to refer to AMMs as "lazy liquidity", i.e. underutilized and undersupplied. At the same time, market makers on order book-based exchanges can precisely control the price points at which they want to buy or sell tokens. This results in very high capital efficiency, but at the same time requires active participation and oversight of liquidity provision.
    Several innovative design models are attempting to address the many limitations of first-generation AMMs.
  4. High capital efficiency and low slippage AMM
    As described in the previous section, the hybrid CFMM makes the exchange rate curve essentially linear and parabolic only when the liquidity pool is pushed to the limit, which enables extremely low slippage trading. Liquidity providers earn more fees (despite lower fees per trade) because capital is used more efficiently, while arbitrageurs still profit from rebalancing the pool. Curve offers low-slippage trading services between tokens with relatively stable 1:1 exchange rates, meaning its solution is primarily designed for stablecoins, although they have recently introduced a new feature for encapsulating bitcoin tokens. Support (eg renBTC and wBTC). Bancor V2 extends this low slippage model to volatile assets through a similar mechanism, dynamically updating reserve weights to maintain reserve value at a 1:1 ratio. Within the common price area, liquidity can be amplified while retaining an important incentive for arbitrageurs to rebalance the pool.
  5. Reduce impermanent losses
    Bancor's goal is to be the first to address the impermanent loss of volatile tokens in the upcoming V2 release. Bancor V2 reduces the risk of impermanent loss by using an anchored liquidity reserve, which keeps the relative value of its AMM reserves constant. Until recently, this was only done with mirror asset pairs that maintained a constant 1:1 price ratio. Bancor V2 is an asset that uses Chainlink oracles to extend this concept to variable exchange rates. With less risk for liquidity providers, such a solution would be a major breakthrough in leveraging volatile digital assets in asset management systems. By using Chainlink oracles, Bancor V2 asset pools are able to maintain accurate exchange rates even if the price of tokens varies due to changes in external market prices. The oracle provides pricing updates to adjust the weights of AMMs so that the internal exchange rate matches the external market price, rather than arbitrageurs fixing the exchange rate. The benefit of this is that arbitrageurs no longer take value away from liquidity providers in the form of impermanent losses.
    Market price changes in Bancor V2, and how it uses Chainlink oracles to eliminate impermanent losses. Instead, arbitrageurs only need to balance the token distribution in the AMM pool in response to token trades. Bancor V2 always encourages a return to balance, as liquidity providers with low-weight reserves will receive higher ROI until the pool is restored to 50/50 weight. Overall, both users and token teams can have more confidence in the liquidity of their deposits that they can profit from transaction fees without losing value due to normal market volatility.
  6. Multi-token exposure
    Uniswap V2 allows any ERC20 token to be combined with any other ERC20 token into an asset pool, eliminating the requirement for ETH for liquidity providers. This gives liquidity providers the flexibility to maintain a more diverse mix of ERC20 token positions and creates more potential pools of assets for trading to draw liquidity from. Bancor V2 enables liquidity providers to maintain exposure to a single token, eliminating bilateral liquidity deposit requirements. With liquidity reserves anchored by Chainlink oracles, users can hold exposure to any token in AMM, be it 100% ERC20 tokens of any variety, or any percentage distribution between them and BNT. This setup may appeal to token teams and investment funds that want to provide low-risk liquidity on AMMs without having to purchase additional reserve assets.
    AMM's road to innovation
    From Bancor to Uniswap to Curve and more, AMM technology is providing new primitives for instant liquidity of any digital asset. AMMs will not only trigger price action in previously illiquid markets, but will do so in a highly secure, globally accessible and non-custodial manner. AMMs have seen impressive growth so far, and innovations around improving capital efficiency, reducing impermanent losses, etc., provide the necessary infrastructure to attract larger liquidity providers from traditional markets. DeFi is poised for a massive infusion of capital as funds are more customizable and better utilized while reducing downside risk. We are excited to partner with Bancor to address some of the most important issues in AMM and look forward to continuing to innovate in the future.
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!