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

  • Rune DOG•GO•TO•THE•MOON ranked first in transaction volume in the past 24 hours

    According to Ord.io on social media platform, the top 5 trading volumes for runes in the past 24 hours are:

  • CARV announces completion of $10 million Series A financing, with OKX Ventures participating

    CARV announced the completion of a $10 million Series A financing round, led by Tribe Capital and IOSG Ventures. Consensys, OKX Ventures, Fenbushi Capital, No Limit Holdings, Draper Dragon, Arweave, ARPA, MARBLEX, and others participated in the round. The aim is to build the largest modular data layer for gaming and artificial intelligence, and to maximize data innovation while ensuring that individual users can derive value from internet sharing.Jeff Ren, partner at OKX Ventures, said, "CARV's revolutionary approach is reshaping the way we manage decentralized data. Its modular cross-chain protocol and ID aggregation solution cultivate data sovereignty and integrity while emphasizing security and efficiency. We are excited about this collaboration and look forward to seeing how OKX Web3 products can better collaborate with CARV's advanced cross-chain data layer."

  • El Salvador's official Bitcoin wallet refutes rumors it was hacked

    Salvadoran official cryptocurrency wallet Chivo Wallet denies reports that its source code and over 5 million user data related to KYC procedures have been hacked. The wallet's management department clarified that its data security has not been compromised and the leaked data did not come from their system.

  • Franklin Templeton Tokenizes $380M U.S. Treasury Fund on Polygon and Stellar

    According to Cryptoslate, Franklin Templeton tokenized a $380 million US government bond fund on the Polygon and Stellar blockchains to enable peer-to-peer (P2P) transfers without intermediaries.The company launched the Franklin on-chain US government money fund (FOBXX) in the form of BENJI tokens. Each token represents a portion of FOBXX and can be traded on public Polygon and Stellar blockchains. This innovation aims to simplify transactions and expand access, allowing investors to manage their assets more flexibly through direct trading.Franklin Templeton is incorporating blockchain technology into its financial operations to enhance asset management liquidity and efficiency. The company is responding to the growing demand of financial institutions by integrating traditional financial structures with modern technological solutions.

  • UK law enforcement agencies can now confiscate crime-related crypto assets without conviction

    The UK Home Office announced in a press release on Friday that new powers to seize cryptocurrencies used in crimes have come into effect. The Home Office stated that due to these new regulations, police in the country will no longer need to make an arrest before seizing cryptocurrency holdings, making it easier to seize assets known to have been obtained through criminal means, even if seasoned criminals are able to protect their anonymity or are located overseas.

  • DePIN project Natix completes $4.6 million financing

    DePIN project Natix has announced the completion of a $4.6 million financing round, led by Borderless Capital and Tioga Capital, with participation from Laser Digital, Big Brain Holdings, Escape Velocity, IoTeX, WAGMI Ventures, Moonrock Capital, under Nomura Securities (Nomura), as well as a group of angel investors. Natix is a DePIN project focused on map data, and is reportedly about to release tokens and airdrops on Solana.

  • Movement Labs raises $38m to enhance Ethereum ecosystem with Facebook's Move Virtual Machine

    San Francisco-based blockchain development team, Movement Labs, has raised $38m in Series A funding led by Polychain Capital and featuring participation from a range of investors. The funds will be used to bring Facebook’s Move Virtual Machine to Ethereum, addressing smart contract vulnerabilities and enhancing transaction throughput. Movement Labs aims to tackle smart contract vulnerabilities within the Ethereum ecosystem while introducing a novel execution environment designed for 30,000+ transactions per second.

  • Modular Data Layer for Gaming and AI, Carv, Raises $10M in Series A Funding

    Santa Clara-based Carv has secured $10m in Series A funding led by Tribe Capital and IOSG Ventures, with participation from Consensys, Fenbushi Capital, and other investors. The company plans to use the funds to expand its operations and development efforts. Carv specializes in providing gaming and AI development with high-quality data enhanced with human feedback in a regulatory-compliant, trustless manner. Its solution includes the CARV Protocol, CARV Play, and CARV's AI Agent, CARA. The company is also preparing to launch its node sale to enhance decentralization and bolster trustworthiness.

  • The US GDP seasonally adjusted annualized rate in the first quarter was 1.6%

    The seasonally adjusted annualized initial value of US GDP for the first quarter was 1.6%, estimated at 2.5%, and the previous value was 3.4%.

  • The main culprit of China's 43 billion yuan illegal money laundering case was arrested in the UK, involved in the UK's largest Bitcoin money laundering case

    Local time in the UK, Qian Zhimin appeared in Westminster Magistrates' Court for the first time under the identity of Yadi Zhang. She was accused of obtaining, using or possessing cryptocurrency as criminal property from October 1, 2017 to this Tuesday in London and other parts of the UK. Currently, Qian Zhimin is charged with two counts of illegally holding cryptocurrency. Qian Zhimin is the main suspect in the Blue Sky Gerui illegal public deposit-taking case investigated by the Chinese police in 2017, involving a fund of 43 billion yuan and 126,000 Chinese investors. After the case was exposed, Qian Zhimin fled abroad with a fake passport and held a large amount of bitcoin overseas. According to the above Financial Times report, Qian Zhimin denied the charges of the Royal Prosecution Service in the UK, stating that she would not plead guilty or apply for bail.