What is AMM

AshSwap
AshSwap
Published in
3 min readAug 9, 2022

What Is an Automated Market Maker?

Automated Market Makers (AMMs) allow digital assets to be traded automatically and without permission through liquidity pools. Unlike the traditional transaction between buyers and sellers, AMM users provide liquidity to the pools with their crypto tokens, and constant mathematical formulas determine their price.

Different AMMs will use different math formulas to set their prices depending on their aim.

How does AMM work?

AMM has trading pairs and works almost like the order book exchange, but the difference is when you use AMM, you are trading with a smart contract (SC), where your transactions proceed automatically, also known as peer-to-contract (P2C). By this mechanism of operation, when trading, users do not need a partner to make transactions with them, but smart contracts will create a market for you.

If there is no relationship between buyer and seller in AMM, how do we find out the exact price for the asset the user is trading?

AMM will use mathematical formulas to help determine the price; there are currently many different types of formulas, from simple to complex, generated from many AMMs operating in the market.

For example:

Uniswap is one of the parties that has a simple price formula: x * y = k

Where x is the number of tokens in the liquidity pool, y is the number of tokens, k is a fixed constant, and the pool’s total liquidity is always the same.

What is a liquidity pool?

A liquidity pool is a crowdsourced pool of tokens or cryptocurrencies locked in a smart contract that is used to facilitate trades between the assets on a decentralized exchange (DEX). It creates liquidity for transactions with the help of automated market makers (AMMs), which allows digital assets to be traded in an automatic and permissionless way.

People who provide their tokens to the liquidity pools are called liquidity providers (LPs). LPs will receive LP tokens when providing liquidity to the pool, and that amount of LP tokens can be used in many ways on a DeFi protocol.

Some famous names using liquidity pool mechanisms are SushiSwap and Uniswap running on the Ethereum network, PancakeSwap on BNB Chain and AshSwap on the Elrond network.

What is impermanent loss?

When you provide liquidity to a liquidity pool, the price of your deposited assets changes compared to their price when you deposit them; that’s when impermanent loss (IL) happens. The more significant this change is, the more you are exposed to IL. However, it is the potential loss on paper that exits, and it only becomes “real” when you withdraw the tokens from the liquidity pool.

Summary:

AMMs are automatic market makers, allowing you to execute transactions automatically and permissionless, and the price of tokens will be determined based on mathematical formulas.

AMM has become a hugely important piece of the puzzle and brings a lot of value to the DeFi market. Thanks to the operation of AMM in combination with other components such as liquidity pools, yields farming, and LP staking, it has helped DeFi provide more exciting solutions for users.

To know more about the DeFi world, let’s look at our DeFi 101 Series.

About Ashswap

AshSwap is the first decentralized exchange built on the Elrond blockchain that allows users to trade between stable assets with high volume and small slippage. As Elrond grows to become the infrastructure of DeFi, more types of stablecoins will flow in, and users will need a place to swap them.

Check out our social channels:

--

--