What is an AMM? Automated Market Maker Explained

One of the most essential components of a decentralized finance (DeFi) ecosystem is the automated market makers (AMMs). They use liquidity pools rather than a conventional market of buyers and sellers to enable digital assets to be traded in a permissionless and automatic manner. Users of AMM want to be able to offer liquidity pools with crypto coins, which are regulated by a constant mathematical formula. Liquidity pools may be tailored for various applications, and they are becoming an essential tool in the DeFi ecosystem. Without further ado, let’s have a look at what is an AMM and how an Automated Market Maker work.

What is a Market Maker?

A market maker helps to make the process of providing liquidity for trading pairs on centralized exchanges easier. A central, or regulated, exchange manages traders’ activities and offers an automated system that ensures trade orders are matched correctly.

To put it another way, when Trader A purchases 1 ETH for $1,500 on the centralized exchange, the exchange matches him with a Trader B who is ready to sell 1 ETH at the rate offered by that market. As a result, the centralized exchange acts as a go-between for Trader A and Trader B. Its role is to make the process as smooth as possible while also matching buyers and sellers quickly.

When liquidity is tight, gaps tend to occur. In other words, before a trade is finished, the price of an asset will move considerably. This frequently happens in volatile markets such as the cryptocurrency market. As a result, exchanges must ensure that trades are completed as soon as possible to minimize price slippages.

Centralized exchanges, on the other hand, use professional traders or financial institutions to offer liquidity for trading pairs. These organizations establish numerous bid-ask orders in order to match the trade requests of individual investors. As a result, the exchange may be sure that counterparties are always available for all transactions. In this setup, liquidity providers act as market makers; in other words, market makers aid in the processes necessary to provide liquidity for trading pairs.

What is an AMM (Automated Market Maker)?

DEXs, on the other hand, seek to eliminate all intermediary processes involved in cryptocurrency trading. They do not support order matching systems or custodial infrastructures (where the exchange holds all of the wallet’s private keys.) As a result, DEXs promote self-determination, allowing users to make transactions directly from non-custodial wallets.

DEXs also eliminate order matching systems and order books, replacing them with autonomous protocols called AMMs. These protocols employ smart contracts – self-executing computer programs that define the price of digital assets and provide liquidity – to create the pricing of these assets. The protocol pools liquidity into smart contracts in this case. Users are not technically trading against other parties; instead, they’re trading against the liquidity locked within smart contracts, which is typically referred to as a pool.

High-net-worth individuals or businesses, for example, can only fill the role of a liquidity provider in traditional exchanges. AMMs, on the other hand, allows any party to serve as a liquidity supplier as long as they fulfill the parameters built into the smart contract.

How do Automated Market Makers work?

AMM is simply an algorithm or a pricing formula, built within the liquidity pools. Based on the liquidity provided, supply and demand, this algorithm defines the prices at any given time. Let’s have a look into one of the most popular Automated Market Makers, Uniswap.

Uniswap’s AMM pricing formula is called the constant product market maker. This pricing formula, in a simplified version, is expressed as x * y = k. Where x and y are the reserves of tokens deposited in the liquidity pool, and k is a constant that remains unchanged while traders exchange tokens. Therefore, whenever liquidity providers add liquidity to the pool, they deposit their tokens in the ratio expressed by that formula. When traders exchange tokens, the reserves of the pool change. The x or y of the pricing formula will change in this case, which will lead to new prices.

For example, consider Bob a liquidity provider and Alice a trader. Bob has a lot of ETH and USDC idle in his wallet and wants to become a liquidity provider. Uniswap’s ETH/USDC pool has 90 USDC and 9 ETH in reserves. This makes the price of 1 ETH = 10 USDC (10$). Bob has to deposit USDC and ETH based on this price. Hence, he decides to deposit 1 ETH and 10 USDC in the pool. In return, Uniswap will provide Bob with liquidity pool tokens (LP), representing the share Bob has in the pool. In this scenario, the LP tokens must correspond to 10%.

Alice decides to trade on the exchange and swaps 10 USDC for 1 ETH and pays as well 0.3% of this transaction to the liquidity pool. Hence, instead of 1 ETH, she will receive 0.997 ETH and 0.003 ETH worth of USDC will remain in the pool as a fee for the transaction. To keep calculations simple we exclude the portion paid for fees. After Alice’s transaction was executed successfully, in the pool remain 11 ETH and 90 USDC. This leads to price change. The price after the transaction is 1 ETH = 8.19 USDC.

After this transaction, Bob decides to withdraw his funds from the liquidity pool. Bob will receive his 10% share of the pool on the new balance. Hence, Bob will receive back 1.1 ETH and 9 USDC plus 0.0003 ETH as a reward from Alice’s transaction. That’s a very simplistic scenario to help you understand how the exchange works. In reality, there are millions of daily transactions on Uniswap and therefore the fees, depending on the pairs can be quite high.

What are the liquidity providers?

Liquidity providers are one of the essential components of every AMM. Liquidity providers as in the example given above, are the individuals which provide their own funds as liquidity to the AMMs. Without Liquidity providers, the AMMs cannot function properly, as there won’t be liquidity for traders to exchange assets.

Why should someone become a liquidity provider? Usually, AMMs provide various types of rewards to incentivize liquidity providers to deposit their funds on AMMs.

First, Liquidity providers earn a portion of the fees collected from trading activity on AMMs. Although traders pay a very small amount of fee, if trading activity on the liquidity pool is high, then also the rewards for liquidity providers can get quite high.

Second, AMM sometimes provides additional rewards to liquidity providers in the form of yield farming. Although the second method was popular for quite some time, it proved to be unsustainable in the long term.

What is Impermanent Loss?

One of the difficulties with liquidity pools is that they can result in impermanent losses. When the price ratio of pooled assets changes, this happens. When the price ratio of a pool’s assets deviates from its purchase cost, a liquidity provider will suffer losses automatically. The greater the shift in price, the greater the loss incurred. Pools made up of volatile digital currencies are particularly susceptible to irreversible losses.

Losses, on the other hand, are only temporary because it is conceivable that the price ratio will revert. Only when the LP withdraws the said funds before the price ratio reverts do the loss become permanent. Note also those transaction fees and LP token staking earnings might sometimes be able to compensate for such losses.

In practice, the impermanent loss is more like a permanent loss, especially in cases where the assets in the pool are volatile. Although possible, it is very unlikely for two volatile assets to return to their initial prices and for liquidity providers to manage the right timing to withdraw their assets.

Read: Impermanent Loss Explained

Most Common AMM variations

In Vitalik Buterin’s original request for automated or on-chain money markets, he made it clear that AMMs should not be the only viable alternative to decentralized trade. Instead of being limited, instead there needed to be multiple methods to trade tokens so that AMM pricing stayed accurate. He didn’t expect, however, the existence of various techniques to utilize AMMs.

Automated Market Makers utilize cutting-edge technology, but iterations of it have already shown to be an essential financial instrument in the fast-growing DeFi ecosystem, as well as a sign of maturing.

The DeFi sector is changing rapidly, but three major AMM kinds have emerged: Uniswap, Curve, and Balancer.

Uniswap

The Uniswap model, which launched in July 2018, is the first of its kind. Users can create a liquidity pool with any two ERC-20 tokens and a 50/50 split, which has made it the most long-lasting AMM method on Ethereum. The Constant-product AMM model is the name given to Uniswap’s AMM approach in the technical whitepaper.

Read: Uniswap – The leading decentralized crypto exchange.

Curve Finance

Curve’s AMM model is also referred to as the Stableswap variant. It specializes in building liquidity pools of similar assets, such as stablecoins, and as a result, has some of the lowest rates and most efficient trades in the business while also resolving the problem of restricted liquidity.

Read: Curve Finance – All you need to know about the leading Stableswap.

Balancer

By allowing users to build dynamic liquidity pools of up to eight different assets in any proportion, Uniswap’s Balancer goes well beyond the capabilities of AMMs.

Bottom Line

An automated market maker is a smart contract that automatically sets the prices of digital assets and matches buyers with sellers. Unlike traditional exchanges, where there must be a match between a buyer and seller before a trade can take place, an AMM can trade with anyone at any time.

AMMs have become very popular in the DeFi space because they provide 24/7 liquidity to decentralized exchanges and other DeFi protocols. In addition, AMMs often offer yield-farming opportunities for users who provide liquidity to their pools.

However, AMMs also have some downsides. One is that they can result in impermanent losses for liquidity providers. Another is that there are currently only a few major AMM platforms (Uniswap, Curve, and Balancer) and each has its own quirks.

Nonetheless, AMMs are an important part of the DeFi ecosystem and are likely to become even more popular in the years to come.

What is an Automated Market Maker?

An automated market maker, or AMM, is a smart contract that automatically sets the prices of digital assets and matches buyers with sellers. Unlike traditional exchanges, where there must be a match between a buyer and seller before a trade can take place, an AMM can trade with anyone at any time.

AMMs have become very popular in the DeFi space because they provide 24/7 liquidity to decentralized exchanges and other DeFi protocols. In addition, AMMs often offer yield-farming opportunities for users who provide liquidity to their pools.

However, AMMs also have some downsides. One is that they can result in impermanent losses for liquidity providers. Another is that

Aris Ioannou
Aris Ioannouhttps://coinavalon.io
Aris created Coinavalon with the purpose of helping the average person navigate the decentralized web. Aris has been passively in the space since 2017 and full time since late 2020. Before Coinavalon, Aris worked as a Business & IT Architect in the financial services sector. Aris holds an MSc in Advanced Computing from Imperial College London, a BSc in Computer Engineering from University of Cyprus and currently pursuing an MBA degree from CIIM.

Related Articles

Latest Articles