Automated Market Makers (AMM) | A Complete Guide

The rise of decentralised finance (DeFi) has changed the way we buy and sell cryptocurrencies. One of the essential ways in which any DeFi protocol operates is by using what's known as an automated market maker (AMM).

Although many investors may not be familiar with AMMs, they play an integral role in ensuring liquidity on a decentralised exchange. Let's go over exactly what an AMM is, how it works, and why it's so important.

What Is A Market Maker?

Before diving into the topic of AMMs, it's important to understand how regular market makers operate. In a traditional financial market, like the stock market, market makers are trusted parties who provide liquidity between buyers and sellers.

Throughout most of history, centralised exchanges served to match buyers and sellers together. However, if there's not enough liquidity on the market to instantaneously match buy and sell orders, that's when slippage can occur, which is when an asset's price shifts before the trade is completed.[1]

That's why centralised exchanges rely on institutions like banks or individual traders and funds to provide additional liquidity. These market makers create multiple bid-ask orders to ensure counterparties are available for any trade.[2]

Why Is Liquidity So Important?

A highly liquid cryptocurrency can be sold easily at a fair market price. In contrast, an illiquid asset can't be sold without significant effort or a loss of value. That means you may not be able to get the price you originally wanted if there's not enough liquidity, hence why market makers are so important in finance.

What Are Automated Market Makers (AMMs)?

An automated market maker (AMM) is a system that automatically facilitates buy and sell orders on a decentralized exchange. In contrast to regular market makers, AMMs function by using self-executing computer programs, also known as smart contracts. These smart contracts automatically clear transactions between buyers and sellers.[3]

The use of AMMs also eliminates the need for another participant when making a trade. Instead, buyers and sellers can trade directly with an AMM and its algorithm, which determines the price of a cryptocurrency you want to trade.[4]

This is especially important for the altcoin market, where certain altcoin tokens have low liquidity. Using an AMM, you trade whatever cryptocurrency you want without needing another buyer or seller to deal with directly. In contrast, centralised crypto exchanges like Coinbase or Binance don't use AMMs..

However, while AMMs automate the transaction process, there still needs to be liquidity providers for AMMs to function.[5]

Liquidity Pools And Liquidity Providers

Automated market makers rely on liquidity pools and liquidity providers to function. A liquidity pool is a cryptocurrency reserve used to facilitate future trades. Those who provide their funds to these pools are referred to as liquidity providers.[6]

Liquidity pools typically take just two cryptocurrencies that are exchanged amongst each other, similar to how forex traders buy and sell currency pairs. For example, a trader can sell BitcoinBitcoin (BTC) to buy Ether (ETH) and vice versa from a BTC/ETH liquidity pool using an AMM.

Some liquidity pools and AMMs handle several cryptocurrencies at the same time. This depends on your AMM and decentralised exchange.[5]

How Do AMMs Work?

AMMs use pre-programmed mathematical equations to adjust prices based on supply in order to make sure the ratio of assets in any liquidity pool remains balanced.[7]

For example, in an ETH/BTC liquidity pool, a trader can buy ETH by selling BTC. As the remaining supply of ETH in the pool falls, the ETH prices will automatically go up to compensate. On the other end, since there's more BTC in the liquidity pool, prices will fall due to this increased supply. When it's the other way around, and BTC is purchased using ETH, the reverse is the case, and ETH falls in price while BTC goes up.[2]

The exact formula or equation depends on the DeFi protocol in question. Some, like Uniswap, use a relatively simple formula of x*y=k. In this formula, x is the quantity of one token in the liquidity pool, y is the quantity of the other token, and k is a fixed constant.[2]

Other AMMs may use more complex mathematical formulas. For example, while most liquidity pools are built for just two different tokens, DeFi protocol Balancer allows more than eight different asset classes to trade amongst each other in a single liquidity pool.[2]

Can Anyone Become An AMM?

Only well-known companies and institutions (or high net-worth individuals) can become market makers in a centralised exchange.[8] However, when it comes to AMMs, anyone can hypothetically be a liquidity provider if they meet the underlying requirements.

The requirements vary between liquidity pools, but you'll need enough spare cash to make a significant investment. Most smart contracts require you to deposit a predetermined amount of tokens, usually Ether, Bitcoin, or Binance Coin.

In exchange for providing liquidity to the AMM protocol, liquidity providers can earn network fees from all trading activity within their liquidity pool. It's one of several ways crypto investors can earn passive income using their cryptocurrency.[8] However, liquidity providers only receive their share of transaction fees when they wish to pull their money out of the pool. Until then, it keeps accumulating on top of their existing deposit.[2]

Arbitrage Opportunities In Liquidity Pools

There are many decentralised crypto exchanges out there, and each can have multiple liquidity pools per cryptocurrency. If there are large orders placed in AMMs and large quantities of tokens are removed or added, this could lead to a big shift in price.

For example, if BTC is trading for US$43,000 in a pool, it may fall to US$42,000 if someone added a lot of BTC to the pool in order to purchase another cryptocurrency. This means that, for a short period, BTC will trade at a discount compared to the rest of the market—and represents an arbitrage opportunity.

Arbitrage trading, which means buying and selling an asset that's priced differently on multiple exchanges, isn't as popular now in regular markets because of the typically high liquidity of stocks, bonds and commodities. In contrast, many cryptocurrencies have lower liquidity levels, meaning arbitrage opportunities tend to be available for longer before they correct themselves. There are also fewer high-frequency computers trading the crypto markets, which is another reason why arbitrage opportunities are more common.[9]

Liquidity pools are entirely decentralised and separate from each other, so arbitrage traders play a crucial role in keeping AMM protocols running effectively.

The Risk Of Impermanent Loss

While being a liquidity provider sounds like an easy way to earn transaction fees, there are dangers involved with depositing your crypto. One of these risks is called impermanent loss. This is when the price of your deposited crypto in a liquidity pool fluctuates from the price when you first deposited it.[10]

The bigger the shift in price, up or down, the more you would lose (or gain) if you withdraw your deposit. It's not technically a loss until you do actually withdraw, which is why they're referred to as impermanent loss.

However, this is a significant risk for smaller altcoins and cryptocurrencies, where big price swings might never end up reversing. Becoming a liquidity provider for an entirely new altcoin, where prices are incredibly volatile, could be very dangerous for providers.

There are a few more benefits to using a DeFi protocol with an AMM as opposed to a more centralised exchange.

No Requirements

For one, while centralized exchanges now require account verification and Know-Your-Customer (KYC) protocols, AMMs have zero requirements. Anyone with a crypto wallet can trade digital assets on a DeFi exchange run by AMMs.[11]

Easier To Start Cryptos

The lack of requirements makes it much easier for blockchain projects to launch new cryptocurrencies, too. While Coinbase and Binance are far more restrictive as to which altcoins can be listed, anyone with a new token can put it up for sale on AMM-powered DeFi exchange.[11]

AMM Security Issues

The one disadvantage of AMMs is that they are at higher risk of being hacked. That's not to say that centralised exchanges can't be compromised. For instance, more than US$4 billion worth of BTC was stolen from Bitfinex back in 2016, which the United States Justice Department partially recovered in February 2022.[12]

However, DeFi protocols like Uniswap have been hacked in the past, where liquidity deposits for certain pools were stolen.[13] Not every DeFi protocol has procedures in place to cover these losses. Smart contracts can be hacked, too, depending on which developers wrote the contract in the first place.[14]

Although numerous decentralised exchanges have emerged, the most popular examples all use very similar AMMs.

1. Uniswap

Uniswap is a decentralised open-source protocol that was developed in 2018. Built using Ethereum, Uniswap remains one of the most popular DEXs on the market today and has the most liquidity. Since it is open-source, many have tried to clone or make their own versions of Uniswap. Uniswap liquidity pools consist of two tokens.[15]

2. SushiSwap

One of the more popular forks from Uniswap is a DeFi protocol called SushiSwap. While they both function almost exactly the same, the critical difference between the two comes down to tokenomics. SushiSwap introduces the SUSHI token, which acts as an additional incentive program for liquidity providers.[16]

3. PancakeSwap

Another variant built off UniSwap is called PancakeSwap. Both seem similar on the surface, but whereas UniSwap is built to run Ethereum-based altcoins, PancakeSwap is for altcoins built using the Binance Smart Chain (BSC).[17]

Although far fewer cryptocurrencies are built on Binance Smart chain than Ethereum, those that are almost always have lower gas fees and fewer transaction delays than Ethereum, whose current network is already becoming congested with traffic.[17]

4. Balancer

Balancer is a smaller DeFi protocol, ranked ninth in size based on total locked assets.[18] While a smaller protocol, Balancer's AMM offers a lot more features. For example, Balancer supports up to eight different tokens in one liquidity pool. That makes prices far more stable compared to liquidity pools based on just two cryptocurrencies.[19]

On other DeFi protocols, trading fees are set up by the platform itself. In contrast, Balancer lets creators of the liquidity pool in question set their own fees. This encourages more competitiveness among pools, as users will constantly look for the most profitable pool to deposit into. Users can even create private liquidity pools, where only certain participants can join.[20]

Summary

Automated market makers are one of the biggest innovations in decentralised finance. Without functioning AMMs, decentralised exchanges wouldn't be possible, and crypto traders would still be forced into relying on intermediaries and central exchanges.

However, AMMs are still in their infancy. The AMMs used by platforms like Uniswap and PancakeSwap are limited in features, while more advanced AMMs like those used by Balancer are yet to catch on with the rest of the crypto world.

FXCM Research Team

FXCM Research Team consists of a number of FXCM's Market and Product Specialists.

Articles published by FXCM Research Team generally have numerous contributors and aim to provide general Educational and Informative content on Market News and Products.

References

1

Retrieved 15 Mar 2022 https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/slippage/

2

Retrieved 15 Mar 2022 https://www.coindesk.com/learn/2021/08/20/what-is-an-automated-market-maker/

3

Retrieved 15 Mar 2022 https://blog.coindcx.com/opinion/difference-between-centralized-and-decentralized-cryptocurrency-exchange

4

Retrieved 15 Mar 2022 https://hackernoon.com/automated-market-makers-amm-priming-a-financial-revolution-using-smart-contracts

5

Retrieved 15 Mar 2022 https://coinmarketcap.com/alexandria/article/what-are-automated-market-makers

6

Retrieved 15 Mar 2022 https://academy.binance.com/en/articles/what-are-liquidity-pools-in-defi

7

Retrieved 15 Mar 2022 https://www.gemini.com/cryptopedia/amm-what-are-automated-market-makers#section-constant-product-formula

8

Retrieved 15 Mar 2022 https://www.finder.com/ca/automated-market-makers

9

Retrieved 15 Mar 2022 https://www.gemini.com/cryptopedia/crypto-arbitrage-crypto-exchange-prices

10

Retrieved 15 Mar 2022 https://www.yahoo.com/now/impermanent-loss-crypto-silent-killer-181500277.html

11

Retrieved 15 Mar 2022 https://cointelegraph.com/defi-101/what-are-decentralized-exchanges-and-how-do-dexs-work

12

Retrieved 15 Mar 2022 https://www.justice.gov/opa/pr/two-arrested-alleged-conspiracy-launder-45-billion-stolen-cryptocurrency

13

Retrieved 15 Mar 2022 https://siliconangle.com/2020/04/19/25m-cryptocurrency-stolen-hack-lendf-uniswap/

14

Retrieved 15 Mar 2022 https://arstechnica.com/information-technology/2021/12/hackers-drain-31-million-from-cryptocurrency-service-monox-finance/

15

Retrieved 15 Mar 2022 https://uniswap.org/blog/uniswap-history

16

Retrieved 15 Mar 2022 https://101blockchains.com/uniswap-vs-sushiswap/

17

Retrieved 15 Mar 2022 https://coinmarketcap.com/alexandria/article/uniswap-vs-pancakeswap

18

Retrieved 15 Mar 2022 https://www.defipulse.com/

19

Retrieved 15 Mar 2022 https://www.defipulse.com/blog/balancer-start-liquidity-mining-and-earn-bal-tokens-today

20

Retrieved 06 May 2024 https://balancer.gitbook.io/balancer/getting-started/faq

${getInstrumentData.name} / ${getInstrumentData.ticker} /

Exchange: ${getInstrumentData.exchange}

${getInstrumentData.bid} ${getInstrumentData.divCcy} ${getInstrumentData.priceChange} (${getInstrumentData.percentChange}%) ${getInstrumentData.priceChange} (${getInstrumentData.percentChange}%)

${getInstrumentData.oneYearLow} 52/wk Range ${getInstrumentData.oneYearHigh}
Disclosure

Any opinions, news, research, analyses, prices, other information, or links to third-party sites contained on this website are provided on an "as-is" basis, as general market commentary and do not constitute investment advice. The market commentary has not been prepared in accordance with legal requirements designed to promote the independence of investment research, and it is therefore not subject to any prohibition on dealing ahead of dissemination. Although this commentary is not produced by an independent source, FXCM takes all sufficient steps to eliminate or prevent any conflicts of interests arising out of the production and dissemination of this communication. The employees of FXCM commit to acting in the clients' best interests and represent their views without misleading, deceiving, or otherwise impairing the clients' ability to make informed investment decisions. For more information about the FXCM's internal organizational and administrative arrangements for the prevention of conflicts, please refer to the Firms' Managing Conflicts Policy. Please ensure that you read and understand our Full Disclaimer and Liability provision concerning the foregoing Information, which can be accessed here.

Past Performance: Past Performance is not an indicator of future results.

Spreads Widget: When static spreads are displayed, the figures reflect a time-stamped snapshot as of when the market closes. Spreads are variable and are subject to delay. Single Share prices are subject to a 15 minute delay. The spread figures are for informational purposes only. FXCM is not liable for errors, omissions or delays, or for actions relying on this information.