Looking for other articles?

What is Automated Market Maker (AMM)?

What is Automated Market Maker (AMM)?

September 4, 2023

Automated Market Maker , as known as AMM, is the basic algorithmic behind decentralized exchange for all crypto users to buy and sell digital assets in DeFi. This algorithm is built to replace a traditional order book in which your order will match only if you have the otherside order at the same price and most of the traditional order book is a counterparty company. 

In AMMs, you will trade against your liquidity pool by users who provide liquidity in the DeFi platform where everyone can be a liquidity provider not only a big company as in the traditional way which means there’s no man in the middle.

What is AMM and How does it work?

What is AMM and How does it work

What is AMM?

AMM or Automated Market Maker is made from the idea that users can initiate their trade directly from a non-custodial wallet without any counterparty in traditional finance. Let’s explain this a little bit more, users in traditional finance are familiar with order books by matching the order they want with a specific price in the system and sometimes you have to wait until someone placed the order against yours 

For instance, you placed a buy order at $1 and you need to wait til someone placed a sell order at $1 as well. Sometimes you don’t have any users to sell orders at that price but the Market Makers will provide it to you no matter what. That means your trades rely on the middleman which they were accused of market manipulation. 

However, AMMs have different processes to trade in digital assets. It is built by using smart contracts. The price of digital assets and liquidity come from users who are willing to provide the liquidity pair to the pool. All users can buy or sell with low fees and quickly open or close any position without any concern from some action made by the market maker. That’s the reason why AMMs were built – to solve the problem of action from market makers.

How does AMM work?

How AMMS work

Inside AMMs algorithm, it is built by smart contracts and processes with mathematical logic behind. The first process of AMM is providing a liquidity pool which it needs users to provide pair assets by depositing both assets to support users demand. For instance, you need to trade ETH/USDT whether to buy or sell. The liquidity provider needs to deposit both ETH and USDT in this pool at the same value of price at that time etc.

To keep those assets in the liquidity pool work it well and balance as much as possible. We used a math equation as a preset to automate it. For instance, Uniswap use x*y=k where x is the value of asset “A”, y is the value of asset “B” and k is a constant. This equation will stabilize both asset A and B to keep it equal in the same number.

Let’s explain this in the ETH/USDT pool with Fig-1 below. Users want to buy ETH, they have to add USDT to the pool in exchange for ETH. From this action, the pool will eliminate some of ETH equal to the value of USDT at that time and the amount of ETH in the pool will decrease but the price of ETH will increase followed by math equation logic which we mentioned above and the pool will be balanced again. 

On the other hand, users buy USDT which means the price of ETH will decrease and amount of ETH will increase while the amount of USDT will decrease.

What are Liquidity Pools and Liquidity Providers?

What are Liquidity Pools and Liquidity Providers?

Liquidity refers to the flow of money inside and it will be the factor of all professional traders, investors and even some regular users to tell them how easy of assets that can be converted into the others. In AMMs, liquidity comes from Liquidity Pools where users deposit their assets into the pools and those users are known as Liquidity Providers.

Liquidity is the important part of AMMs algorithm. If we don’t have much liquidity in the pools, it will cause them the gap of price impact when they buy or sell which leads to capital inefficiency and impermanent loss which we will describe in the next section. To prevent that problem, AMMs will provide them a reward by dividing their revenue to liquidity providers and we call this play as yield farming which you as a LP will be defined as a digital farmer.

What is Impermanent Loss?

What is Impermanent Loss?

As we mentioned above about Impermanent loss, it is the risk of AMMs by depositing into liquidity pools. It occurs when the market volatility and price of assets fluctuate very fast. The impermanent loss refers to the loss from providing liquidity to the pool which compares to just holding assets and doing nothing. The larger the gap is, the bigger the Impermanent loss will be.

So, be careful to deposit your funds and provide liquidity to the DeFi platform. Even if the loss isn’t permanent yet because you haven’t converted LP into the original fund, you need to understand this risk before becoming a digital farmer.

Difference between AMMs and Order Books

Difference between AMMs and Order Books

We have explained the meaning of AMMs above which is the different way to manage liquidity on the platform but another way to manage liquidity is Order Books. Order Books are the basic liquidity management in every Centralized Exchange which displays the record order that contains almost every price range. 

That’s why traders or investors can place their order at a specific price which is convenient for them. They can place their order and do things by letting order books automatically do its work. Anyway, most of the liquidity comes from sophisticated actors known as market makers. That means most of the liquidity by this mechanism is controlled by them. In AMMs, liquidity is controlled by a math equation based on demand and supply in the system.


In a world increasingly embracing decentralized finance, Automated Market Makers (AMMs) are at the forefront of innovation. They have disrupted the traditional order book model by allowing users to trade directly from their wallets, eliminating the need for intermediaries and counterparty companies. AMMs, with their smart contract-driven algorithms and liquidity pools, have opened the doors for anyone to participate as a liquidity provider, democratizing the DeFi landscape.

Liquidity pools and providers play a crucial role in the stability and efficiency of AMM, offering rewards through yield farming. However, users must be aware of the concept of impermanent loss, which can affect their returns when providing liquidity.

In contrast to the traditional order book system, where market makers often control liquidity, AMMs rely on mathematical equations driven by supply and demand. This key difference empowers individual users and fosters a more inclusive and decentralized trading environment.

As crypto and DeFi continue to evolve, understanding AMMs becomes essential for those looking to navigate this exciting and disruptive landscape. The AMM revolution is here to stay, offering a glimpse of a future where financial intermediaries are no longer the gatekeepers of asset trading.