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

  • US Official: Ukraine Agrees to Avoid Strikes on Non-Russian Tankers and Black Sea Oil Facilities

    On August 8, according to a US official, Ukraine has agreed not to target certain non-Russian tankers and Black Sea infrastructure vital to Kazakhstan's crude oil exports. This follows ship attacks last month that caused loading disruptions. The US official said Ukraine has set up contact points so commercial shipping companies can communicate information and ensure safe passage. The commitment was reached after meetings between senior US government leaders and Ukrainian leadership, marking a potentially significant step toward increasing regional oil shipments. Previously, activity in the region had cooled significantly due to several recent attacks near the Caspian Pipeline Consortium terminal in Russia's Novorossiysk. (Jin Shi)

  • U.S. July Nonfarm Payrolls Fall by 23,000, Missing Market Expectations

    On August 7, U.S. nonfarm payrolls decreased by 23,000 in July, compared with market expectations of an increase of 80,000, and the previous value was an increase of 57,000.

  • US May and June Nonfarm Payroll Additions Revised Down by 103,000 Combined

    On August 7, the US Bureau of Labor Statistics: May nonfarm payroll additions were revised down from 129,000 to 63,000; June nonfarm payroll additions were revised down from 57,000 to 20,000. After the revisions, the combined additions for May and June were 103,000 lower than previously reported.

  • U.S. Rate Futures Market Sees Lower Odds of Fed September Hike

    On August 7, the probability of a Fed rate hike in September as priced by U.S. interest rate futures declined.

  • New York Gold Futures Top $4,400 per Ounce

    New York gold futures topped $4,400 per ounce, up 2.36% on the day.

  • Japan Finance Minister: FX Market Affected by Moves Not Driven by Actual Demand

    Japanese Finance Minister Satsuki Katayama said she and U.S. Treasury Secretary Bessent agreed that the foreign exchange market has been affected by moves not driven by actual demand.

  • BTC Breaks Through $65,000

    Market data shows BTC has broken through $65,000, currently reported at $65,007.44, with a 24-hour increase of 0.6%. The market is highly volatile, please exercise risk control.

  • Brent Crude Drops 2.00% Intraday to $81.07/Barrel

    Brent crude oil fell 2.00% during the day, now at $81.07 per barrel. (Jin Shi)

  • Trump: Data Centers May Be More Important Than Oil

    August 7 news, U.S. President Trump said in an interview with Punchbowl News, "I saw the other day that Texas seems to be opposed to building data centers. I think that's a mistake. I'm not taking a position—I just think it's a mistake, because there are other communities that want to build data centers. When a community is willing to accept data centers, it means a lot of money will flow into that community. I don't think they're ugly. Some of the data centers I've seen are the most incredible buildings I've ever seen. They are very important to the economy. If Texas says no to data centers, that's a mistake, because data centers may be more important than oil."

  • Trump to Meet with Mining Executives

    On August 7, according to CCTV International News, US President Trump will convene executives from some of the world's largest mining companies at the US State Department on August 7 local time, in an effort to take action to 'secure critical mineral supplies for the US and its allies.' Reuters reported that the US urgently needs critical minerals to replenish weapons inventories depleted during the war against Iran. During the more than five-month war with Iran, the US military expended large quantities of precision-guided missiles and air defense interceptors. US defense officials and lawmakers have warned that given existing production capacity constraints, replenishing some stockpiles could take years—although the Trump administration has denied reports of a so-called 'severe shortage of ammunition stockpiles.' According to Pentagon officials and defense companies, supplies of minerals such as rare earths, tungsten, germanium, and scandium are essential for manufacturing precision-guided missiles, fighter jets, armored vehicles, infrared sensors, and other advanced weapons systems. Expected attendees include industry giants such as global mining giant Rio Tinto Group, Australia's BHP, US Freeport-McMoRan, US Mountain Pass Materials, US Rare Earths, US Energy Fuels, and Canada's Metals Company. According to sources, the Trump administration plans to announce multiple deals and memorandums of understanding.