Beginner

What Is An Automated Market Maker (AMM) In Crypto?

AMMs let crypto traders swap directly against smart-contract liquidity pools instead of waiting for matching buyers and sellers. This guide explains how AMM pricing, liquidity provision, impermanent loss, slippage, and MEV risks work before you trade or deposit funds.

Yousra Anwar Ahmed Yousra Anwar Ahmed Updated May 21, 2026

Overview

Introduction

When you trade crypto on most exchanges, you need another person on the other side of the deal, someone willing to sell what you want to buy, at the price you are willing to pay. An automated market maker, also called an AMM in crypto, removes that requirement. Instead of matching buyers with sellers, it lets you trade directly against a pool of tokens locked in a smart contract. You send one token in, you get another token out, and the contract adjusts the price automatically based on what is left in the pool.

That design makes trading possible even for tokens that would never attract a professional market maker or enough buyers and sellers to keep an order book running. It also lets ordinary users deposit their own tokens into those pools to earn a share of trading fees. But depositing into a pool carries real risks that terms like “passive yield” tend to obscure — risks that affect how much you get back when you withdraw.

This guide explains how AMMs work from the ground up, what liquidity providers actually sign up for, and what to check before you swap or deposit anything.

Key Takeaways

  • What it is: An AMM is smart contract infrastructure that lets users swap crypto assets against pooled liquidity instead of matched orders.
  • What it does: It makes onchain trading possible without a central order book, market maker desk, or account-based exchange venue.
  • Main risk or limitation: AMMs can expose traders and liquidity providers to slippage, impermanent loss, MEV, fake tokens, approval risk, and smart contract failure.

What Is an Automated Market Maker (AMM)?

An AMM (or Automated Market Maker) is a decentralized exchange mechanism that uses liquidity pool balances and a pricing formula to quote token prices automatically. It does not involve a human market-making firm or a stock exchange specialist. It is code that holds assets and adjusts prices as users trade against those assets.

The simplest AMM pool holds two tokens, such as ETH and USDC. A trader sends one token into the pool and receives the other back. The smart contract recalculates the exchange rate after each trade because the reserves have shifted.

Three groups interact with every AMM pool, and each one plays a different role:

  • Traders use the pool to swap one token for another. They care about price, slippage, and fees.
  • Liquidity providers deposit token pairs into the pool and earn a share of fees from every swap. They care about fee income versus the risk of holding tokens inside the pool.
  • Arbitrageurs trade against the pool when its price drifts away from prices on other markets. They keep pool prices roughly aligned with the rest of the market.

All three roles depend on the same pool. Traders need depth so large swaps don't move the price too far. Liquidity providers need enough trading volume to make fees worth the risk. Arbitrageurs need price gaps to close. When one group is absent, the others feel it. A pool with no arbitrage activity can sit at a stale price for hours. A pool with no liquidity makes every trade expensive.

How AMMs Replace Order Books With Liquidity Pools

On a traditional exchange, a trade only fills if someone on the other side is willing to match it. Buyers post bids, sellers post asks, and a matching engine pairs compatible orders. If no seller exists at your price, you wait or adjust your order.

AMMs remove that dependency. Your swap pulls tokens directly from a pool and pushes your input token into that same pool. The price adjusts automatically. No seller needs to be online, and no matching engine is involved.

ModelHow a Trade Gets Filled
Order BookBuyers and sellers post bids and asks, then a matching engine pairs compatible orders.
AMM PoolA smart contract quotes against pooled assets, then updates the pool after each swap.

On a centralized exchange, a token with little trading interest might have a wide spread or no active market at all. On an AMM, anyone can create a pool for any token pair, which means trading is possible even for assets that would never attract a dedicated market maker. That accessibility is real, but it comes with a trade-off: thin pools are easy to manipulate and expensive to trade in size.

AMMs are the foundation of most decentralized exchange design because smart contracts can manage pool balances transparently onchain. A centralized exchange custodies your funds and matches orders internally. An AMM settles through wallet-signed transactions, so you keep custody until the moment you sign.

That also separates AMMs from professional market maker companies. Those firms quote bids and asks using capital and trading systems. AMMs quote from pool reserves using code, though firms and bots can still provide liquidity or arbitrage those pools.

How the AMM Formula Moves Prices

Every constant-product AMM needs a rule to decide how much of token B you get when you deposit token A. Without a rule, the pool would have no way to set a price — someone could drain all of one token by sending a tiny amount of the other. The x * y = k formula is that rule.

It keeps the product of two token reserves constant before fees and rounding. If one reserve rises because a trader deposits that token, the other reserve must fall because the trader receives it. The product stays the same, which means the price adjusts automatically with every trade.

A concrete example makes this easier to follow. Imagine a pool with 10 ETH and 20,000 USDC. The implied price is roughly 2,000 USDC per ETH. The reserve product is 200,000 (10 × 20,000 = 200,000).

Now a trader buys 1 ETH using USDC. They send USDC into the pool and receive ETH out. After the trade, the pool has less ETH and more USDC. The product must still equal approximately 200,000, so the new reserves settle at roughly 9 ETH and 22,222 USDC. The next ETH is now more expensive, because there is less of it in the pool.

The sequence every swap follows:

  • The trader sends token A into the pool.
  • The pool sends token B out.
  • The pool recalculates the reserve ratio.
  • The next quote reflects the new balance.

Slippage is the gap between the price quoted when you preview a swap and the price you actually receive when it executes. Some slippage comes from your own trade size — larger swaps move the pool more. More can come from other transactions that settle before yours while your transaction waits in the mempool (the queue of pending transactions waiting to be added to the blockchain).

Not every AMM uses the pure x * y = k formula. Stable-swap pools are tuned for assets that should trade at nearly the same price, like USDC and USDT. They allow larger swaps with less price movement as long as both assets hold their peg. If one depegs, the same pool can become a one-sided exit route where slower users are left holding the weaker asset.

What Liquidity Providers Do in an AMM

Liquidity providers supply the assets that make an AMM usable. Without them, there is no pool, and there is nothing for traders to swap against.

In a two-token pool, a provider deposits both assets in a fixed ratio — usually 50/50 by value at the time of deposit. In return, they receive a record of their share, sometimes an LP token, sometimes a position with a chosen price range, depending on the pool design. That share entitles them to a proportion of all swap fees collected by the pool, plus their original deposit when they withdraw.

The position is not a savings account. AMMs sit inside the broader DeFi sector because they combine trading, custody, incentives, and smart contract settlement in a single system. A liquidity provider is not lending to one borrower with a fixed repayment schedule. They are making capital available to any trader who uses that pool, at any time, in any size, until they withdraw.

Three things happen to a liquidity position simultaneously, and they can work against each other:

  • Fee share from swaps accrues in proportion to the provider's share of the pool.
  • Token mix shifts as trades happen. A pool that keeps selling ETH ends up holding less ETH and more of the other asset. The provider's position follows that shift automatically.
  • Incentives or emissions may supplement fee income but can change or disappear without warning.

A simple way to think about it: you deposit equal value of two tokens. While you are in the pool, traders are constantly swapping between those tokens. The pool sells whichever token is being bought, and buys whichever is being sold. Your share of the pool reflects that ongoing rebalancing, not the prices at the moment you deposited.

What happens when you withdraw is where many providers are surprised. You do not receive the exact tokens you deposited. You receive your share of whatever the pool currently holds, which may be a different mix and a different total value than your original deposit. Fees earned are included, but so is any impermanent loss that has accumulated. The next section explains that in full.

What Is Impermanent Loss?

Impermanent loss is the most important concept for anyone considering providing liquidity. The name is misleading — “impermanent” suggests it goes away if you wait, but it becomes permanent the moment you withdraw.

Here is what causes it. When you deposit into a pool, you provide two tokens at equal value. The pool uses the x * y = k formula to price trades between them. If the price of one token rises significantly on external markets, arbitrageurs will buy that token from your pool (where it is now cheap) and sell it elsewhere. The pool loses the outperforming token and gains more of the underperforming one. Your share of the pool follows that shift.

A worked example with round numbers:

You deposit $1,000 of ETH (0.5 ETH at $2,000) and $1,000 of USDC into a pool. Total deposit: $2,000.

ETH price doubles to $4,000. Arbitrageurs trade against the pool until its price matches. After arbitrage, the pool rebalances. You now hold roughly 0.354 ETH and $1,414 USDC — a total of about $2,828.

If you had simply held 0.5 ETH and $1,000 USDC outside the pool, you would have $2,000 + $1,000 = $3,000.

The difference, $3,000 vs $2,828, is your impermanent loss. You still made money compared to your original $2,000, but you made less than you would have by holding. The fee income from swaps may offset some or all of that gap depending on how active the pool is, but in a volatile pair with low volume, it often does not.

The loss grows larger as the price difference between the two tokens widens. Stablecoin pairs (USDC/USDT) have minimal impermanent loss because the prices rarely diverge. ETH/USDC pairs have more. A new token paired with ETH can have severe impermanent loss if the new token moves 10x or crashes.

Why the Automated Market Maker Prices Need Arbitrage

An AMM pool only sees its own reserves. It has no direct connection to prices on other exchanges. If ETH rises 5% on a centralized exchange while a pool sits idle, the pool still quotes the old price until someone trades against it.

That gap is what arbitrageurs close. They buy the underpriced token from the pool and sell it elsewhere until the price difference is too small to be worth the gas and fees. The result is that AMM prices tend to stay close to broader market prices, as long as arbitrage activity is frequent enough to keep them aligned.

Arbitrage is useful for traders who arrive after a price move, because stale quotes get corrected quickly. It can hurt liquidity providers because arbitrageurs capture value from the pool each time outside prices move first. When an arbitrageur corrects a stale pool price, they are effectively buying low from the LPs.

AMM spot prices also carry oracle risk. A pool price can be manipulated briefly if the pool is thin and an attacker can trade enough size. Time-weighted average prices reduce that risk by averaging across a window of time rather than reading a single moment, but they do not eliminate the problem entirely.

MEV adds another layer, covered in the next section.

What Is a Sandwich Attack?

A sandwich attack is a specific type of MEV (maximal extractable value) — a category of techniques where bots exploit the gap between when a transaction is submitted and when it confirms on the blockchain.

Here is how a sandwich attack works in practice. You submit a swap for a large amount of ETH. Before your transaction confirms, a bot sees it waiting in the mempool and does two things in rapid sequence: it buys ETH just before your transaction (pushing the price up), then sells ETH immediately after your transaction confirms (pushing the price back down). You bought at a worse price. The bot pocketed the difference.

The term “sandwich” refers to your transaction being squeezed between the bot's buy and sell.

This is not a theoretical risk. It is routine on high-activity chains and affects any swap that moves a pool meaningfully. Several DEX routers now offer built-in MEV protection that submits transactions through private channels rather than the public mempool, reducing sandwich exposure. Setting a tight slippage tolerance also helps, since a bot cannot profit from sandwiching a swap that will revert if the price moves by more than 0.5%.

Thin pools are more vulnerable because smaller amounts of capital can move the price enough to make sandwiching profitable.

Main AMM Types in Crypto and Where They Fit

AMM designs have expanded well beyond the original constant-product model. Each type makes a different trade-off between simplicity, capital efficiency, and the range of assets it handles well.

AMM ModelBest Fit and Trade-Off
Constant-Product PoolWorks for many volatile pairs, but larger trades can move price sharply in thinner pools.
Stable-Swap PoolFits similarly priced assets, but depeg risk can turn a low-slippage pool into a one-sided exit route.
Weighted PoolSupports uneven or multi-asset baskets, but pricing is harder for beginners to audit.
Concentrated LiquidityGives deeper liquidity inside chosen ranges, but LPs must manage inactive ranges and one-sided exposure.
Hybrid AMM/Order-Book DesignCan combine pool liquidity with order-book routing, but execution depends on the protocol's architecture.
Dynamic-Fee or Hook-Based DesignCan adapt fees or logic around swaps, but custom behavior adds smart contract and governance complexity.

Constant-product is the baseline. Most AMM explainers start here because the formula is simple and the behavior is predictable. Pool depth is the main constraint.

Stable-swap pools, popularized by Curve, reduce price impact for assets that should trade at par. They are efficient when both assets hold their peg and can unravel quickly when one does not.

Weighted pools, associated with Balancer, extend the pool concept to uneven ratios and more than two assets. A pool might hold 80% ETH and 20% USDC, which changes how price impact works across different trade directions.

Concentrated liquidity is a meaningful upgrade to capital efficiency. Rather than spreading liquidity across every possible price from zero to infinity, providers choose a range where they expect trading to occur. Within that range, the pool is deeper and fees per dollar of capital are higher. Outside that range, the position earns nothing and sits entirely in one token. Uniswap v3 and v4 made this model mainstream on Ethereum. Raydium's CLMM pools apply the same approach on Solana.

Hook-based designs like Uniswap v4 allow custom logic to attach around swaps and liquidity events. That flexibility can improve routing or fee design, but it also means a pool may behave differently from a standard AMM. Users should treat unfamiliar pools with custom hooks as a more advanced risk surface.

AMM Risks for Traders and Liquidity Providers

AMM risks split between traders and liquidity providers, though several apply to both. Understanding which risks affect which role helps before deciding whether to swap, provide liquidity, or skip a pool entirely.

For traders, the primary risk is slippage. The quoted output on the swap screen is an estimate based on pool state at the moment you preview. By the time your transaction confirms, the pool may have moved. Thin pools, volatile assets, and large trade sizes make that gap worse.

For liquidity providers, the headline risk is impermanent loss, covered in full above. Beyond that, the full risk checklist covers both groups:

  • Slippage can make a swap worse than the screen preview.
  • Impermanent loss can offset fee income entirely, especially in volatile pairs.
  • MEV and sandwich attacks can raise your effective swap cost.
  • Thin pools are easier to manipulate and show sharper price impact per trade.
  • Token approvals can expose wallet balances if a frontend is compromised or a contract is malicious.
  • Smart contract bugs can drain or freeze funds, including in audited protocols.
  • Stablecoin depegs can leave LPs holding the weaker asset with no clean exit.
  • Fake tokens can copy real ticker symbols and appear in search results or pool lists.

Wallet handling sits across all of these. Approving unlimited token access through a compromised frontend is a different problem from choosing a thin pool, but both can result in lost funds. Understanding and signing up for one of the best self-custodial wallet setups before connecting to any DEX reduces several of these risks at once.

No AMM removes the need to verify the token contract, pool address, route, fee tier, and slippage limit. A recognizable protocol name does not guarantee the frontend is genuine, the token in the pool is the real one, or the pool has meaningful depth behind it.

Examples of AMM in Crypto

Examples of AMM in crypto range from general-purpose DEX pools to chain-specific venues. These are the most commonly referenced ones and what distinguishes each.

Uniswap is the standard reference for AMM design. It popularized the constant-product model and made concentrated liquidity mainstream with v3. The Uniswap token (UNI) is a separate asset from the AMM mechanism itself.

Curve focuses on swaps between assets that should trade at nearly identical prices — primarily stablecoins and wrapped versions of the same underlying asset. Its stable-swap formula allows large, low-slippage swaps at parity. When a stablecoin in a Curve pool depegs, the pool can become imbalanced quickly.

Balancer extends the pool concept to weighted baskets where assets do not need to sit in a 50/50 pair. A pool might hold ETH, WBTC, and USDC in uneven proportions, which changes how price impact works across different trade directions.

Raydium is a Solana-based AMM and DEX with both constant-product and concentrated-liquidity pools. Its CPMM pools use the classic x * y = k model. CLMM pools support custom price ranges. For any Raydium pool, the first check is which design you are entering, since the risk profile differs. CryptoSlate tracks the Raydium token (RAY) separately from the protocol.

SpiritSwap is a Fantom DEX built on a Uniswap-style constant-product AMM, with fees distributed to liquidity providers through swap activity. Users still need to check Fantom network conditions, pool depth, and token contracts before trading or depositing. The SPIRIT token context is separate from the AMM mechanism.

PancakeSwap brought AMM trading to BNB Chain with a familiar swap and pool model.

Bancor is an early AMM design reference, notable for experimenting with single-sided deposits and built-in impermanent loss protection — an approach that later ran into liquidity and sustainability problems.

DODO uses a proactive market maker model that references an external price oracle rather than relying solely on pool reserves, which changes its pricing behavior compared to constant-product designs.

How To Use AMMs Safely?

Before using any AMM, three things need to be in place. Skipping any of them tends to cause avoidable problems.

A self-custodial wallet. AMMs do not have accounts. You connect a wallet, sign transactions, and keep custody of your funds throughout.

The token you want to swap, plus gas. Every transaction on a blockchain costs a small fee paid in the network's native token — ETH on Ethereum, SOL on Solana, BNB on BNB Chain. If you only hold the token you want to swap and have nothing left for gas, the transaction will fail. Always keep a small reserve of the network's native token.

The correct contract address for any unfamiliar token. Fake tokens with identical ticker symbols are common on AMMs. The token name and symbol shown in a swap interface can be copied by anyone. The contract address cannot be faked. Always confirm the contract address from the project's official website or documentation before swapping.

Once those three are in place, the checks before signing any swap are:

  • Confirm the token contract from a trusted source.
  • Check pool liquidity against your trade size. A pool with $50,000 total liquidity will move significantly on a $5,000 swap.
  • Review the full route and expected output before confirming.
  • Set slippage tolerance deliberately. Too high and bots can exploit it. Too low and your transaction may fail repeatedly in volatile conditions.
  • Check gas costs before confirming, especially on Ethereum during busy periods.
  • Avoid unlimited token approvals unless you understand what you are approving and trust the contract.
  • For unfamiliar tokens, try a small test swap before committing full size.
  • Keep swapping and providing liquidity as separate decisions with separate risk assessments.

FAQs

What does AMM mean in crypto?

AMM means automated market maker. In crypto, it refers to a smart contract system that prices token swaps from liquidity pool reserves instead of matching bids and asks in an order book.

How does an AMM set prices?

An AMM sets prices by adjusting the pool’s reserve ratio after each swap. In a constant-product pool, the x * y = k formula keeps the reserve product constant, so buying one token makes the next unit of that token more expensive.

Do I need an account to use an AMM?

No. AMMs do not use accounts or logins. You connect a crypto wallet, sign transactions directly, and keep custody of your funds throughout. There is no registration, KYC, or withdrawal request process.

Can you lose money providing liquidity to an AMM?

Yes. Liquidity providers can lose money if impermanent loss, depeg risk, smart contract bugs, token failure, or adverse selection outweigh fee income and any additional incentives. A position can show positive fee earnings while still underperforming a simple hold of both assets outside the pool.

What is the difference between an AMM and an order book?

An AMM lets users trade against pooled liquidity managed by smart contracts. An order book matches buy and sell orders from market participants, usually through a centralized matching engine or an onchain order-book protocol.

What is Raydium AMM in crypto?

Raydium AMM refers to Raydium’s Solana-based liquidity pool and swap infrastructure. Raydium supports both constant-product pools and concentrated-liquidity pools, so users should confirm which pool type, fee setup, and liquidity depth applies before trading.

Is SpiritSwap an AMM?

Yes. SpiritSwap is an AMM-style decentralized exchange on Fantom. It uses liquidity pools for swaps. Users should check pool depth, token contracts, and network conditions before trading or providing liquidity.