Book a free call

AMM Types Compared: Which Design Fits Your DEX?

AMMs come in several designs, from constant product to concentrated liquidity. This guide compares each type, its pricing, and which one fits your exchange.

Hertiv engineering teamReviewed by a senior engineer
5 min read
AMM Types Compared: Which Design Fits Your DEX?
On this page

Short answer

An automated market maker, or AMM, is a smart contract that prices trades from a formula instead of an order book. The main types are constant product, constant sum, constant mean, hybrid stable swap, concentrated liquidity and dynamic AMMs. Each type trades off price accuracy, slippage and capital efficiency, so the right choice depends on what is being traded.

What is an AMM?

An automated market maker is a smart contract that holds two or more tokens in a pool and lets anyone trade against that pool. Instead of matching buyers with sellers, it sets the price from a formula based on how much of each token the pool holds. When you buy one token, the pool's balance shifts and the price moves.

The formula is the design. Different formulas give different prices for the same trade, which is why AMMs come in types. A formula that suits stablecoins, which should stay near one dollar, does not suit volatile tokens, which need room to move.

Liquidity providers deposit tokens into the pool and earn a share of trading fees. They also face the risk that the tokens they get back are worth less than the ones they deposited, which is called impermanent loss.

Constant product AMMs: the simplest design

Constant product AMMs keep the product of the two token balances fixed. The rule is x times y equals k, where x and y are the pool balances and k never changes during a trade. Buying token A removes some A from the pool, so the price of A rises, and the trader pays in token B.

This design always offers a price, no matter how large the trade, but the price gets worse as the trade gets bigger. That effect is called slippage, and it grows quickly when the pool is small relative to the trade.

Example (hypothetical): a pool holds 10,000 token A and 10,000 token B, so k is 100,000,000. A trader buys 1,000 token A, leaving 9,000 A in the pool. The pool must then hold 100,000,000 divided by 9,000, which is about 11,111 B. The trader pays the difference, about 1,111 B, for 1,000 A.

For the basics of how AMMs work before comparing types, what an AMM is covers the pool, the formula and the role of liquidity providers.

Constant sum and constant mean AMMs

Constant sum AMMs keep the sum of the two balances fixed, so the price never changes. That sounds ideal, but it drains the pool: if one token is even slightly cheaper elsewhere, traders buy it until the pool runs out. For that reason constant sum pools are rarely used on their own.

Constant mean AMMs extend the idea to more than two tokens, keeping a weighted geometric mean fixed. A pool might hold three tokens in fixed proportions, such as 50, 25 and 25 percent, and trades rebalance the pool back toward those weights. This design suits index-like pools and baskets of assets.

Both designs are simple to understand, but neither handles volatile prices well. Constant sum breaks under arbitrage, and constant mean needs careful weight choices to avoid draining one side of the pool.

Hybrid and stable swap AMMs

Hybrid AMMs blend the constant product and constant sum formulas. Near the target price, the pool behaves like a constant sum pool, so trades have almost no slippage. Far from the target price, it behaves like a constant product pool, so the price can move and the pool cannot be drained.

This design is built for stablecoins and other tokens that should trade near a fixed value, such as two versions of the same dollar-pegged asset. Traders get tight prices on normal trades, and the pool still protects itself when the peg breaks.

The trade-off is complexity. The blend needs a tuning parameter that decides how strongly the pool holds the peg, and picking that parameter badly either gives away value to arbitrage traders or leaves slippage higher than it needs to be.

Concentrated liquidity AMMs

Concentrated liquidity AMMs let providers choose a price range for their tokens instead of spreading them across every possible price. A provider who expects a token to stay between two prices puts all their capital in that range, so the same money supports far more trading volume.

The gain is capital efficiency: a small pool can offer prices as good as a much larger one, as long as the price stays in range. The cost is active management. If the price moves out of range, the position stops earning fees and may end up holding only the token that fell in value.

This design suits professional providers who watch prices and move ranges. Casual providers often earn less here than in a simple pool, because their capital sits idle whenever the price drifts away.

Which AMM type fits your use case?

The right AMM type follows the asset, not the fashion. Stable assets want a design that holds the peg; volatile assets want one that can move; and the team's appetite for active management decides whether concentrated liquidity is worth it.

Type Best for Slippage Provider effort
Constant product Volatile token pairs Medium to high Low
Constant sum Fixed-price swaps only None Low
Constant mean Multi-token baskets Medium Low
Hybrid stable swap Stablecoins, pegged assets Very low near peg Medium
Concentrated liquidity High-volume pairs Low in range High
Dynamic Pools that need fee or weight changes Varies High

Dynamic AMMs adjust fees or weights in response to market conditions, which can protect providers during volatility. They add the most moving parts, so they suit teams with the skill to monitor and tune them.

When comparing AMMs with order books, order book vs AMM exchanges shows where each model wins, which helps decide whether an AMM is even the right choice for your market.

Common mistakes when choosing an AMM type

Most mistakes come from picking a design for its headline efficiency instead of for the asset and the team that will run it. The formula is only part of the decision.

  • Using a constant product pool for stablecoins, where slippage eats the benefit
  • Choosing concentrated liquidity without anyone to manage price ranges
  • Ignoring impermanent loss when estimating provider returns
  • Setting hybrid pool parameters without testing them against a peg break
  • Copying a design that fits a large market into a small, thin pool
  • Forgetting that every AMM still needs liquidity before the first trade

If you are building an exchange and need help choosing and implementing the design, decentralised exchange development covers AMM design, audits and launch.

Key takeaways

  • An AMM prices trades from a formula, and the formula is what makes the types different.
  • Constant product suits volatile pairs; hybrid stable swap suits pegged assets.
  • Concentrated liquidity is the most capital-efficient design, but it needs active management.
  • Match the AMM type to the asset and to how much work your team will do.
  • Test with small trades before opening the pool to real volume.

Frequently asked questions

What is the simplest AMM type?

The constant product AMM is the simplest. It keeps the product of the two token balances fixed, so every trade moves the price in a predictable way. It always offers a price, needs no active management, and is the design most new exchanges start with.

Which AMM type is best for stablecoins?

The hybrid stable swap design is best for stablecoins. Near the peg it behaves like a constant sum pool with almost no slippage, and far from the peg it behaves like a constant product pool, so the pool cannot be drained. A plain constant product pool works but gives stablecoin traders worse prices.

What is concentrated liquidity?

Concentrated liquidity lets providers place their tokens in a chosen price range instead of across all prices. The same capital supports more trading volume while the price stays in range, but the position stops earning fees if the price moves out of range, so it needs active management.

What is impermanent loss in an AMM?

Impermanent loss is the gap between holding tokens and depositing them in a pool. If the price ratio changes, the pool returns a mix worth less than simply holding the original tokens. Fees can cover the gap, but providers should estimate both before depositing.

Can an AMM run out of a token?

A constant product pool cannot run out, because the price rises toward infinity as the balance falls. A constant sum pool can run out, which is why it is rarely used alone. Hybrid pools protect themselves by shifting toward constant product behaviour when the price moves far from the peg.

Do I need an AMM or an order book?

An AMM suits markets with steady flow and no need for limit orders, since it always offers a price and needs no market makers. An order book suits traders who want limit orders and tight spreads on large pairs. Many exchanges run both, using an AMM for long-tail assets and an order book for the main pairs.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a DEX and unsure which AMM design fits? Talk to Hertiv.

A senior engineer replies within one business day. Or see our DEX Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call