Instead of relying on banks and big institutions, Automated Market Marker allows users to become liquidity providers in return for passive income from the trading fees.

One of the most prominent features of the crypto space is decentralization. The industry has grown so much in the past few years partly because of its ability to eliminate the need for third parties in financial transactions and contracts. Decentralized exchanges (DEXs) are obvious proof of that notion because they are built on top of blockchains and able to operate in a decentralized manner. This is marketed as an excellent solution to make trading easier and faster than the traditional centralized exchanges (CEXs).

Automated Money Marker (AMM) in DeFi

There are many types of DEXs that you can choose; each has specific functionalities and purposes. The most common type is called Automated Market Maker (AMM). One of the earliest adoptions of AMM was on Uniswap and then followed by many other decentralized platforms like SushiSwap, PancakeSwap, and Pangolin. So, what makes the AMM system so popular?

 

Defining Market Maker

Before we dive into the AMM system, we need to understand the concept of market maker first. Market makers are basically liquidity providers, so their job is to add liquidity for trading pairs on centralized exchanges and benefit from the bid-ask spread.

Meanwhile, centralized exchanges are responsible for being the middleman for each transaction between traders and ensure that every order is matched accordingly. So to put it simply, if a trader wants to buy 1 Bitcoin (BTC), the exchange must find another trader who is willing to sell 1 BTC at the rate quoted by the buyer. The issue here is when the exchange cannot find the perfect match for the order.

Such a situation is very common in asset trading, especially when the market liquidity is low. It means that there is less activity in the market, so it's harder to purchase or sell an asset. Combined with high volatility, this condition can produce slippages, which are not great for traders. Hence, the exchange needs to rely on market makers to provide liquidity. This way, the exchange can ensure that every order will find a match and can be executed with minimum slippage.

 

Introduction to Automated Market Maker (AMM)

Unlike centralized exchanges, DEXs aim to remove any form of intermediary in crypto trading. So, instead of using custodial infrastructure where the exchange holds all of its users' private keys, AMM-based DEXs provide higher autonomy by allowing users to take full control over their private keys and trade directly from non-custodial wallets.

Moreover, this system is also different than the traditional order-book DEXs. The AMM system replaces the need to store data in order books with smart contracts. This new protocol is able to create liquidity pools from the smart contracts to automatically facilitate and execute the coming orders. The liquidity itself is provided by other users who can collect passive income through trading fees based on their share percentage on the pool.

With that being said, users on AMM platforms don't actually trade with each other. Instead, they trade against the pool of tokens or the liquidity pool. Simply put, a liquidity pool is a shared pot of digital tokens. Users supply tokens to add liquidity and other users can use the tokens for many different purposes. The price of tokens in the pool is determined by a mathematical formula. The following formula is the most common one and it is popularized by UniSwap:

x y = k

The "x" represents the value of asset A in the pool, "y" represents the value of asset B in the pool, and "k" represents the constant. Essentially, it means that the liquidity pool always maintains a constant balance of assets that determines the price of those assets in the pool.

For example, if a user buys 1 ETH from the ETH/USDT pool, the price of ETH will go up because there is less ETH in the pool. Conversely, the price of USDT will fall as there is more USDT in the pool. This shows that the pool will always stay in constant balance and the price of the tokens will follow the curve from the formula. If the AMM price moves too far due to large orders, the model will encourage the traders to take advantage of the price discrepancies between the AMM price and the actual market price until it is balanced again.

 

Generating Passive Income from Yield Farming

Anyone can participate in the AMM system as long as they meet the requirements stated on the smart contract. This opportunity is called yield farming and it has become quite popular these days.

To become a liquidity provider, the investor simply needs to supply some tokens into the liquidity pool. Remember that they must provide both assets represented in the pool, so if it's an ETH/USDT pool, the provider must deposit both ETH and USDT. In return, they will get rewards from the trading fees paid by investors who interact with the liquidity pool. The biggest advantage is that most yield farming pools don't require a minimum lock-up period, so users can add liquidity whenever they like. Other than that, the yield itself can go pretty high depending on the liquidity and volatility of the trading pair.

 

The Risk of Impermanent Loss

Impermanent loss can occur if the price ratio of the pooled assets fluctuates. The bigger the shift in price, the higher the loss might be. This is particularly common in pools that represent volatile digital assets.

The good news is that this loss is mostly impermanent because there's always a chance that the price ratio will shift again. It can only be permanent if the liquidity pool withdraws the said assets before the price ratio changes. Keep in mind the potential gains from transaction fees and staking can cover those losses.

In conclusion, the AMM system creates an environment that allows anyone to participate and become liquidity providers. This removes intermediaries in crypto transactions and is able to offer low trading fees and faster executions. It is also beneficial for the liquidity providers as they get a fraction of the fees paid from transactions that happened in the pool. All in all, the AMM system is a great alternative to try in the DeFi space, but it's always important to be careful and make sure to understand the terms and conditions before you start.