Understanding Automated Market Makers

Understanding Automated Market Makers

Intermediate
09 Jun, 2021
5 mins

An Automated Market Maker (AMM) is a self-executing system that manages liquidity in a liquidity pool operating through mathematical formulas and algorithms to define the price of an asset.  Essentially, AMMs are built on self-executing smart contract programs that are used to define the price of a digital asset. These smart contracts are known as liquidity pools.

In comparison, traditional exchanges or centralized exchanges like CoinMena rely on order books and market makers to provide liquidity for trading pairs. Historically market makers have been responsible for slippage and latency in price discovery. Moreover, they have been, at times, accused of market manipulation. AMMs aim to resolve these issues by completely removing the human element and replacing them with automated smart contracts (also known as liquidity pools) to provide liquidity to a decentralized exchange.

How does it work?

AMMs are self-executing smart contracts built on mathematical formulas. The mathematical formulas and algorithms can vary between different AMM, but the most popular AMM, such as Uniswap, Curve, and Balancer, among others, rely on the formula,

Automated Market Marker (AMM)

In this formula,

X is the amount of token 1

Y is the amount of token 2

K is the total liquidity which remains as a fixed constant.

Using this formula, the smart contracts work to main the constant liquidity (K) by changing the price of the asset depending on the supply and demand forces of either token within that liquidity pool.

To create the market within an AMM, they rely on what is known as a liquidity pool which is funded by liquidity providers.

What is a Liquidity Pool?

A liquidity pool is a smart contract filled with crypto coins or tokens that enable traders to trade between two assets even if there are no buyers and sellers at that time.

Liquidity providers are incentivized to invest in liquidity pools because they can earn trading fees (gas fees) and, in some cases, the unique token of the protocol. This creates a symbiotic relationship that enables liquidity providers to earn a passive income whilst enabling the AMM to have sufficient liquidity to operate efficiently with less price volatility and slippage. Liquidity pools are explored in detail in the next essay.

What is Impermanent Loss?

Impermanent loss is the temporary loss in value of crypto coins or tokens that has been deposited into a liquidity pool which is caused by a change in the price of the asset. The loss is referred to as temporary because it only becomes permanent if the liquidity provider removes their crypto assets before the price reverts to the initially deposited price. Impermanent loss essentially measures how much an investor has lost if they had not invested in the liquidity and simply held their crypto assets.

It is important to understand the concept of impermanent loss as a liquidity provided (AMM investor) because it is unique to AMMs. The concept of impermanent loss is explored in detail in the next essay.


Share this article:
Trading

Invest in the future of finance today with CoinMENA

Related Articles