Home / Crypto / Learn / What is an Automated Market Maker (AMM)?
Learn 11 min read

What is an Automated Market Maker (AMM)?

Two distinct piles of coins within the same barrel

Key Takeaways

  • Decentralized finance is a significant element of the crypto industry, pioneering the  financial services space through blockchain technology.
  • Decentralized exchanges enable seamless peer to peer trading for DeFi users and Automated Market Makers are one of the key technologies that enable this.
  • AMMs are a type of liquidity pool controlled by a smart contract. They enable trades between specific pairs of currency, and use a formula to maintain balance between these trading pairs.
  • AMMs offer constant liquidity, rewards for liquidity providers, and no KYC requirements, but also come with their own set of risks.

DeFi allows anyone to access financial services even without a bank account, and it’s no surprise the size of the DeFi market has grown to $97,58 billion in 2024. Cryptocurrency trading is the backbone fo the DeFi space, and for this, you need liquidity. This is where  AMMs (automated market makers) come into play.

Automated market makers are exclusive to the crypto ecosystem, and they take a unique approach overcoming liquidity shortages. In this article, we will explore what AMMs are, how they work, and their pros and cons.

What’s an Automated Market Maker Anyway?

An automated market maker is a type of decentralized exchange (DEX) that uses a liquidity pool instead of the traditional order book to facilitate trading. Unlike centralized exchanges which are managed by a real-world company, AMMs are governed by a smart contract.

Further, unlike a centralized crypto exchange, which requires users to deposit their funds into a custodial wallet, AMMs allow users to trade directly from their non-custodial crypto wallets. This means you retain custody of your crypto even as you trade.

AMM vs Order Book – What’s the Difference?

AMMs are just one subcategory of decentralized exchanges. Rather than a liquidity pool, some DEXs use something called an order book system. Order book DEXs use a protocol to match buyers and sellers, but can suffer from issues like low liquidity, high fees, and slippage during times of market volatility. 

AMMs aim to overcome these problems by ensuring constant liquidity and reducing the dependency on external market participants.

How Do Crypto AMMs Work?

AMM diagram

Crypto AMMs operate on a system composed of three key components: protocol based liquidity pools, liquidity providers, and traders. These elements work together symbiotically to create an efficient and decentralized trading environment.

Liquidity Pools

Liquidity pools are the backbone of AMMs, consisting of a smart contract that holds two or more cryptocurrencies in a trading pair. For example, some of the most common trading pairs consist of a stablecoin and a popular coin like ETH/USDT, BTC/USDC, etc.

Automated market makers use the constant product formula to determine the price of assets within a liquidity pool. The most common formula is the “constant product formula”. It is expressed as x×y=k where:

  • x represents the quantity of one token in the liquidity pool
  • y represents the quantity of the other token
  • k is a constant value.

The constant product formula ensures that the pool maintains balance and can always facilitate trades, regardless of the trade size. For instance, if a pool contains ETH and USDT, the constant product formula will adjust the pool’s token ratios to maintain liquidity and enable continuous trading.

Liquidity Providers

Liquidity providers (LPs) are users who contribute their assets to liquidity pools. In return for providing liquidity, LPs receive liquidity provider tokens (LP tokens), which represent their share in the pool. These tokens can be used to redeem their share of the pool’s assets or to earn rewards in the form of fees generated by the trades in the pool.

The fees earned by LPs are typically distributed proportionally based on their contribution to the pool. This system incentivizes users to provide liquidity, ensuring that the AMM can function efficiently.

Traders

Traders are the users who interact with AMMs to buy or sell assets within the liquidity pools. Every time a trade is executed, a fee is charged and distributed to the LPs as an incentive for providing liquidity. The traders themselves benefit from the ability to trade without the need for a counterparty, as the liquidity pool always has available assets for exchange.

AMM Rewards Explained

AMM rewards are a crucial aspect of why users participate in providing liquidity. These rewards come in two primary forms: liquidity tokens and yield rewards, typically calculated as APR (Annual Percentage Rate) or APY (Annual Percentage Yield).

Liquidity tokens, as mentioned earlier, are issued to LPs when they contribute assets to a pool. These tokens can be staked in various DeFi protocols to earn additional rewards or used to reclaim the original assets plus any earned fees.

When looking at potential rewards, it’s important to distinguish between APR and APY. APR represents the yearly return from an investment without considering the compounding effect. APY, on the other hand, takes compounding into account, showing the potential return if all rewards are reinvested. The choice between APR and APY depends on whether the LP plans to reinvest the rewards or not.

What Are the Advantages of Using AMMs?

AMMs offer several advantages that make them an attractive option for traders and liquidity providers.

Liquidity

AMMs provide constant liquidity, enabling users to trade assets at any time without worrying about the availability of buyers or sellers. This liquidity eliminates the inefficiencies associated with traditional order book systems, where low liquidity can result in high slippage and failed trades.

Rewards

Liquidity providers can earn rewards through fees generated by trades in the liquidity pool. These rewards incentivize users to contribute their assets to the liquidity pools, making the system self-sustaining and profitable for participants.

No KYC

As a protocol rather than a legal entity, AMMs allow users to trade without undergoing Know Your Customer (KYC) procedures. This appeals to users who prioritize privacy and a seamless user experience and wish to avoid the stringent verification processes typical for centralized exchanges. With an AMM, you can simply connect your wallet and start trading.

Trade Directly From Your Wallet

With AMMs, traders can execute trades directly from their cryptocurrency wallets, maintaining full control over their assets at all times. This eliminates the need to deposit funds into an exchange and reduces the risk of losing assets to exchange hacks or insolvency.

What Are the Risks of AMMs?

While the benefits of automated market makers are impressive, they also come with certain risks that users should be aware of.

Slippage

Slippage occurs when a trade is executed at a different price than the expected one, usually due to low liquidity or high volatility. In AMMs, slippage can be a significant issue, especially for large trades, as the constant product formula can lead to drastic price changes within the pool during the trade.

Impermanent Loss

Impermanent loss is a unique risk associated with providing liquidity to AMMs. It occurs when the value of the tokens in a liquidity pool falls out of sync with their real market value . 

Usually, this happens in trading pairs where one asset is more sought after than the other. The AMM balances prices based on supply and demand within the protocol, which can lead to skewed prices.

For example, let’s say John deposits 1 ETH and $2500 USDT to a liquidity pool (assuming the price of ETH is $2500) and the total assets in the pool are 10 ETH and $25000 USDT. In that case John has 10% of the pool. 

Meanwhile, the market price of Ethereum spikes to $5000. Naturally, arbitrage traders begin adding USDT and removing ETH. The ratio of the assets within the pool will change.

After the rebalancing is done, the pool sits at 7 ETH and $35000 USDT. When John withdraws the 10% of the pool he’s entitled to, he’ll get 0.7 ETH and $3500 USDT. With the price of ETH at $5000, he’ll get back a total of $7000. While that’s an increase of 40% to his initial deposit of $5000, if he had just held the ETH, his assets would have been worth $7500.

So AMMs are susceptible to impermanent loss due to their internal balancing mechanisms – while this can be a risk for Liquidity Providers, it also presents arbitrage opportunities for the DeFi ecosystem.

If the price of one token rises or falls significantly, LPs may experience a loss compared to simply holding the tokens outside of the pool.

Smart Contract Vulnerabilities

AMMs rely on smart contracts to facilitate trades and manage liquidity pools but smart contracts can be susceptible to bugs or vulnerabilities. If the underlying smart contract is exploited, it could lead to significant financial losses for all participants. For this reason, the AMM protocol must undergo thorough audits and security checks.

Malicious Smart Contracts

In addition to vulnerabilities, there is also the risk of malicious smart contracts being deployed by bad actors. These contracts may appear legitimate but contain hidden code designed to steal funds or manipulate trades. Users should exercise caution and only interact with well-known and trusted AMMs to mitigate this risk.

Volatile Liquidity

Since liquidity providers are incentivized by rewards, they will logically go to whichever pool is offering the biggest pay off. 

But this creates a tension: AMMs are constantly competing with one another to maintain trading liquidity and generate enough profit to reward their liquidity providers. This dynamic, in which AMMs are constantly fighting to survive, is known as mercenary liquidity. 

So although AMMs are meant to provide constant liquidity, the competitive nature of the DeFi market means only the most successful ones will survive.

Famous AMM Examples

Several AMMs have earned a name for themselves in the DeFi space, each offering unique features and advantages. Some of the most famous examples are:

Uniswap

  • Token: UNI
  • Launch Date: November 2018

Uniswap is a decentralized exchange, which introduced AMMs into the DeFi ecosystem. It pioneered the use of liquidity pools and the constant product formula, allowing users to trade ERC-20 tokens directly from their wallets. Uniswap’s open-source nature and user-friendly interface have made it a go-to platform for decentralized trading.

1Inch

  • Token: 1INCH
  • Launch Date: December 2020

1Inch is an AMM aggregator that searches multiple decentralized exchanges to find the best prices for trades. By uniting liquidity from various sources, 1Inch reduces slippage and provides users with an efficient trading experience. It also offers advanced features such as limit orders and custom slippage settings.

SushiSwap

  • Token: SUSHI
  • Launch Date: September 2020

SushiSwap is a decentralized exchange and AMM that started as a fork of Uniswap but quickly developed its ecosystem and features. It offers liquidity mining, staking, and a range of DeFi products, making it a comprehensive platform for users looking to participate in the wider DeFi space.

Conclusion

Automated market makers offer an alternative to the traditional exchange model by providing constant liquidity, and rewards, and allowing users to trade from their wallets without KYC. However, before using an AMM, users must also consider the risks involved such as slippage, impermanent loss, and smart contract vulnerabilities. 

While automated market makers are far from perfect, their impact on DeFi is undeniable. As the industry grows further, AMMs will likely play an increasingly important role in shaping the future of decentralized finance.

FAQs

Can I Trade Fiat on a Crypto AMM?

No, most crypto AMMs do not support fiat currencies. They primarily facilitate the trading of cryptocurrencies and tokens. To trade fiat for crypto, you would need to use a centralized exchange or a fiat gateway.

Can I Do Yield Farming on AMMs?

Yes, yield farming is a popular activity on AMMs. By providing liquidity to pools, users can earn rewards in the form of additional tokens or fees generated by trades.

How Are Rewards Calculated on AMMs?

Rewards on AMMs are proportionate to the liquidity a user provides. The more liquidity a user contributes, the larger the share of the fees generated by trades within the pool.

What’s a Liquidity Provider Token?

Users who contribute assets to a liquidity pool receive liquidity provider tokens. These tokens represent the user’s share in the pool and can be used to redeem their assets or earn additional rewards through staking or yield farming.

Was this Article helpful? Yes No