Key Takeaways

  • An automated market maker (AMM) is a smart contract-powered protocol that continuously prices two or more digital assets using algorithmic formulas, enabling token trading without traditional order books.

  • AMMs replace order-book matching with liquidity pools, where token prices adjust automatically as trades change the pool's token balances.

  • Anyone can become a liquidity provider (LP) by depositing tokens into a pool and earning a proportional share of trading fees. LPs receive LP tokens representing their pool share, which can be redeemed when they withdraw.

Binance Academy courses banner

Introduction

Decentralized finance (DeFi) is growing fast across multiple blockchain networks, including Ethereum,, BNB Chain, Polygon, Avalanche, and Layer 2 solutions like Arbitrum, Base, and Optimism. This growth has driven widespread adoption of AMMs, which feature deep liquidity pools and handle billions in trading volume.

AMMs allow anyone to easily create or participate in markets for nearly any token, enabling trading without centralized intermediaries. The sections below explain how AMMs work under the hood and how they compare to traditional order book exchanges.

What Are Automated Market Makers (AMMs)?

An AMM is a protocol used in decentralized exchanges (DEXs). It relies on algorithmic pricing models to enable token trading without relying on order books. So, instead of matching buyers and sellers, AMMs use liquidity pools where prices are set based on the quantities of tokens in the pool.

The classic AMM formula popularized by Uniswap is the constant product formula: x * y = k, where x and y are token reserves, and k is a constant product. As users trade tokens, their quantities in the pool adjust to keep the product k constant, dynamically affecting prices.

Besides the classic constant-product formula, other types of AMMs have emerged:

  • Curve uses a stable-swap formula optimized for trading tokens with similar prices (like stablecoins), which helps reduce slippage.

  • Uniswap v4 (launched January 2025) introduced a hooks architecture, allowing developers to inject custom logic into pools at key lifecycle moments, such as before or after swaps. A singleton PoolManager contract replaced individual pool contracts, cutting pool creation gas costs by 99%. Uniswap v4 reached $1 billion in total value locked within 177 days of launch.

  • Balancer supports multi-asset weighted pools of up to eight tokens with customizable fee structures, offering more flexibility than standard two-token pools.

Traditional market makers are typically firms using complex strategies to maintain order books and tight spreads. AMMs democratize this role, allowing anyone to contribute liquidity and create markets on-chain via smart contracts.

How Does an Automated Market Maker Work?

Instead of order books, AMMs operate through liquidity pools filled with tokens. Users known as liquidity providers (LPs) deposit equal values of two or more tokens into these pools. Traders then interact directly with the pool to swap tokens.

You trade with a smart contract that sets prices using a formula. The AMM adjusts prices instantly as trades happen and token balances change. Pools with more liquidity typically enable smoother trades with less slippage (the difference between expected and actual trade price). When LPs deposit tokens, they receive LP tokens representing their share of the pool. These can be redeemed for the underlying tokens at any time.

LPs are rewarded with trading fees and sometimes additional incentives, such as yield farming rewards. However, they also face risks, like impermanent loss, which happens when token prices move relative to each other.

Liquidity pools

A liquidity pool is a smart contract holding reserves of two or more tokens that traders can swap against. To provide liquidity, LPs deposit matching values of these tokens. For example, depositing $1,000 might mean putting in $500 worth of ETH and $500 worth of USDC.

The fees from trades within the pool are shared among LPs proportional to their share of the total liquidity. Fee structures vary between platforms. For example, Uniswap v4 supports multiple fee tiers and a protocol fee that can be directed to governance. The more liquidity in the pool, the less slippage traders will face. Slippage tends to be higher for large trades relative to a pool's size, as the pricing formula adjusts token balances and prices.

Impermanent loss

Impermanent loss refers to the reduction in value that liquidity providers may experience compared to simply holding tokens, when the prices of those tokens change relative to each other.

Innovations like Uniswap v4's hooks and concentrated liquidity, and Curve's stable pools, help mitigate impermanent loss by optimizing how liquidity is placed and priced. Pools comprising highly correlated tokens, like stablecoins or wrapped versions of the same asset, generally experience much less impermanent loss.

If you withdraw funds when prices have changed significantly, that loss becomes permanent. Trading fees and incentives can offset these losses, but that is not always the case. LPs should carefully assess the risks before depositing funds.

Risks to Consider

Although AMMs offer decentralization and easy access, users should be aware of several risks:

  • Smart contract vulnerabilities that could lead to loss of funds.

  • Impermanent loss (when token prices diverge significantly).

  • Front-running and Maximal Extractable Value (MEV) attacks, where bots or validators reorder or sandwich transactions to extract value at the expense of regular users.

  • Regulatory uncertainties affecting DeFi platforms in various jurisdictions.

To reduce exposure to these risks, research the AMM platform carefully, review audit reports, and understand the mechanics of the specific pool before trading or providing liquidity.

FAQ

What is an AMM in crypto?

An automated market maker (AMM) is a type of decentralized exchange protocol that uses smart contracts and liquidity pools to enable token swaps without a traditional order book. Prices are set algorithmically based on the ratio of tokens in a pool, and anyone can provide liquidity to earn a share of trading fees.

How does an AMM make money for liquidity providers?

Liquidity providers earn a share of the trading fees generated every time someone swaps tokens in their pool. The share is proportional to the LP's contribution to the total pool. Some AMMs also distribute additional token rewards (liquidity mining incentives) to attract more liquidity, though these vary by platform and can change over time.

What is impermanent loss in an AMM?

Impermanent loss occurs when the prices of the two tokens in a liquidity pool shift relative to each other after a deposit. Because the AMM formula rebalances the pool automatically, an LP may end up with a different ratio of tokens than originally deposited. If withdrawn at that point, the LP could receive less dollar value than if the tokens had simply been held. The loss is "impermanent" because it only materializes on withdrawal; however, large price swings can make it significant.

How do AMMs differ from order book exchanges?

On an order book exchange, buyers and sellers post bids and asks, and trades execute when orders match. This requires active market participants at all times. On an AMM, there are no buyers or sellers to match: traders swap against a pool of tokens governed by a pricing formula. This means 24/7 liquidity is available, and anyone can participate as a market maker by depositing tokens, but pricing is determined by the pool's mathematical formula rather than live supply and demand.

Closing Thoughts

AMMs have reshaped DeFi by making token trading and liquidity provision accessible to anyone with a crypto wallet. Starting from the simple constant-product formula, AMM design has evolved significantly, with concentrated liquidity, multi-asset pools, stable-swap curves, and programmable hooks now standard across leading protocols.

Further Reading

Disclaimer: This content is presented to you on an "as is" basis for general information and or educational purposes only, without representation or warranty of any kind. It should not be construed as financial, legal or other professional advice, nor is it intended to recommend the purchase of any specific product or service. You should seek your own advice from appropriate professional advisors. Where the content is contributed by a third party contributor, please note that those views expressed belong to the third party contributor, and do not necessarily reflect those of Binance Academy. Digital asset prices can be volatile. The value of your investment may go down or up and you may not get back the amount invested. You are solely responsible for your investment decisions and Binance Academy is not liable for any losses you may incur. For more information, see our Terms of Use, Risk Warning and Binance Academy Terms.