Automated Market Makers(AMM): DeFi through Proper Decentralization

Sai
Shunya
Published in
3 min readJul 7, 2022
Automated Market Making

After the emergence of DeFi or Decentralized Finance, we began to avail ourselves of crypto-based financial services like borrowing, investing, lending, etc. However, the technology was novel, risks were new, and the interface was complicated, resulting in very few crypto traders and limited liquidity.

That was when we traded crypto-like we did gold, stocks, or oil. If we wanted a trade, we had to use order books and rely on a third party or a market maker to match what we had with what we wanted at an agreeable rate.

However, Automated Market Makers stirred a wave of revolution in the crypto space. It creates a market through smart contracts, automatically facilitating trade via an algorithm against a pot of tokens or liquidity pools. Therefore, AMM protocols are decentralized, independent of buyer-seller interaction, and available 24x7.

How Does an AMM Work?

Suppose I want to exchange 1 ETH for DAI through AMM Uniswap. Here, Uniswap will calculate an exchange rate after considering the amount of ETH and DAI tokens in its liquidity pool.

A liquidity pool is a bowl of tokens liquidity providers lend to the AMM protocol. A liquidity pool of Uniswap has two ERC-20 tokens. Here, Uniswap links the value of the tokens in the pool, which determines their price and exchange rate.

For instance, let there be 20 ETH and 40,000 DAI in Uniswap’s ETH-DAI pool. So, 1 ETH will be worth 2,000 DAI (Consider X as ETH & Y as DAI value of 1 X in Y would be Y/X 40000/20 = $2000). In other words, at any time, the ratio of the value of tokens remains 1:1. Therefore, each token swap/trade leads to price adjustments.

So, the exchange rate, in this case, is 1 ETH = 2,000 DAI. If I accept this, the trade will occur instantly, and I’ll get 2,000 DAI minus the transaction fee for 1 ETH. Therefore, protocols like AMM Bancor, Uniswap, Sushiswap, or Curve Finance automatically complete the trade through the liquidity pool without dependency on maker makers & order books which is very hard to maintain on the blockchain.

Incentivizing Liquidity Providers

AMM protocols incentivize liquidity providers or those who lend tokens to the liquidity pool. Suppose I’m a liquidity provider. I’ll lend my cryptocurrencies to an AMM protocol, and I’ll receive interest in the form of transaction fees or other rewards. This is called yield farming.

First, I’ll receive a proportion of the transaction fee generated when others trade using it. For instance, Uniswap charges a 0.05% — 1% transaction fee for each trade and divides it among all liquidity providers in proportion to the lent tokens.

Second, I’ll receive rewards in the form of the governance token of the respective AMM crypto protocol. For example, curve.fi rewards liquidity providers with CRV according to their contribution to the pool.

Summing It up

Some time ago, limited liquidity hindered smooth decentralized exchanges. With AMM crypto protocols, a new era of instant liquidity began. We can use AMMs to trade cryptos on decentralized marketplaces without a counterparty. As a result, automated market maker protocols can dramatically expand crypto trading flexibility and DeFi. Therefore, AMMs will be critical in laying the groundwork for future crypto trading.

If you are you liquidity provider(LP) in AMMs like Uniswap, Curve, Sushiswap & Pancakeswap Shunya might be helpful in tracking your Impermanent losses, P&L of individual positions, rewards & live positions.

About Shunya

Shunya is an investor-focused DeFi deep analytics platform. Our goal is to simplify DeFi experience and help investors grow with informed decisions.

We’re a team with a very diversified background in engineering, entrepreneurship & marketing. We love talking about web3, finances, food, health & pets.

Follow us on

Website | Twitter | Discord

--

--