Ultimate magazine theme for WordPress.

Automated Market Makers (AMMs) explained

What is an automated market maker? Automated market makers (AMMs) are a type of decentralized exchange (DEX) that use algorithmic “money robots” to make it easier for individual traders to buy and sell crypto assets. Instead of trading directly with other people as with a traditional order book, users trade directly through the AMM.

Market makers are companies whose job it is to provide liquidity for a tradable asset on an exchange that might otherwise be illiquid. Market makers do this by buying and selling assets from their own accounts with the aim of making a profit, often from the spread – the gap between the highest bid and the lowest ask. Your trading activity creates liquidity and reduces the price impact of larger trades.

While there are other types of decentralized exchange (DEX) designs, AMM-based DEXs have become extremely popular, offering high liquidity for a wide range of digital tokens.

What are liquidity pools and liquidity providers?

Underpinning AMMs are liquidity pools, a crowdsourced collection of crypto assets that the AMM uses to trade with people who buy or sell any of those assets. The users who deposit their assets into the pools are known as Liquidity Providers (LPs).

Liquidity is essential for the proper functioning of AMMs. When an AMM does not have an adequate liquidity pool, it can have a major price impact as traders buy and sell assets on the DeFi AMM, leading to capital inefficiency and fickle losses. To encourage liquidity providers to deposit their crypto assets in the log, AMMs reward them with a fraction of the fees generated on the AMM, typically distributed as LP tokens. The practice of depositing assets to earn rewards is known as yield farming.

Asset prices on an AMM automatically change based on demand. For example, a liquidity pool might hold $10 million in ETH and $10 million in USDC. A trader could then trade their own $500,000 worth of USDC for ETH, which would increase the price of ETH on the AMM.

What are the different Automated Market Maker (AMM) models?

Constant Function Market Makers (CFMMs), such as Constant Product Market Maker, Constant Sum Market Maker, and Constant Mean Market Maker, are a class of first-generation AMMs made popular by protocols such as Bancor, Curve, and Uniswap. These AMM exchanges are based on a constant function that requires the combined reserve assets of the trading pairs to remain unchanged. With non-custodial AMMs, user deposits for trading pairs are pooled into a smart contract that any trader can use for token swap liquidity. Users trade against the smart contract (pooled assets) and not directly with a counterparty like order book exchanges.

Constant Product Market Maker (CPMM)

The first type of CFMM to emerge was the Constant Product Market Maker (CPMM), popularized by the first AMM-based DEX, Bancor. CPMMs are based on the function x*y=k, which sets a price range for two tokens according to the available quantities (liquidity) of each token. If the supply of token X increases, the token supply of Y must decrease and vice versa to maintain the constant product K. When plotted, the result is hyperbola, where liquidity is always available, but at increasingly higher prices, approaching infinity on both ends.

A visualization of a constant product market maker; Source: Dmitry Berenzon

Constant Sum Market Maker (CSMM)

The second type is a Constant Sum Market Maker (CSMM), which is ideal for trades with no price impact, but does not offer infinite liquidity. CSMMs follow the formula x+y=k, which produces a straight line when plotted. Unfortunately, this design allows arbitrageurs to drain one of the reserves if the off-chain reference price between the tokens is not 1:1. Such a situation would destroy one side of the liquidity pool, leaving all liquidity in just one of the assets, leaving no liquidity for traders. Because of this, CSMM is a model rarely used by AMMs.

A constant sum market maker visualizationA constant sum market maker visualization; Source: Dmitry Berenzon

Constant Mean Market Maker (CMMM)

The third type is a Constant Mean Market Maker (CMMM), which allows the creation of AMMs that have more than two tokens and can be weighted outside of the standard 50/50 distribution. In this model, the weighted geometric mean of each reserve remains constant. For a liquidity pool with three assets, the equation would be: (x*y*z)^(⅓)=k. This allows variable exposure to different assets in the pool and allows for swaps between all assets in the pool.

Problems of first generation AMM models

Many first-generation AMMs are limited by temporary losses and poor capital efficiency, impacting both liquidity providers and traders.

Ephemeral Loss

Impermanent loss is the difference in value over time between depositing tokens in an AMM and simply holding those tokens in a wallet. This loss occurs when the market-wide price of tokens diverges in any direction within an AMM. Because AMMs do not automatically adjust their exchange rates, they require an arbitrageur to buy the undervalued assets or sell the overvalued assets until the prices offered by the AMM match the market-wide price in external markets. The profit made by arbitrageurs is siphoned out of the pockets of the liquidity providers, resulting in a loss.

Low capital efficiency

Traditional AMM designs require large amounts of liquidity to achieve the same price action as an order-book based exchange. This is because a significant portion of AMM liquidity is only available when the price curve starts to turn exponentially. Therefore, most liquidity is never used by rational traders due to the extreme price impact.

In this situation, AMM liquidity providers have no control over what price points are offered to traders, leading some people to refer to AMMs as “lazy liquidity” that is underutilized and poorly supplied. Meanwhile, market makers on order book exchanges can control the exact price points at which they want to buy and sell tokens. This leads to a very high level of capital efficiency, but with the disadvantage that active participation and monitoring of the provision of liquidity are required.

Improving AMM models with hybrid, dynamic, proactive and virtual solutions

The above limitations are overcome by innovative projects with new design patterns, such as: B. Hybrid Automated Market Makers, Dynamic Automated Market Makers, Proactive Market Makers and Virtual Automated Market Makers.

Hybrid CFMMs

As AMM-based liquidity has evolved, we have seen the emergence of advanced hybrid CFMMs that combine multiple features and parameters to achieve specific behaviors, such as: B. Adjusted risk for liquidity providers or reduced price impact for traders.

For example, Curve AMMs – known as the stableswap invariant – combine both a CPMM and a CSMM using an advanced formula to create denser pockets of liquidity that reduce the price impact within a given trading range. The result is a hyperbola (blue line) that returns a linear exchange rate for large parts of the price curve and exponential prices as exchange rates approach the outer limits.

Curves White Paper‌‌Source: Curve whitepaper‌‌

Hybrid CFMMs enable trades with extremely low price impact by using an exchange rate curve that is mostly linear and only becomes parabolic when the liquidity pool reaches its limit. Liquidity providers earn more in fees (albeit at a lower fee per trade) because capital is deployed more efficiently, while arbitrageurs still benefit from pool rebalancing.

Curve offers low-price impact swaps between tokens that have a relatively stable 1:1 exchange rate. This means that his solution is predominantly designed for stablecoins. However, Curve also recently introduced support for more volatile token pairs with similarly concentrated liquidity.

Dynamic Automated Market Maker (DAMM)

Using a DAMM (Dynamic Automated Market Maker) model, Sigmadex leverages Chainlink price feeds and implied volatility to help dynamically allocate liquidity along the price curve. By incorporating multiple dynamic variables into its algorithm, it can create a more robust market maker that adapts to changing market conditions. During periods of low volatility, Sigmadex can concentrate liquidity near the market price and increase capital efficiency, and then expand it during periods of high volatility to protect traders from impairment.

Proactive Market Maker (PMM)

To increase the liquidity of its protocol, DODO uses a model known as Proactive Market Maker (PMM), which mimics the human market-making behavior of a traditional central limit order book. The protocol uses accurate global market prices from Chainlink Price Feeds to proactively shift each asset’s price curve in response to market changes, increasing liquidity near the current market price. Ultimately, this allows for more efficient trading and reduces impairment overhead for liquidity providers.

Virtual Automated Market Makers (vAMM)

Virtual Automated Market Makers (vAMMs) such as the Perpetual Protocol minimize price impact, mitigate fickle losses and enable single token exposure to synthetic assets. vAMMs use the same x*y=k constant product formula as CPMMs, but instead of relying on a liquidity pool, traders post collateral to a smart contract. By trading synthetic assets instead of the underlying asset, users can profit from the price movements of a variety of crypto assets in a highly efficient way. However, users holding an open position in a synthetic asset run the risk of having their collateral liquidated if the price moves against them.

Chainlink oracles drive AMM innovation

Chainlink price feeds already underpin much of the DeFi economy and play a key role in helping AMMs accurately price assets and increase the liquidity available to traders. Now, Chainlink automation is starting to play an important role by enabling decentralized and highly secure automation of smart contracts. For example, Bancor 3 integrated Chainlink Automation to support its auto-compounding feature.

From Bancor to Sigmadex to DODO and beyond, innovative AMMs powered by Chainlink trusted-minimized services are offering new models for instant access to liquidity for any digital asset. AMMs powered by Chainlink not only help generate price action in previously illiquid markets, but they do so in a highly secure, globally accessible and non-custodial manner.

Learn Crypto Trading, Yield Farms, Income strategies and more at CrytoAnswers
https://nov.link/cryptoanswers

Comments are closed.

%d bloggers like this: