A Comprehensive Guide on Automated Market Makers (AMMs)
9 min read

A Comprehensive Guide on Automated Market Makers (AMMs)

A Comprehensive Guide on Automated Market Makers (AMMs)

Summary:

  • A traditional asset exchange is composed of: buyers, sellers, brokers-dealers, and market makers. The exchanges manage the trades between the buyer and the seller. These exchanges offer a system (order book) that ensures trade orders are properly aligned.
  • The exchange is an intermediary between the Buyer and the Seller. The buyers make a bid (Bid), specifying the price they will pay, and the quantity required. Sellers offer an ask price (Ask), specifying the price they will sell and the quantity available. The exchange’s primary function is to streamline and match customer orders with a consistent level of accuracy and efficiency.
  • The order book model works well where the trade volumes and liquidity are high, resulting in lower slippages. Leading cryptocurrencies, like Bitcoin and Ethereum, have high volumes of trade. While other cryptocurrencies and tokens, which don’t have high volumes, faced challenges with the order book model.
  • The main issue is related to high slippages and volatility due to low volumes of trade. Slippage results from a change in bid-ask spread. There is a time delay between the trade request and execution in the market. During this time, if the bid-ask spread changes, then slippage occurs. The absence of market makers round the clock further constrained the liquidity.
  • Automated Market Makers (AMMs), therefore, emerged as a solution to the order book challenge. Automated Market Makers (AMMs) are a monetary device unique to decentralized finance (DeFi). AMMs are programmable, available 24x7 for trading, and do not rely on the typical communication between buyers and sellers. Instead it is controlled by smart contracts directly on the blockchain.
  • Automated Market Makers democratized cryptocurrency trading by doing away with centralized order books and institutional market makers. AMMs enable digital possessions to be traded automatically by utilizing liquidity pools instead of a typical order book. The Automated Market Makers method of exchanging cryptocurrency assets embodies the ideals of blockchain technology.
  • Core to the AMM's function is decentralization i.e., no one entity controls the system, and permissionless interaction, (i.e., anybody can trade without restrictions). On AMM platforms, rather than trading in between purchasers and sellers, users trade versus a pool of crypto assets - a liquidity pool. At its core, a liquidity pool is a shared pot of crypto assets/tokens. Users supply liquidity pools with assets and the cost of the assets in the pool is figured out by a mathematical formula.
  • In AMMs, we can view liquidity pools as the equivalent of an order book which replaces the traditional buyer/sell markets. When a trade executes on an AMM, the trade executes against the liquidity pool. This eliminates the need for an order book and for the buyer and seller to be present at that moment in time.
  • Liquidity providers (LPs) finance the liquidity pools. Anyone who has crypto assets can become a liquidity provider. LPs are given a share of the trading fee generated on the liquidity pool. By providing liquidity to a pool the LPs become a part owner of the liquidity pool according to their share of the pool.
  • Typically, LPs deposit two crypto assets (or tokens) in a single transaction to a liquidity pool. For e.g., if the liquidity pool is BTC-ETH pair, then the LPs provide assets in a balanced fashion. Thus, the LPs become a part owner of the liquidity pool – to the extent of their contribution in relation to the size of the pool. AMMs encourage the user to place crypto assets into liquid pools by incentivizing them.
  • The reward is determined by the protocol – usually it’s a portion of the trading fee for the LPs. For example, the Uniswap system charges traders 3% for direct withdraw but other platforms like Saddle charge less trading fees for attracting liquidity providers into their pools, in turn offering more profits to users.

Learn more about Saddle

Swap and farm on the dApp

Join the community and earn SDL


What is a Market Maker?

Markets facilitate trade in a society by connecting the sellers to the buyers. Trading of goods, services, or information (assets collectively) happens in a purpose-built marketplace. For instance, a local community might have a farmers’ market to trade locally produced vegetables and fruits. Whilst a stock market like New York Stock Exchange (NYSE) allows global participants to trade in stocks. A traditional exchange comprises buyers, sellers, brokers-dealers, and market makers. Markets where crypto assets are traded are cryptocurrency exchanges.

The exchanges manage the trades between the buyer and the seller. These exchanges offer a system (order book) that ensures trade orders are properly aligned. The exchange is an intermediary between the Buyer and the Seller.

The buyers make a bid (Bid), specifying the price they will pay, and the quantity required. Sellers offer an ask price (Ask), specifying the price they will sell and the quantity available. The exchange’s primary function is to streamline and match customer orders with a consistent level of accuracy and efficiency.

Bid-Ask Spread Challenge

The Bid-Ask spread is the gap between the Ask and the Bid price. For example, if the sellers’ ask is $55 and the buyers’ bid is $53, the bid-ask spread is $2. The bid-ask spread determines the market liquidity. For heavily traded assets, the bid-ask spread will be tighter (narrow). However, for assets with little demand or sparsely traded, the bid-ask spread may be high or even unknown.

If there is a high volume of trade, the bid-ask spread should be narrow for the asset traded. Therefore, the traded asset is liquid. Contrarily, when there is a wide (or unknown) bid-ask spread, then the asset is illiquid.

But what can be done if exchanges cannot match purchases and sales orders quickly? This leads to a problem of liquidity.

Market Makers Solution

Market makers (MM) help keep the market functioning by actively buying and selling assets. Their primary function is to provide liquidity on both sides of the market (buy and sell). MMs can be an individual or an organization providing liquidity to the market by transacting on both sides of the market (buy and sell). For example, the MM might offer a Bid for $20/stock and Ask for $20.05/stock.

Market makers earn a profit through the bid-ask spread and carry a risk of price variations during Buy-Hold-Sell cycle. The common type of market maker are the brokerage houses.

Market Makers for Cryptocurrency

The early version of the cryptocurrency exchanges, like the traditional exchanges, used the order book model. The order book model works well where the trade volumes and liquidity are high, resulting in lower slippages. Leading cryptocurrencies, like Bitcoin and Ethereum, have high volumes of trade. While other cryptocurrencies and tokens, which don’t have high volumes, faced challenges with the order book model.

The main issue is related to high slippages and volatility due to low volumes of trade. Slippage results from a change in bid-ask spread. There is a time delay between the trade request and execution in the market. During this time, if the bid-ask spread changes, then slippage occurs. The absence of market makers round the clock further constrained the liquidity.

Automated Market Makers (AMM), therefore, emerged as a solution to the order book challenge.

How AMM works?

There are a few things you must understand about AMMs:

1. AMM operates similarly to a book-keeping exchange, as it contains trading pairs (e.g., BTC-ETH pair). Where it differs from the traditional order book-based exchanges is the need to have a trade partner. In AMM based exchanges, the buyers and sellers trade against an algorithm. The smart contract behind the algorithm creates the market and then enables the trade.

2. The liquidity providers provide the liquidity for the smart contract. In traditional exchanges, the market makers played the role of liquidity providers. This role was restricted to a few individuals or brokerage houses. In AMMs, anyone can provide liquidity to the smart contract. The users who provide liquidity are known as liquidity providers (LPs).

3. The AMMs use a pre-set mathematical equation for determining the price for the assets. Constant product formula is probably the simplest and the earliest algorithm to come into the market. Uniswap popularized the mathematical formula:

x * y = k

where x is the amount of Token#1 in the liquidity pool, y is the amount of Token#2 in the liquidity pool, and k is a fixed constant.

When a trader wants to swap the tokens in the pool, the formula will try to achieve the constant product equilibrium. For example, if a trader wants to swap USDT for ETH, then the AMM calculates the price to be quoted for USDT. The price quoted will to maintain a constant product of k after the swap.

Saddle uses an improved version of the Constant Product Formula, called a StableSwap algorithm.

AMM as Liquidity Gateway

We can view AMMs as an instrument that helps a trader exchange a commodity for the correct price. Let’s explore the concepts around AMMs liquidity now.

Liquidity describes how quickly one asset can be exchanged in one more property, without impacting its market value. Before AMMs entered the playfield, liquidity was a difficult topic for decentralized exchanges (DEXs). As a brand-new modern technology with a complicated interface, the number of purchasers and vendors was indeed tiny, which meant it was challenging to locate adequate people ready to trade regularly. As a new technology with very complicated interactions, buyers and sellers were also limited, so there weren't enough people available to trade regularly.

AMM solved liquidity issues by generating liquidity pools, enabling liquidity providers to supply them with digital assets. With more assets and more liquidity in the pool, easier trades occur on a decentralized exchange (DEX). To encourage more people to deposit assets in the liquidity pools, AMMs incentivized the liquidity providers for their contribution.

Liquidity Pools

On AMM platforms, rather than trading in between purchasers and sellers, users trade versus a pool of crypto assets - a liquidity pool. At its core, a liquidity pool is a shared pot of crypto assets/tokens. Users supply liquidity pools with assets and the cost of the assets in the pool is figured out by a mathematical formula. By tweaking the formula, we can maximize liquidity pools for different functions.

Highly liquid pools have enormous assets to trade against. In AMMs, we can view liquidity pools as the equivalent of an order book which replaces the traditional buyer/sell markets. Now, when a trade executes on an AMM, the trade executes against the liquidity pool. This eliminates the need for an order book and for the buyer and seller to be present at that moment in time.

We should note that not every liquidity pool is adequately financed. Pools that are inadequately financed have potential slippage.

Liquidity Providers (LPs)

Liquidity providers (LPs) finance the liquidity pools. Anyone who has crypto assets can become a liquidity provider. AMMs encourage the user to place crypto assets into liquid pools by incentivizing them. LPs are given a share of the trading fee generated on the liquidity pool. By providing liquidity to a pool the LPs become a part owner of the liquidity pool.

Typically, LPs deposits two crypto assets (or tokens) in a single transaction to a liquidity pool. For e.g., if the liquidity pool is BTC-ETH pair, then the LPs provide assets in a balanced fashion. Thus, the LPs become a part owner of the liquidity pool – to the extent of their contribution in relation to the size of the pool.

The reward is determined by the protocol – usually it’s a portion of the trading fee for the LPs. Uniswap system charges traders 3% for direct selling but other platforms like Saddle charge less trading fees for attracting liquidity providers into their pools.

What is impermanent loss?

Though the AMM model offers better stability and returns, there is a risk of impermanent loss – a temporary loss experienced by liquidity providers because of volatility in the liquidity pool assets. In simple terms, if the liquidity provider had held onto the asset, without providing it as a liquidity to the pool, the individuals would have had more money/value. But impermanent loss is a temporary situation as the AMMs regulate the price closer to market, eventually.

Automated Market Maker (AMM) Variations

In Vitalik Buterin's initial post asking for automated or on-chain cash markets, he stressed AMMs must not be the only readily available alternative for decentralized trading. Rather, there needed to be several ways to trade tokens considering that non-AMM exchanges are crucial to also maintaining AMM prices accurate. What he did not predict, however, was the growth of different methods to AMMs.

The DeFi ecosystem continues to evolve quickly. Some of the dominant AMM models are:

  • Uniswap's introduced technology permits customers to produce a liquidity pool with any pair of ERC-20 tokens with a 50/50 ratio and is one of the most long-lasting AMM models on Ethereum.
  • Balancer stretches the limits of Uniswap by enabling individuals to produce vibrant liquidity pools of as much as 8 different properties in any proportion, hence broadening AMMs' adaptability.
  • Saddle focuses on creating liquidity pools of comparable assets such as stablecoins, and as a result, provides some of the most affordable prices and reliable rates while solving restricted liquidity.

Although Automated Market Makers harness a brand-new innovation, iterations of it have already shown themselves as an indicator of industry development and an essential monetary instrument in the fast-evolving DeFi ecosystem.

The future of AMMs

AMMs were originally developed in 2018, but they now form a key component in DeFi ecosystems. The earlier versions also included software for automation for liquid services and liquidity providers.

AMM provides more value for the various token types and greater liquidity for all stakeholders. It helps create and strengthen an increasingly stable and mainstream market and therefore AMMs are eventually the gateway to attract investors.

Innovation in this space requires the highest level of security and DeFi is already undergoing a new wave of development.


Thank you guys so much for reading this article. We hope that you enjoyed it. If you liked this article please consider subscribing to our newsletter and most of all, we hope you will check out the Saddle dApp and enjoy our low slippage platform 🤠

Learn more about Saddle

Swap and farm on the dApp

Join the community and earn SDL