Automated market makers (AMMs) are a type of decentralized exchange mechanism that uses a pricing algorithm to allow digital assets to be traded without permission and automatically, using liquidity pools rather than buyers and sellers.
These AMMs are built generally to work in the Ethereum blockchain, as part of a decentralized finance (DeFi) ecosystem. The technology is decentralized, is developed to be always available for trading, and does not rely on traditional interactions between buyers and sellers.
In this traditional scheme, when liquidity is low, slippage can occur. Slippage is when the price of an asset at the point of executing a trade shifts considerably before the trade is completed, which often occurs in volatile terrains and trades. To achieve a fluid trading system, centralized exchanges rely on professional traders or financial institutions to provide liquidity for any trading pair. To achieve this, entities create bid-ask orders in multiple to match orders of retail traders, to allow the exchanges to ensure their counterparties to make pairs available for trades. In this system, liquidity providers take up the role of market makers, and market makers facilitate the processes required to provide liquidity for trading pairs.
The automated market maker (AMM) works to solve some of the problems with centralized exchanges. Often used in decentralized exchanges (DEXs), AMMs allow DEXs to replace order-matching systems or custodial infrastructures with autonomous protocols. The protocols use smart contracts to define the price of digital assets and to provide liquidity. Using an AMM, an individual trader is not trading against counterparties; ratherinstead, they are trading against the liquidity locked inside smart contracts. This means the following, in an AMM:
The first type of CFMM to emerge was the constant product market maker (CPMM), which was popularized by what some consider to be the first AMM-based decentralized exchange (DEX), Bancor. CPMMs are based on the function x*y=k, which establishes a range of prices for two tokens according to the available quantities (liquidity) of a given token. According to the formula, when the supply of token x increases, the supply of token y must decrease, and vice versa, in order to maintain the constant k. When plotted, the result is a hyperbola where liquidity is always available but at increasingly higher prices, which can approach infinity at both ends.
As AMM-based liquidity has developed, therenewer types of AMMs have emerged newer types of AMMs, such as advanced hybrid CFMMs, which combine multiple functions and parameters to achieve specific behaviors, such as adjusted risk exposure for liquidity providers or reduced price impact for traders. For example, Curve AMMs, also known as stableswap invariants, combine both a CPMM and CSMM using an advanced formula to create denser pockets of liquidity to bring price impacts to a given range of trades. The result is a hyperbola that returns a linear exchange rate for large parts of the price curve and exponential prices when exchange rates near the outer bounds.
A dynamic automated market maker (DAMM) model can use price feeds (oracles) and implied volatility to help dynamically distribute liquidity along the price curve. By incorporating multiple dynamic variables into its algorithm, which allows the model tocan create a more robust market maker adapting into its algorithm, which creates a more robust market maker capable of adapting to changing market conditions. During periods of low volatility, the model can concentrate liquidity near the market price and increase capital efficiency, which can further expand during periods of high volatility to help protect traders from impairment loss.
Aiming to increase liquidity in protocols, another model has been developed called the proactive market maker (PMM), thatwhich can mimic the human market-making behavior of a traditional central limit order book. The protocol uses accurate market prices from an oracle to proactively move the price curve of an asset in response to market changes, increasing the liquidity near the current market price, which works to facilitate efficient trading and reduces the impairment loss for liquidity providers.
Virtual automated market makers (vAMMs) are developed to minimize price impact, mitigate impermanent loss, and enable single token exposure for synthetic assets. The vAMMs use the same x*y=k constant product formula as CPMMs, but rather than relying on a liquidity pool, traders deposit collateral to a smart contract and trade synthetic assets ratherinstead thanof the underlying asset, to give users exposure to the price movement of a variety of cryptocurrency assets in an efficient manner. However, users holding an open position in a synthetic asset are at risk of having their collateral liquidated if the price moves against them.
To make sure the ratio of assets in liquidity pools remains as balanced as possible and to eliminate discrepancies in the pricing of pooled assets, AMMs use preset mathematical equations. One of the most common such equations is x*y=k. This equation sets the mathematical relationship between the assets in the liquidity pools. In this equation, x represents the value of Asset A, and y represents the value of Asset B, and k remains constant. This means the price of Asset A multiplied againstby the price of Asset B must always equal the same number.
This means when orders are placed in AMMs, and a sizeable amount of token is removed or added to a pool, it can create discrepancies tocan appearbe created between the asset's price in the pool and the market price—which is reflected in the price the same pair is traded at on multiple exchanges—making the price of Asset A different than what the rest of the market shows it as, either higher or lower, depending on if a lot of Asset A has either been added to or taken from the liquidity pool. This effect is known as slippage, which can occur when the liquidity is not great enough in the liquidity pool to cover the large trades. AMMs can be susceptible to slippage because the price-adjusting algorithms are based on the ratio between the assets in a liquidity pool.
For the liquidity pools in the AMMs to work, the pools require liquidity providers (LPs). Pools that are not sufficiently funded are far more susceptible to slippages, and in order to mitigate slippages, AMMs tend to encourage users to deposit appropriate digital assets in liquidity pools so users can trade against these funds. In order to incentivize users to deposit their digital assets in a liquidity pool, a fraction of fees paid on transactions executed on the pool are provided to the liquidity providers.
This often means if an LPsLP's deposit represents 1 percent of the liquidity locked in a pool, the LP will receive an LP token that represents 1 percent of the accrued transaction fees of that pool. When an LP wishes to exit from a pool, they redeem the LP token and receive their share of transaction fees. Further, some AMMs issue governance tokens to LPs and traders, which allows the LPs to have voting rights on issues related to the governance and development of the AMM protocol.
Apart from the incentives offered to LPs to incentivize them to stake their digital assets in liquidity pools, LPs can also capitalize on yield farming opportunities that allow them to increase their earnings. In this case, the LP deposits the appropriate ratio of digital assets in a liquidity pool on an AMM protocol, and once the deposit has been confirmed, the LP receives theirits tokens, which in some cases can be deposited into a separate lending protocol to earn extra interest. In this way, LPs can maximize earnings in DeFi protocols, although the user will have to withdraw the LP token before they can withdraw their funds from the initial liquidity pool.
One of the risks associated with liquidity pools is impermanent loss. This occurs when price ratios of pooled assets fluctuate, and an LP will automatically incur losses when the price ratio of a given pooled asset deviates from the price at which the funds were deposited. The higher the shift in price, the higher the loss. This is common in pools that contain volatile digital assets. However, it is called impermanent loss because the probability is high that the price ratio will revert. The loss only becomes permanent when the LP withdraws the said funds before the price ratio reverts. Further, some potential earnings from partaking in a liquidity pool can sometimes cover impermanent losses when, or if, they become permanent.
One trend in AMM development has revolved around concentrated liquidity. This feature is designed specifically to make the price-adjusting mechanism more efficient, minimize slippage, and allow liquidity providers to earn higher fees. Concentrated liquidity is developed to allow LPs to allocate assets to specific price ranges, which means, by combining multiple concentrated liquidity positions, LPs are able to create individual price curves whichthat are customized to their preference. This also allows LPs to earn trading fees against the liquidity provided at specific ranges than the total pool liquidity.
Another concern with AMMs, despite their comparative advantages over centralized exchanges, such as greater security and opportunities for community building, is the phenomenon of front runningfront-running. Front runningFront-running occurs when one user places a similar trade as a prospective buyer but sells it immediately after. Because the transactions are public, and the buyer has to wait until they can get added to the blockchain, others can view the buy and place bids. Front runners are not trying to execute a trade; rather, they are simply identifying transactions and bidding on the transaction to drive the price up so that they can sell back and earn a profit. And by "sandwiching" the original bid from a buyer with a new bid, the speculator is capable of extracting value from the transaction. Often, in practice, miners are the catalysts behind front runningfront-running, which led to the term "miner extractable value" (MEV), which refers to the rents a third party can extract from the original transaction. Also known as sandwich attacks, these have been largely automated and implemented by bots, which account for the bulk of MEV.
Some concerns around AMMs, such as front runningfront-running, occur because pending transactions are generally visible, which allows a bot to detect it, pay a higher gas fee, and miners can impact market pricing. One way to avoid this is to hide the transactions, use zero-knowledge proofs and other privacy-preserving solutions, which can become increasingly popular because they are thought to minimize some attacks, such as front runningfront-running, by disguising the size and time of transactions that are submitted and verified.
Another attempt to remove the AMM from the reliance on external liquidity providers has seen some DEX developers grow their own treasury of protocol-owned liquidity, which can codify buy-pressure through the inflation of the assets that it supports. Instead of giving all of the trading fees to the liquidity providers, the DAO controls the revenue.
Automated market makers (AMMs) are a type of decentralized exchange mechanism whichthat uses a pricing algorithm to allow digital assets to be traded without permission and automatically, using liquidity pools rather than buyers and sellers.
An automated market maker (AMM) is a type of decentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. Pricing information often comes from multiple APIs to alwaysconsistently provide the most accurate cost. Also anyoneAnyone can become a liquidity provider for automated market makers and receive a part of trading commissions. AMMs allow digital assets to be traded without permission and automatically by using liquidity pools rather than a traditional market of buyers and sellers.
A market maker facilitates the process of providing liquidity for trading pairs and areis used on centralized exchanges in both traditional and blockchain-based exchanges. A centralized exchange oversees the operations of traders and providers in an automated system to ensure trading orders are matched accordingly, such that when Trader A wants to purchase an asset at a given price or exchange rate, it is the centralized exchange's job to match Trader A with Trader B over an agreed price and to make the process as seamless as possible.
The automated market maker (AMM) works to solve some of the problems with centralized exchanges. Often used in decentralized exchanges (DEXs), AMMs allow DEXs to replace order matchingorder-matching systems or custodial infrastructures with autonomous protocols. The protocols use smart contracts to define the price of digital assets and to provide liquidity. Using an AMM, andan individual trader is not trading against counterparties, but,; rather, they are trading against the liquidity locked inside smart contracts. This means the following, in an AMM:
There are several differentSeveral early models of constant function market makers (CFMMs), such as constant product market makers, constant sum market makers, and constant mean market makers, are a class of first-generation AMMs popularized by protocols such as Bancor, Curve, and Uniswap. These AMM exchanges are based on a constant function requriingrequiring the combined asset reserves of traidingtrading pairs to remain unchanged. In non-custodial AMMs, user deposits for trading pairs pooled within a smart contract any trader can use for token swap liquidity. In these automated market maker models, users trade against the smart contract and pooled assets as opposed to directly with a counterpart. However, these early constant function market makers have several complications and limitations, explored below, which have led to some projects and developers to design new patterns, such as hybrid market makers, dynamic automated market makers, proactive market makers, and virtual market makers.
The first type of CFMM to emerge was the constant product makretmarket maker (CPMM), which was popularized by what some consider to be the first AMM-based decentralized exchange (DEX), Bancor. CPMMs are based on the function x*y=k, which establishes a range of prices for two tokens according to the available quantities (liquidity) of a given token. According to the formula, when the supply of token x increases, the supply of token y must decrease, and vice versa, in order to maintain the constant k. When polottedplotted, the result is a hyperbola where liquidity is always available but at increasingly higher prices, which can approach infinity at both ends.
Another type of CFMM is the constant sum market maker (CSMM), which is ideal for zero-price-impact trades but does not provide infinite liquidity. CSMMs follow the formula x+y=k, which creates a straight line when plotted. The CSMM design does allow arbitrageurs to drainedrain one of the reserves if the off-chain reference price between the tokens is not 1:1, and such a situtationsituation destroys one side of the liquidity pool and leaves the liquidity residing in one of the assets and therefore leaving no more liquidity for traders. Due to these concerns, the CSMM model is rarely used by AMMs.
Another major type of first-generation AMM modelsmodel is the constant mean market maker (CMMM), which enables the creation of AMMs that have more than two tokens and can be weighted outside of the standard fifty-fifty distribution. This model has the weighted geometric mean of each reserve remaining constant, which means, for a liquidity pool with three assets, the equation qouldcould be (x*y*z)1/3=k. This formula allows for variable exposure to different assets in a pool and enables swaps between any of the pool's assets.
As AMM-based liquidity has developed, there have emerged newer types of AMMs, such as advanced hybrid CFMMs, which combine multiple functions and paramtersparameters to achieve specific behaviors, such as adjusted risk exposure for liquidity providers or reduced price impact for traders. For example, Curve AMMs, also known as stableswap invariants, combine both a CPMM and CSMM using an advanced formula to create denser pockets of liquidity to bring price impacts to a given range of trades. The result is a hyperbola that returns a linear exchagneexchange rate for large parts of the price curve and exponential prices when exchange rates near the outer bounds.
Hybrid CFMMs are intended to enable low pricelow-price impact trades by using an exchange rate curve that is mostly linear and becomes parabolic only when the liquidity pool is pushed to its limits. Further, liquidity providers can earn more in fees, although often on a lower fee-per-trade basis, becuasebecause the capital of a liquidity pool is used more efficiently, while arbitrage traders (arbitraguersarbitrageurs) can still profit from rebalancing the pool. The solution, based on its balancing, is predominantly designed for stablecoins, but has also been used to support volatile token pairs with similarly concentrated liquidity.
A dynamic automated market maker (DAMM) model can use price feeds (oracles) and implied volatility to help dynamically distribute liquidity along the price curve. By incorporating multiple dynamic variables into its algorithm, which allows the model to create a more robust market maker adapting into its algorithm, which creates a more robust market maker capable of adapting to changing market conditions. During periods of low volatility, the model can concentrate liquidity near the market price and increase capital efficiency, which can further expand during periods of high volatility to help protect traders forfrom impairment loss.
Virtual automated market makers (vAMMs) are developed to minimize price impact, mitigate impermanent loss, and enable single token exposure for synthetic assets. The vAMMs use the same x*y=k constant product formula as CPMMs, but rather than relying on a liquidity pool, traders deposit collateral to a smart contract and trade synthetic assets rather than the underlying asset, to give users exposure to the price moevementmovement of a variety of cryptocurrency assets in an efficient manner. However, users holding an open position in a synthetic asset are at risk of having their collateral liquidated if the price moves against them.
To make sure the ratio of assets in liquidity pools remains as balanced as possible and to eliminate discrepenciesdiscrepancies in the pricing of pooled assets, AMMs use preset mathematical equations. One of the most common such equationequations is x*y=k. This equation sets the mathematical relationship between the assets in the liquidity pools. In this equation, x represents the value of Asset A, and y represents the value of Asset B, and k remains constant. WhichThis means the price of Asset A multiplied against the price of Asset B must always equal the same number.
This means when orders are placed in AMMs, and a sizeable amount of token is removed or added to a pool, it can create discrepenciesdiscrepancies to appear between the asset's price in the pool and the market price - whichprice—which is reflected in the price the same pair is traded at on multiple exchanges - makingexchanges—making the price of Asset A be different than what the rest of the market shows it as, either higher or lower, depending on if a lot of Asset A has either been added to or taken from the liquidity pool. This effect is known as slippage, which can occur when the liquidity is not great enough in the liquidity pool to cover the large trades. AMMs can be susceptible to slippage becauasebecause the price-adjusting algorithms are based on the ratio between the assets in a liquidity pool.
When this occurs, it creates an arbitrage opportunity. Arbitrage trading is a strategy whichthat involves finding differences between the price of an asset on multiple exchanges, buying it on the platform where isit is slightly cheaper and selling it on the platform where it is slightly higher. With AMMs, arbitrage traders are financially incentivized to find assets trading a discount in a liquidity pool and buy them up until the asset's price returns to its market price.
This often means if an LPs deposit represents 1 percent of the liquidity locked in a pool the LP will receive an LP token whichthat represents 1 percent of the accrued transaction fees of that pool. When an LP wishes to exit from a pool, they redeem the LP token and receive their share of transaction fees. Further, some AMMs issue governance tokens to LPs and traders, which allows the LPs to have voting rights on issues related to the governance and development of the AMM protocol.
One trend in AMM development has revolved around concentrated liquidity. This feature is designed specifically to make the price-adjusting mechanism more efficient, minimize slippage, and allow liquidity providers to earn higher fees. Concentrated liquidity is developed to allow LPs to allocate assets to specific price ranges, which means, by combining multiple concentrated liquidity positions, LPs are able to create individual price curves which are customized to their preference. This also allows LPs to earn trading fees against the liquidity provided at specific ranges than the total pool liquidity.
Traditional AMM designs require large amounts of liquidity to achieve a similar level of price impact as a book-based exchange. This is due to the substantial portion of AMM liquidity that is only made available when the pricing curve begins to turn exponential. And, becauseBecause of this, most liquidity will not be used by rational traders due to the price impact the trader would experience during a trade using that liquidity. Further, AMM'sAMMs and liquidity providers do not have control over which price points are offered to traders, due to their algorithmic pricing. This has leadled some people to refer to AMMs as "lazy liquidity" that is underutilized and poorly previsionedprovisioned. However, traditional market makers based on order books allow exchanges to control the price points at which they want to buy and sell tokens, leading to higher capital efficiency, with the trade-off of requiring active participation and oversight of liquidity provisioning.
Another concern with AMMs, despite their comparative advantages over centralized exchanges such as greater security and opportunities for community buuildingbuilding, is the phenomenon of front running. FrtonFront running occurs when one user places a similar trade as a perspectiveprospective buyer, but sells it immediately after. Because the transactionsatransactions reare public, and the buyer has to wait until they can get added to the blockchain, others can view the buy and place bids. Front runners are not trying to execute a trade,; rather, they are simply idetnifyingidentifying transactions and bidding on the transaction to drive the price up so that they can sell back and earn a profit. And by "sandwiching" the original bid from a buyer with a new bid, the speculator is capable of extracting value from the transaction. Often, in practice, miners are the catalysts behind front running, which led to the term "miner extractable value" (MEV), which refers to the rents a third party can extract from the original transaction. Also known as sandwich attacks, these have been largely automated and implemented by bots, which account for the bulk of MEV.
In a paper, Andreas Park, a professor of finance at the University of Toronto, the professor suggested that the intrinsic transparency of blockchain operations createcreates a challenge in which an attacker may "sandwich" any trade by submitting a transaction that can be processed before the original one, and that the attack reverses after. Further, these attacks, according to professor Park, can be driven by an incentive problem inherent to second-generation blockchains, in which validators may not have sufficiently strong incentives to monitor private pools because it reduces their MEV, and the execution risk for users joining private pools increases.
AMMs as a mechanism have enabled peer-to-peer trading because they can instantly settle transactions after they are confirmed and included on the blockchain, and the mechanism allows any user to contribute liquidity and any buyer to trade tokens. However, AMMs have relied on expectations of future growth to drive their valuations; the revenue from transaction fees in AMMs is relatively small and linked to the liquidity providers rather than the exchange. This means, especially as APRs from trade fees might be low in AMMs, DEXs rely on governance token offerings for greater incentives, requiring a high price valuation to onboard and retain liquidity providers. These providers can often be "mercenary capital," known as such for going where short-run returns are higher. Further, anomolousanomalous and surprising events, known as black swan events, and market volatility can further damage AMMs, sometimes beyond repair. These events can lead to a liquidity freeze. However, in partpartially because AMMs do not produce revenue as a function of itstheir business model, it makesthey AMMare almost a public good in the DeFi community, rather than a profit driver.
Some concerns around AMMs, such as front running, occur because pending transactions are generally visible, which allows a bot to detect it, pay a higher gas fee, and miners can impact market pricing. One way to avoid this is to hide the transactions, use zero-knowledge proofs, and other privacy preservingprivacy-preserving solutions, which can become increasingly popular because they are thought to minimize some attakcsattacks, such as front running, by disguising the size and time of transactions that are submitted and verified.
Another attempt to remove the AMM from the reliance on external liquidity providers has seen some DEX developers grow their own treasury of protocol ownedprotocol-owned liquidity, which can codify buy-pressure through the inflation of the assets that it supports. Instead of giving all of the trading fees to the liquidity providers, the DAO controls the revenue
One challenge to AMMs remains, and that is, despite their necessity to the expansion of the DeFi community, but there have been concernedconcerns that there may be a lack of sustainability for DEXs and AMMs in the long run because there is not enough demand for different tokens. The value of the token in any AMM comes down to the value of the community, which can require a core team to lead and direct traffic, but need to apply best practices from a business perspective in order to create sustainability and find the scalability organizations require to succeed.
AMM is a type of decentralized exchange
Automated market makers (AMMs) are a type of decentralized exchange mechanism which uses a pricing algorithm to allow digital assets to be traded without permission and automatically using liquidity pools rather than buyers and sellers.
An automated market maker (AMM) is a type of decentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. Pricing information often comes from multiple APIs to always provide the most accurate cost. Also anyone can become a liquidity provider for automated market makers and receive a part of trading commissions. AMMs allow digital assets to be traded without permission and automatically by using liquidity pools rather than a traditional market of buyers and sellers.
These AMMs are built generally to work in the Ethereum blockchain, as part of a decentralized finance (DeFi) ecosystem. The technology is decentralized, is developed to be always available for trading, and does not rely on traditional interactions between buyers and sellers.
A market maker facilitates the process of providing liquidity for trading pairs and are used on centralized exchanges in both traditional and blockchain-based exchanges. A centralized exchange oversees the operations of traders and providers in an automated system to ensure trading orders are matched accordingly, such that when Trader A wants to purchase an asset at a given price or exchange rate, it is the centralized exchange's job to match Trader A with Trader B over an agreed price and to make the process as seamless as possible.
In this traditional scheme, when liquidity is low, slippage can occur. Slippage is when the price of an asset at the point of executing a trade shifts considerably before the trade is completed, which often occurs in volatile terrains and trades. To achieve a fluid trading system, centralized exchanges rely on professional traders or financial institutions to provide liquidity for any trading pair. To achieve this, entities create bid-ask orders in multiple to match orders of retail traders, to allow the exchanges to ensure their counterparties to make pairs available for trades. In this system, liquidity providers take up the role of market makers, and market makers facilitate the processes required to provide liquidity for trading pairs.
The automated market maker (AMM) works to solve some of the problems with centralized exchanges. Often used in decentralized exchanges (DEXs), AMMs allow DEXs to replace order matching systems or custodial infrastructures with autonomous protocols. The protocols use smart contracts to define the price of digital assets and to provide liquidity. Using an AMM, and individual trader is not trading against counterparties, but, rather, they are trading against the liquidity locked inside smart contracts. This means, in an AMM:
There are several different early models of constant function market makers (CFMMs), such as constant product market makers, constant sum market makers, and constant mean market makers, are a class of first-generation AMMs popularized by protocols such as Bancor, Curve, and Uniswap. These AMM exchanges are based on a constant function requriing the combined asset reserves of traiding pairs to remain unchanged. In non-custodial AMMs, user deposits for trading pairs pooled within a smart contract any trader can use for token swap liquidity. In these automated market maker models, users trade against the smart contract and pooled assets as opposed to directly with a counterpart. However, these early constant function market makers have several complications and limitations, explored below, which have led to some projects and developers design new patterns, such as hybrid market makers, dynamic automated market makers, proactive market makers, and virtual market makers.
The first type of CFMM to emerge was the constant product makret maker (CPMM), which was popularized by what some consider to the first AMM-based decentralized exchange (DEX), Bancor. CPMMs are based on the function x*y=k, which establishes a range of prices for two tokens according to the available quantities (liquidity) of a given token. According to the formula, when the supply of token x increases, the supply of token y must decrease, and vice versa, in order to maintain the constant k. When polotted, the result is a hyperbola where liquidity is always available but at increasingly higher prices, which can approach infinity at both ends.
Another type of CFMM is the constant sum market maker (CSMM), which is ideal for zero-price-impact trades but does not provide infinite liquidity. CSMMs follow the formula x+y=k, which creates a straight line when plotted. The CSMM design does allow arbitrageurs to draine one of the reserves if the off-chain reference price between the tokens is not 1:1, and such a situtation destroys one side of the liquidity pool and leaves the liquidity residing in one of the assets and therefore leaving no more liquidity for traders. Due to these concerns, the CSMM model is rarely used by AMMs.
Another major type of first-generation AMM models is the constant mean market maker (CMMM) which enables the creation of AMMs that have more than two tokens and can be weighted outside of the standard fifty-fifty distribution. This model has the weighted geometric mean of each reserve remaining constant, which means, for a liquidity pool with three assets, the equation qould be (x*y*z)1/3=k. This formula allows for variable exposure to different assets in a pool and enables swaps between any of the pool's assets.
As AMM-based liquidity has developed, there have emerged newer types of AMMs, such as advanced hybrid CFMMs which combine multiple functions and paramters to achieve specific behaviors, such as adjusted risk exposure for liquidity providers or reduced price impact for traders. For example, Curve AMMs, also known as stableswap invariants, combine both a CPMM and CSMM using an advanced formula to create denser pockets of liquidity to bring price impacts to a given range of trades. The result is a hyperbola that returns a linear exchagne rate for large parts of the price curve and exponential prices when exchange rates near the outer bounds.
Hybrid CFMMs are intended to enable low price impact trades by using an exchange rate curve that is mostly linear and becomes parabolic only when the liquidity pool is pushed to its limits. Further, liquidity providers can earn more in fees, although often on a lower fee-per-trade basis, becuase the capital of a liquidity pool is used more efficiently, while arbitrage traders (arbitraguers) can still profit from rebalancing the pool. The solution, based on its balancing, is predominantly designed for stablecoins, but has also been used to support volatile token pairs with similarly concentrated liquidity.
A dynamic automated market maker (DAMM) model can use price feeds (oracles) and implied volatility to help dynamically distribute liquidity along the price curve. By incorporating multiple dynamic variables into its algorithm, which allows the model to create a more robust market maker adapting into its algorithm, which creates a more robust market maker capable of adapting to changing market conditions. During periods of low volatility, the model can concentrate liquidity near the market price and increase capital efficiency, which can further expand during periods of high volatility to help protect traders for impairment loss.
Aiming to increase liquidity in protocols, another model has been developed called the proactive market maker (PMM) that can mimic the human market-making behavior of a traditional central limit order book. The protocol uses accurate market prices from an oracle to proactively move the price curve of an asset in response to market changes, increasing the liquidity near the current market price, which works to facilitate efficient trading and reduces the impairment loss for liquidity providers.
Virtual automated market makers (vAMMs) are developed to minimize price impact, mitigate impermanent loss, and enable single token exposure for synthetic assets. The vAMMs use the same x*y=k constant product formula as CPMMs, but rather than relying on a liquidity pool, traders deposit collateral to a smart contract and trade synthetic assets rather than the underlying asset, to give users exposure to the price moevement of a variety of cryptocurrency assets in an efficient manner. However, users holding an open position in a synthetic asset are at risk of having their collateral liquidated if the price moves against them.
To make sure the ratio of assets in liquidity pools remains as balanced as possible and to eliminate discrepencies in the pricing of pooled assets, AMMs use preset mathematical equations. One of the most common such equation is x*y=k. This equation sets the mathematical relationship between the assets in the liquidity pools. In this equation, x represents the value of Asset A, and y represents the value of Asset B, and k remains constant. Which means the price of Asset A multiplied against the price of Asset B must always equal the same number.
This means when orders are placed in AMMs, and a sizeable amount of token is removed or added to a pool, it can create discrepencies to appear between the asset's price in the pool and the market price - which is reflected in the price the same pair is traded at on multiple exchanges - making the price of Asset A be different than what the rest of the market shows it as, either higher or lower, depending on if a lot of Asset A has either been added to or taken from the liquidity pool. This effect is known as slippage, which can occur when the liquidity is not great enough in the liquidity pool to cover the large trades. AMMs can be susceptible to slippage becauase the price-adjusting algorithms are based on the ratio between the assets in a liquidity pool.
When this occurs, it creates an arbitrage opportunity. Arbitrage trading is a strategy which involves finding differences between the price of an asset on multiple exchanges, buying it on the platform where is is slightly cheaper and selling it on the platform where it is slightly higher. With AMMs, arbitrage traders are financially incentivized to find assets trading a discount in a liquidity pool and buy them up until the asset's price returns to its market price.
For the liquidity pools in the AMMs to work, the pools require liquidity providers (LPs). Pools that are not sufficiently funded are far more susceptible to slippages, and in order to mitigate slippages AMMs tend to encourage users to deposit appropriate digital assets in liquidity pools so users can trade against these funds. In order to incentivize users to deposit their digital assets in a liquidity pool, a fraction of fees paid on transactions executed on the pool are provided to the liquidity providers.
This often means if an LPs deposit represents 1 percent of the liquidity locked in a pool the LP will receive an LP token which represents 1 percent of the accrued transaction fees of that pool. When an LP wishes to exit from a pool, they redeem the LP token and receive their share of transaction fees. Further, some AMMs issue governance tokens to LPs and traders, which allows the LPs to have voting rights on issues related to the governance and development of the AMM protocol.
Apart from the incentives offered to LPs to incentivize them to stake their digital assets in liquidity pools, LPs can also capitalize on yield farming opportunities that allow them to increase their earnings. In this case, the LP deposits the appropriate ratio of digital assets in a liquidity pool on an AMM protocol, and once the deposit has been confirmed, the LP receives their tokens, which in some cases can be deposited into a separate lending protocol to earn extra interest. In this way, LPs can maximize earnings in DeFi protocols, although the user will have to withdraw the LP token before they can withdraw their funds from the initial liquidity pool.
One of the risks associated with liquidity pools is impermanent loss. This occurs when price ratios of pooled assets fluctuate, and an LP will automatically incur losses when the price ratio of a given pooled asset deviates from the price at which the funds were deposited. The higher the shift in price, the higher the loss. This is common in pools that contain volatile digital assets. However, it is called impermanent loss because the probability is high that the price ratio will revert. The loss only becomes permanent when the LP withdraws the said funds before the price ratio reverts. Further, some potential earnings from partaking in a liquidity pool can sometimes cover impermanent losses when, or if, they become permanent.
One trend in AMM development has revolved around concentrated liquidity. This feature is designed specifically to make the price-adjusting mechanism more efficient, minimize slippage, and allow liquidity providers to earn higher fees. Concentrated liquidity is developed to allow LPs to allocate assets to specific price ranges, which means, combining multiple concentrated liquidity positions, LPs are able to create individual price curves which are customized to their preference. This also allows LPs to earn trading fees against the liquidity provided at specific ranges than the total pool liquidity.
Traditional AMM designs require large amounts of liquidity to achieve a similar level of price impact as a book-based exchange. This is due to the substantial portion of AMM liquidity that is only made available when the pricing curve begins to turn exponential. And, because of this, most liquidity will not be used by rational traders due to the price impact the trader would experience during a trade using that liquidity. Further, AMM's and liquidity providers do not have control over which price points are offered to traders, due to their algorithmic pricing. This has lead some people to refer to AMMs as "lazy liquidity" that is underutilized and poorly previsioned. However, traditional market makers based on order books allow exchanges to control the price points at which they want to buy and sell tokens, leading to higher capital efficiency, with the trade-off of requiring active participation and oversight of liquidity provisioning.
Another concern with AMMs, despite their comparative advantages over centralized exchanges such as greater security and opportunities for community buuilding, is the phenomenon of front running. Frton running occurs when one user places a similar trade as a perspective buyer, but sells it immediately after. Because the transactionsa re public, and the buyer has to wait until they can get added to the blockchain, others can view the buy and place bids. Front runners are not trying to execute a trade, rather they are simply idetnifying transactions and bidding on the transaction to drive the price up so that they can sell back and earn a profit. And by "sandwiching" the original bid from a buyer with a new bid, the speculator is capable of extracting value from the transaction. Often, in practice, miners are the catalysts behind front running, which led to the term "miner extractable value" (MEV) which refers to the rents a third party can extract from the original transaction. Also known as sandwich attacks, these have been largely automated and implemented by bots, which account for the bulk of MEV.
In a paper, Andreas Park, professor of finance at the University of Toronto, the professor suggested that the intrinsic transparency of blockchain operations create a challenge in which an attacker may "sandwich" any trade by submitting a transaction that can be processed before the original one, and that the attack reverses after. Further, these attacks, according to professor Park, can be driven by an incentive problem inherent to second-generation blockchains, in which validators may not have sufficiently strong incentives to monitor private pools because it reduces their MEV, and the execution risk for users joining private pools increases.
AMMs as a mechanism have enabled peer-to-peer trading because they can instantly settle transactions after they are confirmed and included on the blockchain, and the mechanism allows any user to contribute liquidity and any buyer to trade tokens. However, AMMs have relied on expectations of future growth to drive their valuations; the revenue from transaction fees in AMMs is relatively small and linked to the liquidity providers rather than the exchange. This means, especially as APRs from trade fees might be low in AMMs, DEXs rely on governance token offerings for greater incentives, requiring a high price valuation to onboard and retain liquidity providers. These providers can often be "mercenary capital" known as such for going where short-run returns are higher. Further, anomolous and surprising events, known as black swan events, and market volatility can further damage AMMs, sometimes beyond repair. These events can lead to a liquidity freeze. However, in part because AMMs do not produce revenue as a function of its business model, it makes AMM almost a public good in the DeFi community, rather than a profit driver.
Some concerns around AMMs, such as front running, occur because pending transactions are generally visible, which allows a bot to detect it, pay a higher gas fee, and miners can impact market pricing. One way to avoid this is to hide the transactions, use zero-knowledge proofs, and other privacy preserving solutions, which can become increasingly popular because they are thought to minimize some attakcs, such as front running, by disguising the size and time of transactions that are submitted and verified.
Another attempt to remove the AMM from the reliance on external liquidity providers has seen some DEX developers grow their own treasury of protocol owned liquidity, which can codify buy-pressure through the inflation of the assets that it supports. Instead of giving all of the trading fees to the liquidity providers, the DAO controls the revenue
One challenge to AMMs remains, and that is, despite their necessity to the expansion of the DeFi community, but there have been concerned that there may be a lack of sustainability for DEXs and AMMs in the long run because there is not enough demand for different tokens. The value of the token in any AMM comes down to the value of the community, which can require a core team to lead and direct traffic, but need to apply best practices from a business perspective in order to create sustainability and find the scalability organizations require to succeed.
An automated market maker (AMM) is a type of decentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. Pricing information often comes from multiple APIs to always provide the most accurate cost. Also anyone can become a liquidity provider for automated market makers and receive a part of trading commissions.
The market contains an internal state, PRICE, which is the current market price. It would also have two parameters, FEE, and DEPTH. If a user wants to buy ORDER_AMOUNT coins, they would raise the price to PRICE + ORDER_AMOUNT / DEPTH, and pay ORDER_AMOUNT * (PRICE + ORDER_AMOUNT / DEPTH / 2) * (1 + FEE). Essentially, this constitutes buying an infinitesimal number of coins at every price point between the old price and the new price.
There are two important things to know first about AMMs:
Trading pairs you would normally find on a centralized exchange exist as individual “liquidity pools” in AMMs. For example, if you wanted to trade ether for tether, you would need to find an ETH/USDT liquidity pool.
Instead of using dedicated market makers, anyone can provide liquidity to these pools by depositing both assets represented in the pool. For example, if you wanted to become a liquidity provider for an ETH/USDT pool, you’d need to deposit a certain predetermined ratio of ETH and USDT.
To make sure the ratio of assets in liquidity pools remains as balanced as possible and to eliminate discrepancies in the pricing of pooled assets, AMMs use preset mathematical equations. For example, Uniswap and many other DeFi exchange protocols use a simple x*y=k equation to set the mathematical relationship between the particular assets held in the liquidity pools.
Here, x represents the value of Asset A, y denotes the value of Asset B, while k is a constant.
In essence, the liquidity pools of Uniswap always maintain a state whereby the multiplication of the price of Asset A and the price of B always equals the same number.
To understand how this works, let us use an ETH/USDT liquidity pool as a case study. When ETH is purchased by traders, they add USDT to the pool and remove ETH from it. This causes the amount of ETH in the pool to fall, which, in turn, causes the price of ETH to increase in order to fulfill the balancing effect of x*y=k. In contrast, because more USDT has been added to the pool, the price of USDT decreases. When USDT is purchased, the reverse is the case – the price of ETH falls in the pool while the price of USDT rises.
When large orders are placed in AMMs and a sizable amount of a token is removed or added to a pool, it can cause notable discrepancies to appear between the asset’s price in the pool and its market price (the price it’s trading at across multiple exchanges.) For example, the market price of ETH might be $3,000 but in a pool, it might be $2,850 because someone added a lot of ETH to a pool in order to remove another token.
This means ETH would be trading at a discount in the pool, creating an arbitrage opportunity. Arbitrage trading is the strategy of finding differences between the price of an asset on multiple exchanges, buying it on the platform where it’s slightly cheaper and selling it on the platform where it’s slightly higher.
For AMMs, arbitrage traders are financially incentivized to find assets that are trading at discounts in liquidity pools and buy them up until the asset’s price returns in line with its market price.
For instance, if the price of ETH in a liquidity pool is down, compared to its exchange rate on other markets, arbitrage traders can take advantage by buying the ETH in the pool at a lower rate and selling it at a higher price on external exchanges. With each trade, the price of the pooled ETH will gradually recover until it matches the standard market rate.
Note that Uniswap’s x*y=k is just one of the mathematical formulas used by AMMs today. For instance, Balancer uses a much more complex form of mathematical relationship that lets users combine up to 8 digital assets in a single liquidity pool. Curve, on the other hand, adopts a mathematical formula suitable for pairing stablecoins or similar assets.
AMM is a type of decentralized exchange
How do Automatic Market Makers (AMMs) work?
For AMMs, arbitrage traders are financially incentivized to find assets that are trading at discounts in liquidity pools and buy them up until the asset’s price returns in line with its market price.
For instance, if the price of ETH in a liquidity pool is down, compared to its exchange rate on other markets, arbitrage traders can take advantage by buying the ETH in the pool at a lower rate and selling it at a higher price on external exchanges. With each trade, the price of the pooled ETH will gradually recover until it matches the standard market rate.
Note that Uniswap’s x*y=k is just one of the mathematical formulas used by AMMs today. For instance, Balancer uses a much more complex form of mathematical relationship that lets users combine up to 8 digital assets in a single liquidity pool. Curve, on the other hand, adopts a mathematical formula suitable for pairing stablecoins or similar assets.
When large orders are placed in AMMs and a sizable amount of a token is removed or added to a pool, it can cause notable discrepancies to appear between the asset’s price in the pool and its market price (the price it’s trading at across multiple exchanges.) For example, the market price of ETH might be $3,000 but in a pool, it might be $2,850 because someone added a lot of ETH to a pool in order to remove another token.
This means ETH would be trading at a discount in the pool, creating an arbitrage opportunity. Arbitrage trading is the strategy of finding differences between the price of an asset on multiple exchanges, buying it on the platform where it’s slightly cheaper and selling it on the platform where it’s slightly higher.
To understand how this works, let us use an ETH/USDT liquidity pool as a case study. When ETH is purchased by traders, they add USDT to the pool and remove ETH from it. This causes the amount of ETH in the pool to fall, which, in turn, causes the price of ETH to increase in order to fulfill the balancing effect of x*y=k. In contrast, because more USDT has been added to the pool, the price of USDT decreases. When USDT is purchased, the reverse is the case – the price of ETH falls in the pool while the price of USDT rises.
When large orders are placed in AMMs and a sizable amount of a token is removed or added to a pool, it can cause notable discrepancies to appear between the asset’s price in the pool and its market price (the price it’s trading at across multiple exchanges.)
To understand how this works, let us use an ETH/USDT liquidity pool as a case study. When ETH is purchased by traders, they add USDT to the pool and remove ETH from it. This causes the amount of ETH in the pool to fall, which, in turn, causes the price of ETH to increase in order to fulfill the balancing effect of x*y=k.
To make sure the ratio of assets in liquidity pools remains as balanced as possible and to eliminate discrepancies in the pricing of pooled assets, AMMs use preset mathematical equations. For example, Uniswap and many other DeFi exchange protocols use a simple x*y=k equation to set the mathematical relationship between the particular assets held in the liquidity pools.
Here, x represents the value of Asset A, y denotes the value of Asset B, while k is a constant.
In essence, the liquidity pools of Uniswap always maintain a state whereby the multiplication of the price of Asset A and the price of B always equals the same number.
Instead of using dedicated market makers, anyone can provide liquidity to these pools by depositing both assets represented in the pool. For example, if you wanted to become a liquidity provider for an ETH/USDT pool, you’d need to deposit a certain predetermined ratio of ETH and USDT.
How do Automatic Market Makers (AMMs) work?
There are two important things to know first about AMMs:
Trading pairs you would normally find on a centralized exchange exist as individual “liquidity pools” in AMMs. For example, if you wanted to trade ether for tether, you would need to find an ETH/USDT liquidity pool.
AMM is a type of decentralized exchange
An automated market maker (AMM) is a type of decentralized exchangedecentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. Pricing information often comes from multiple APIAPIs to always provide the most accurate cost. Also anyone can become a liquidity providerliquidity provider for automated market makers and receive a commissionpart forof trading commissions.