Cointime

Download App
iOS & Android

Automated Market Makers (AMM): Facilitating Trades in DeFi

Validated Project

Key Takeaways:

  • An automated market maker is a model that offers liquidity in decentralized finance.
  • It facilitates automated trading of cryptocurrencies through liquidity pools instead of traditional order books. 
  • The model incentivizes crypto users to become liquidity providers in return for a share of transaction fees. 
  • Kyber Network, Uniswap, Balancer, Curve, and Bancor are the common AMM protocols.

Decentralized finance (DeFi) has emerged as one of the most innovative landscapes in web3. The introduction of decentralized exchanges (DEXs) has democratized the mainstream adoption of crypto and contributed to new and revolutionary methods of accessing financial products and services with automated market makers (AMM) being among the numerous ways that were initially impossible. 

Traditionally, the intermediary holds the sovereign power to either serve or deny you financial products and services, and they also serve as custodians of the funds deposited with them. In recent times, due to the mismanagement of user funds, there has been a demand for these exchanges to share their Proof of Reserves. 

This leads to the biggest appeal of DeFi: there is no such centralized institution. Instead, the decentralized setup works through peer-to-peer interaction, letting you access various financial products and services, such as borrowing, lending, staking, etc., in the crypto space without an intermediary or custodian.

This article digs deep into automated market makers, how they work, liquidity pools and liquidity providers, types of automatic market makers, and the risk of impermanent loss. 

What are Automated Market Makers? 

Suppose you are a farmer and you want to sell your produce. Who do you sell to? A buyer, of course. Now, suppose you are a consumer who wants to purchase some vegetables for use. Who do you buy from? A seller, who may or may not be a farmer. In this case, let’s think of a conventional method of buying and selling the farm produce. 

Delivering the vegetables directly to the consumers would involve complex planning and logistics. After all, packaging, transporting, storing, shipping, and taking payments from individual consumers requires more labor and time. Besides, these steps can be an additional financial burden on the farmer. So, how do the farmers sell their produce without involving all the above steps? The answer is intermediaries. These middlemen buy the produce from farmers in bulk, run the intermediate processes, factor in their profit, and sell it to end consumers like you and me.  

The primary objective of an AMM in crypto is to offer much-needed liquidity. Think of a farmer who has harvested a bumper crop but has nobody to sell to, or a consumer who wants to buy farm produce but has no direct access to farms! Market makers ensure the smooth buying and selling of cryptocurrencies in DeFi. 

An AMM is a crypto trading method that works autonomously to incentivize cryptocurrency users to become liquidity providers (LPs) in return for a portion of the transaction fees and/or the distribution of the protocol’s native token. The makers remove the need for intermediaries and traditional market-making mechanisms, such as order-matching systems and other custodial methods. 

How it works: a cryptocurrency AMM provides liquidity autonomously through smart contracts. LPs provide liquidity by locking assets into these self-governing contracts, while DEX buyers and sellers trade against this liquidity and pay transaction fees. DEXs then share the accumulated transaction fees with the LPs based on LPs’ token shares in the pools. 

How do AMMs Work?

The primary role of an AMM is to facilitate the smooth trading of crypto in DeFi without the use of order books. Moreover, though AMMs have trading pairs, there are no counterparties with matching offers. Instead, they leverage smart contracts to regulate liquidity pools and ensure seamless trading. 

Basically, a liquidity pool comprises two cryptocurrencies in the form of a trading pair, for instance, BNB and BUSD. AMMs use algorithms to control the value of assets in the pools and conform to the market prices of the assets. The standard formula used by most DEXs is:

X is the amount of asset A, Y is the amount of asset B, and k is the fixed constant. The formula fundamentally ensures the total liquidity in a pool remains the same and lets smart contracts regulate the pair’s price ratio. For example, when a trader purchases BNB (paying with BUSD) from a BNB-BUSD liquidity pool, the amount of BNB in the pool reduces while the amount of BUSD increases. The pool’s algorithm adjusts the pair’s price ratio according to the market valuation, maintaining the x*y = k formula. Some DeFi protocols, such as Curve, utilize more complicated formulas, but the concept remains the same.

Liquidity 

As mentioned, the main role of AMMs is to provide liquidity in DeFi. So, how does an AMM obtain liquidity? The standard method incentivizes crypto investors to deposit assets in a liquidity pool in return for a portion of the generated transaction fees. Any crypto investor from any part of the world can lock them in a given pool and start generating passive returns. 

Recently, DeFi protocols like Olympus have emerged, which strive to establish “protocol-based liquidity” solutions. They are part of the emerging trend known as DeFi 2.0. Indeed, creating high liquidity is essential for the mainstream adoption of DeFi as it reduces the price slippage brought by big trades. 

Slippage

Slippage is a sudden change in the price of a token caused by a big trade. 

Slippage does not only affect AMM protocols – it can also affect order book exchanges. But AMMs are more vulnerable to slippage as their price-adjusting algorithms rely on the ratio between the tokens in a pool. As such, higher liquidity implies minor price swings. You can also mitigate slippage via the protocol itself. For instance, Curve Finance focuses on like assets; such as pools featuring stablecoins like USDT and USDC, or only wrapped bitcoin tokens. This reduces the risk of impermanent loss since the assets in the pool are all trending towards the same price, and the lower fluctuations also result in a smaller fee and a lower risk of slippage due to the low price volatility of the tokens in the pool. 

Impermanent Loss 

Another problem plaguing the AMM mechanism is the risk of impermanent loss, which adversely affects LPs. Impermanent loss is when an asset’s price change causes your assets in a liquidity pool to be worth less than the original value deposited. It’s impermanent since you can recover the loss if the token pair regains the initial market price. The CoinGecko Impermanent Loss Calculator makes it easy for LPs to calculate impermanent losses when they offer liquidity. 

Locking assets in a pool is mainly incentivized by the opportunity of yield farming through the transaction fees accumulated by the pool. But due to impermanent loss, liquidity provision is sometimes less profitable. Besides, the AMM algorithm only balances the values of token pairs. This means the same assets can have different market prices; hence, withdrawing them from the pool could bring you losses. However, by refusing to cash out your funds – with a view of waiting for them to regain their initial price – you may hinder your ability to explore other lucrative opportunities. 

Examples of AMMs

There are two primary types of AMMs in crypto. First, there are AMMs created and controlled by professional market makers. Secondly, some AMMs are completely automated through algorithms, enabling any crypto holder to participate by locking assets into smart contracts. With that in mind, we will discuss the five common AMM protocols. 

Kyber Network 

Kyber Network was one of the first AMMs to utilize automated liquidity pools in 2018. The Kyber team or specialist market makers deploy Kyber’s liquidity pools. Unlike other makers, like Uniswap, the Kyber pools have limited access. External oracles or smart contract features regulate the prices of the assets in the pools during setup.  

Uniswap

Uniswap was the first DEX to embrace decentralized AMMs in 2019. It lets anyone run a liquidity pool on the protocol and allows any crypto investor to contribute liquidity. Unlike Kyber Network, token prices in Uniswap liquidity pools are not configured or controlled. Instead, the token prices are based on the balance ratio between the assets.   

Balancer 

Balancer is a newer protocol with unique features, unlike the above two protocols. It works similarly to Uniswap but provides more dynamic features, enabling it to have more applications besides acting as a simple liquidity pool. For example, it supports custom pool ratios, multi-asset pools, and dynamic pool fees. Multi-asset pools function as an index in crypto and act as a distinct feature of Balancer.  

Curve 

Curve is among the newest AMM protocols in the DeFi space. It launched in 2020 and contains admin-only-based liquidity pools. Anyone can contribute to the pools, and they only support stablecoins. The protocol regards its decision to support only stablecoins as a feature and not a hindrance. By supporting stablecoin-only or wrapped-coin-only pools (e.g. WETH/ETH or WBTC/SBTC), Curve can handle big trade requests effectively with minimal slippage.   

Bancor 

You can offer liquidity to a Bancor pool using one token and maintain 100% exposure to the asset. This is unlike other AMM protocols that require you to maintain exposure to many tokens. With single-token-based liquidity, you can stay long on an asset and qualify for “HODL” returns while earning transaction fees. The fees auto-compound in the pools and are paid in the staked assets. 

Conclusion

As DeFi goes mainstream, you can anticipate more innovations to further democratize financial products and services. The core objective of web3 is to empower people to be their own banks. AMMs will continue to play their role in creating utilities to offer permissionless access to finance beyond limits. Indeed, the future of decentralized finance is quite exciting!

Comments

All Comments

Recommended for you

  • Matrixport: Solana’s funding rate is currently as high as 70% annualized, and a price correction may occur

    According to a report, Matrixport has released a chart today stating that Grayscale has submitted an application to convert Solana Trust into a spot ETF. Although the current asset management scale of the product is relatively small at $134 million, if approved, it will set an important market precedent for other ETF issuers. It is important to note that Solana's financing rate is currently as high as 70% annualized, which creates significant pressure on leveraged long positions. Historical experience shows that similar high financing rates are often related to price corrections, as was the case in March of this year when the SOL-USDT price fell under similar financing rate backgrounds.

  • Japanese Prime Minister Shigeru Ishiba is cautious about separate taxation of cryptocurrencies and approval of ETFs

     Japanese Prime Minister Shizuo Shima expressed caution about the unified 20% separate taxation rule for cryptocurrency in a representative issue at a plenary session of the House of Representatives. "Is it appropriate to encourage investment in cryptocurrency such as stocks and investment trusts that have investor protection regulations? Will the public understand the idea of applying separate self-assessment taxation? There are several issues that need to be resolved. We need to consider it carefully." At the same time, "whether cryptocurrency should be included in ETFs depends on whether cryptocurrency is an asset that needs to be made more easily accessible to the public."

  • AI computing economy layer GAIB completes $5 million seed round of financing, led by Hack VC, Faction VC and Hashed

    GAIB, an AI computing economic layer, announced the completion of a $5 million seed round of financing, with Hack VC, Faction VC, and Hashed leading the investment. Other participating investors include Spartan, Animoca Brands, MH Ventures, Aethir, Near Foundation, Chris Yin from Plume Network, and Lucas Kozinski from Renzo Protocol.

  • Cadenza, an investment institution focusing on blockchain and AI, has raised $50 million for its early-stage AI venture capital fund

     Cadenza, a risk investment company focusing on blockchain and artificial intelligence, announced that its early AI venture capital fund has raised $50 million. The new fund will focus on seed and pre-seed investments, with a focus on infrastructure and enterprise applications. Cadenza's investment portfolio in the Web3 field currently includes: Web3 infrastructure Validation Cloud, Malaysian digital asset exchange Hata, Web3 API platform Uniblock, L1 blockchain Linera, and encrypted wallet application Zulu.

  • Union Completes $12 Million Series A Funding, Led by Gumi Cryptos Capital and Others

    cross-chain settlement layer Union has announced the completion of a $12 million Series A financing round, led by Gumi Cryptos Capital and Longhash Ventures, with participation from Borderless Capital and Blockchange, as well as blockchain founders from Polygon, Movement, and Berachain. The funding will be used for core team expansion, partner integration, and ecosystem development.

  • Russia sentences Hydra market founder to life in prison

     Stanislav Moiseev, founder of the online black market and cryptocurrency mixing service Hydra, has been sentenced to life imprisonment by a Russian court.

  • Portal Ventures raises oversubscribed $75 million crypto fund

    , Portal Ventures, a cryptocurrency venture capital fund before the seed round, raised a $75 million cryptocurrency fund with oversubscription, supported by Chris Dixon and Marc Andreessen.

  • South Korea's ruling party may ask Yoon Seok-yeol to quit the party and propose the resignation of the entire cabinet and the dismissal of the defense minister

    According to multiple media reports on December 4th, the ruling party of South Korea, the National Power Party, held an emergency meeting to discuss the measures to be taken after President Yoon Seok-yeol announced the lifting of martial law. Several attendees stated that they had reached a certain consensus on issues such as demanding Yoon Seok-yeol's resignation from the party, the resignation of the entire cabinet, and the dismissal of the Minister of Defense. Prior to this, Han Dong-hoon, a representative of the ruling party, stated that the president's decision to declare a state of emergency was wrong.

  • Asian Equities Strong, CNH Falls Amid Tariff Threat and China Economic Work Conference Expectations

    Several Asian countries, including Indonesia, Japan, Pakistan, South Korea, Taiwan, and Thailand, experienced gains of over 1% in their equities. The offshore traded renminbi fell against the US dollar early in the trading day, which could be due to President Trump's recent tariff threat or the Euro's rough outing. The Hang Seng and Hang Seng Tech indexes rose in Hong Kong, with energy and financials leading the gains. The US government added more than 130 foreign companies to its "Entity List," which requires additional licensing, and 22 Chinese provinces have announced plans to refinance RMB 1.673tn of hidden debt. Copper and steel prices gained while treasury bond prices fell.

  • DeFi TVL exceeds $95 billion again

    According to defillama data, as of May 18, 2024, the total value locked (TVL) in DeFi has once again surpassed $95 billion. It is currently reported at $95.069 billion, an increase of nearly $12 billion from the low point of $83.04 billion 35 days ago. Among the top five protocols in terms of TVL, Eigenlayer has the highest 30-day increase, with TVL rising by 19.67% to a total of $15.455 billion.