What Is an AMM?
An AMM, or Automated Market Maker, is a smart contract system that lets users trade crypto assets through liquidity pools instead of a traditional order book.
In cryptocurrency, an AMM is most commonly used in decentralized finance, where users can swap tokens directly from a blockchain wallet.
Instead of matching one buyer with one seller, an AMM uses pooled crypto assets and a pricing formula to make trades available automatically.
The Bank for International Settlements describes AMM protocols as systems that allow traders to exchange one cryptoasset for another automatically on a blockchain through liquidity pools.
This means an AMM can provide market access even when there is no specific person waiting on the other side of the trade.
A trader interacts with the pool, and the smart contract calculates the output based on the assets available in that pool.
For example, a pool may hold two assets, and users can swap one asset for the other according to the pool’s formula.
The AMM adjusts prices as the balance of assets in the pool changes.
This design is one of the most important innovations in DeFi because it allows trading, liquidity provision, and market creation without a central order-matching engine.
How an AMM Works
An AMM works by combining smart contracts, liquidity pools, pricing formulas, traders, and liquidity providers.
A smart contract controls the pool and follows transparent rules on the blockchain.
A liquidity pool holds crypto assets that traders can swap against.
A pricing formula decides how much of one asset a trader receives when they deposit another asset into the pool.
Liquidity providers, often called LPs, deposit assets into the pool so other users can trade.
Traders pay a fee when they swap assets, and part or all of that fee is usually distributed to liquidity providers.
The pool’s price changes automatically after each trade because the asset balances inside the pool change.
If many users buy one asset from the pool, that asset becomes scarcer inside the pool, and its price rises according to the AMM formula.
If many users sell one asset into the pool, that asset becomes more abundant inside the pool, and its price falls according to the formula.
This automated structure allows the market to operate continuously as long as the blockchain and smart contracts are functioning.
AMM vs Traditional Order Book
A traditional order book lists buy orders and sell orders from market participants.
A buyer may place a bid at one price, while a seller may place an ask at another price.
A trade happens when a buyer and seller agree on price and quantity.
An AMM does not need a visible list of bids and asks to complete a basic swap.
Instead, the trader swaps directly against a liquidity pool controlled by a smart contract.
This makes AMMs useful in crypto because anyone can create a market for compatible tokens as long as enough liquidity is supplied.
Order books can work well for highly liquid markets, but they may struggle when there are not enough active market makers.
AMMs solve this problem by allowing passive liquidity providers to supply assets to a pool.
However, AMMs can create other problems, including slippage, impermanent loss, smart contract risk, and exposure to arbitrage.
The best model depends on the asset, liquidity level, blockchain environment, user needs, and market design.
Liquidity Pools
A liquidity pool is a smart contract that holds crypto assets for trading.
In a simple two-token AMM, the pool contains two assets that users can swap between.
The pool may hold equal values of each asset, but different AMM designs can use different weights or formulas.
Liquidity pools are important because they replace the need for a single professional market maker to always quote prices.
Any eligible user can provide liquidity by depositing assets into the pool according to its rules.
When traders use the pool, they pay fees that may reward liquidity providers.
The size of a liquidity pool affects trading quality.
A deeper pool usually has lower slippage because a trade changes the pool balance less dramatically.
A shallow pool can create high slippage because even a medium-sized trade may strongly affect the asset ratio.
This is why liquidity depth is one of the first things users should check before trading through an AMM.
Liquidity Providers
A liquidity provider is a user who deposits crypto assets into an AMM pool.
Liquidity providers make trading possible by supplying the assets that traders swap against.
In return, they may earn a share of trading fees, liquidity incentives, or other protocol rewards.
When a user deposits assets into a pool, they may receive a liquidity provider token or another record that represents their share of the pool.
This position can usually be withdrawn later, subject to pool rules, network costs, and smart contract conditions.
Liquidity provision is not the same as simply holding crypto assets in a wallet.
An LP position changes as traders swap against the pool.
If the relative price of the assets changes, the liquidity provider may end up holding more of the weaker asset and less of the stronger asset.
This creates impermanent loss, which is one of the biggest risks in AMM liquidity provision.
LPs must compare expected fee income with price risk, impermanent loss, gas costs, incentives, and smart contract risk.
The most famous AMM design uses the constant product formula.
The formula is usually written as x * y = k.
In this formula, x is the amount of one asset in the pool, y is the amount of the other asset, and k is a constant value maintained by the pool’s pricing rule.
When a trader adds one asset to the pool, the pool releases some of the other asset while keeping the product relationship balanced after accounting for fees.
This formula makes prices rise as an asset becomes scarcer inside the pool.
It also makes prices fall as an asset becomes more abundant inside the pool.
The constant product formula is simple, transparent, and useful for volatile token pairs.
However, it can create meaningful slippage for large trades, especially when the pool is small.
It can also expose liquidity providers to losses when one asset moves strongly against the other.
Recent research on automated market makers in cryptoeconomic systems explains that AMMs are autonomous software agents that provide liquidity in crypto markets.
Other AMM Designs
Not every AMM uses the same formula.
A constant sum AMM uses a formula that can be useful for assets expected to trade at similar values, but it can run out of one asset if the market moves too far.
A weighted AMM allows pools to hold assets in ratios other than 50/50.
A stable-swap AMM is designed for assets that should trade near the same value, such as certain stablecoin pairs or closely related assets.
A concentrated liquidity AMM allows liquidity providers to choose a price range where their liquidity is active.
Concentrated liquidity can make capital more efficient, but it also makes LP management more complex.
A dynamic fee AMM can adjust trading fees based on market conditions, volatility, or pool design.
Some newer AMM models explore auctions, adaptive fees, oracle-aware pricing, or mechanisms designed to reduce losses for liquidity providers.
The purpose of these designs is usually to improve capital efficiency, reduce slippage, manage risk, or make liquidity provision more sustainable.
Users should understand which AMM model they are using because risk and pricing can vary significantly across designs.
How AMM Pricing Works
AMM pricing comes from the pool’s asset balances and formula.
If a pool holds Asset A and Asset B, the relative amounts of those assets determine the exchange rate offered by the smart contract.
When a trader buys Asset A from the pool by depositing Asset B, the pool has less Asset A and more Asset B after the trade.
Because Asset A becomes scarcer in the pool, the formula increases the price of Asset A for the next trade.
This process happens automatically without a human market maker changing quotes.
AMM prices can differ from prices in other markets because trades change pool balances directly.
Arbitrage traders help correct these differences by buying where an asset is cheaper and selling where it is more expensive.
Arbitrage is important because it helps AMM prices stay close to broader market prices.
However, arbitrage can also transfer value away from liquidity providers when pools are repeatedly rebalanced after external price movements.
Slippage
Slippage is the difference between the expected price of a trade and the actual execution price.
In an AMM, slippage happens because a trade changes the balance of assets in the pool.
A small trade in a deep pool may have very little slippage.
A large trade in a shallow pool may have significant slippage.
Slippage can also increase during volatile market conditions because prices may move quickly between the time a user signs a transaction and the time it is confirmed.
Most AMM interfaces let users set a slippage tolerance.
Slippage tolerance defines how much price movement the user is willing to accept before the transaction fails.
A very low slippage setting may cause a transaction to fail if the market moves slightly.
A very high slippage setting may expose the user to a worse price than expected.
Users should review trade size, pool depth, slippage tolerance, network fees, and token risk before confirming a swap.
Impermanent Loss
Impermanent loss is the difference between the value of providing liquidity to an AMM and the value of simply holding the same assets outside the pool.
The loss happens when the relative price of the pooled assets changes after the liquidity provider deposits them.
The Chainlink impermanent loss guide explains that impermanent loss occurs when the price of tokens in a liquidity pool changes compared with when they were deposited.
The word “impermanent” can be confusing because the loss can become permanent if the liquidity provider withdraws while the price difference remains.
Impermanent loss is larger when the price difference between the pooled assets becomes larger.
Trading fees can offset impermanent loss if the pool has enough volume and fee income.
Incentive rewards can also offset the loss, but rewards may fall in value or create new token risk.
LPs should compare the expected return from fees and rewards with the risk of price divergence between the assets.
Impermanent loss is one reason that providing liquidity to volatile token pairs can be much riskier than it first appears.
Fees in AMMs
AMMs usually charge a fee when users swap assets.
This fee may go to liquidity providers, the protocol treasury, liquidity incentives, or another destination defined by the smart contract rules.
Trading fees are important because they compensate liquidity providers for supplying assets and taking risk.
Higher fees may benefit LPs, but they can make trading more expensive for users.
Lower fees may attract more trading volume, but they may not fully compensate LPs for risk.
Some AMMs use fixed fees, while others use variable or dynamic fees.
Dynamic fees may rise during volatile conditions and fall during calm conditions.
Fees should always be evaluated together with slippage and network costs.
A trade with a low fee may still be expensive if slippage is high.
A trade with a higher fee may still be efficient if the pool is deep and execution is strong.
AMMs and Arbitrage
Arbitrage is the process of profiting from price differences between markets.
AMMs depend heavily on arbitrage because pool prices can move away from broader market prices after trades or external price changes.
If an asset is cheaper in an AMM pool than elsewhere, arbitrage traders may buy it from the pool and sell it in another market.
If an asset is more expensive in an AMM pool than elsewhere, arbitrage traders may sell it into the pool and buy it back elsewhere.
This activity helps bring AMM prices back toward the wider market price.
Arbitrage can improve price accuracy for traders, but it is not always good for liquidity providers.
When outside prices change, arbitrage traders may extract value from the pool as they rebalance it.
This is one reason researchers discuss loss-versus-rebalancing and other measures of LP performance.
A liquidity provider should understand that arbitrage is part of how AMMs function, not an unusual edge case.
AMMs and Oracles
An oracle is a system that provides external data to a blockchain application.
Some AMM designs use internal pool prices, while other DeFi applications may use oracles to check asset prices before lending, borrowing, liquidating, or settling positions.
AMM pool prices can sometimes be manipulated if liquidity is low and a large trade temporarily moves the price.
Because of this, DeFi protocols need careful oracle design when they use price data connected to AMM pools.
A poorly designed oracle can allow attackers to manipulate prices and exploit lending, borrowing, or derivatives systems.
Oracle risk is not only a problem for AMMs, but AMM liquidity can affect how reliable a price signal is.
Time-weighted average prices, multiple data sources, deep liquidity, and circuit breakers can help reduce oracle manipulation risk.
Users should be cautious with protocols that rely on thin liquidity or unclear price feeds.
AMMs and MEV
MEV stands for maximal extractable value.
In AMM trading, MEV can happen when validators, block builders, searchers, or bots profit from transaction ordering.
For example, a bot may see a pending swap and try to trade before and after it in a way that worsens the user’s execution.
This pattern is often called sandwiching.
MEV can increase the real cost of trading through an AMM, especially during volatile periods or when slippage tolerance is high.
MEV can also affect liquidity providers because arbitrage and ordering strategies influence how pools are rebalanced.
Users can reduce some MEV risk by using reasonable slippage settings, avoiding very thin pools, splitting large trades, or using protective routing tools when available.
MEV is one reason AMM execution quality should be evaluated beyond the headline pool fee.
AMMs in DeFi
AMMs are one of the core building blocks of decentralized finance.
The Ethereum DeFi documentation describes decentralized trading as a way to access global liquidity while staying in control of assets through blockchain-based applications.
AMMs make this possible by letting users trade directly from wallets through smart contracts.
They also support other DeFi activities because many protocols rely on AMM liquidity for token swaps, collateral management, yield strategies, and price discovery.
AMMs can be used by wallets, aggregators, lending protocols, derivatives systems, yield vaults, and on-chain asset managers.
This composability is powerful because smart contracts can connect with each other like financial building blocks.
It is also risky because a failure in one contract or pool can affect other applications that depend on it.
Users should understand that AMM liquidity is often part of a larger DeFi system rather than an isolated trading tool.
AMM Aggregators
An AMM aggregator is a tool that searches across multiple liquidity sources to find better trade execution.
Aggregators may split a trade across several pools to reduce slippage.
They may also compare routes across different token pairs to find a better output amount.
For example, a direct swap from Token A to Token C may be worse than routing through Token B if the combined liquidity is deeper.
Aggregators can improve user experience because they reduce the need to manually check many pools.
However, aggregators add another layer of smart contract and routing risk.
A user should still review the final asset, output amount, slippage setting, network fee, and contract permissions before confirming a transaction.
Good routing can save money, but careless routing can expose users to unexpected token risk or approval risk.
AMMs and Stablecoins
Stablecoin pairs often use AMM designs that are different from volatile token pairs.
Because two stablecoins may be expected to trade near the same value, a stable-swap curve can provide lower slippage around the target price.
This makes stablecoin AMMs useful for payments, liquidity management, lending, and on-chain settlement.
However, stablecoin pools are not risk-free.
If one stablecoin loses its peg, liquidity providers may end up holding more of the weaker asset.
A stablecoin pool can also face reserve risk, issuer risk, smart contract risk, bridge risk, and regulatory risk.
Users should not assume that a low-slippage stablecoin pool is automatically safe.
The quality of the assets inside the pool matters as much as the AMM formula.
AMMs and Token Launches
AMMs make it easy to create liquidity for new tokens.
A project or community can deposit a new token and a paired asset into a pool so users can start trading.
This open market creation is one reason AMMs became important in crypto.
However, easy pool creation also creates risks.
Anyone can create a pool for a low-quality token, fake token, malicious token, or token with dangerous contract permissions.
A pool may appear active even if liquidity is controlled by insiders or bots.
A token may also have transfer taxes, blacklists, minting functions, or hidden controls that affect trading.
Before trading a new token through an AMM, users should verify the token contract, liquidity depth, holder distribution, permissions, and project documentation.
Smart Contract Risk
AMMs run through smart contracts, so smart contract risk is one of their biggest dangers.
A bug in the pool contract can cause loss of funds, incorrect pricing, failed withdrawals, or unexpected behavior.
A bug in a connected contract can also create risk if the AMM is part of a larger DeFi route.
Audits can reduce risk, but they do not guarantee safety.
Bug bounties, formal verification, open-source review, conservative design, and time-tested code can improve confidence.
Users should be more careful with new AMMs, unaudited contracts, unusual token mechanics, and pools with very high promised rewards.
Smart contract risk is different from normal market risk because losses can happen even if the user made a correct market prediction.
This is why AMM users should understand both the asset and the contract system behind the trade.
Governance Risk
Many AMMs have governance systems that can change fees, pool settings, incentive programs, treasury rules, or upgrade permissions.
Governance can help a protocol adapt, but it can also create risk if voting power is concentrated or admin controls are too broad.
A governance attack may try to change protocol rules in a way that benefits attackers or harms users.
Admin keys can also create centralization risk if a small group can upgrade contracts or change critical settings.
Users should check whether an AMM is immutable, upgradeable, governed by token voting, controlled by a multisignature wallet, or managed through another structure.
There is no single perfect governance model.
The important point is that users should know who can change the rules and under what conditions.
Advantages of AMMs
AMMs allow permissionless trading of crypto assets through smart contracts.
They allow users to access liquidity without relying on a traditional order book.
They allow ordinary users to become liquidity providers and potentially earn trading fees.
They allow new token markets to form quickly when liquidity is supplied.
They operate continuously as long as the blockchain and smart contracts are available.
They support DeFi composability because other applications can connect to AMM pools.
They make pricing rules transparent because pool logic is visible on-chain when the contracts are public.
They also create new ways for communities to bootstrap markets, distribute incentives, and build on-chain financial applications.
Disadvantages of AMMs
AMMs can create slippage when trades are large compared with pool liquidity.
Liquidity providers can suffer impermanent loss when asset prices diverge.
Traders can face MEV, front-running, sandwich attacks, failed transactions, and unexpected execution costs.
Users can interact with fake tokens, malicious contracts, or pools with low-quality liquidity.
Smart contract bugs can lead to direct loss of funds.
Governance changes or admin controls can affect pool rules after users have supplied liquidity.
Low-liquidity pools can produce unreliable prices and create oracle manipulation risk.
High rewards can attract liquidity temporarily but may not create sustainable market depth.
How to Evaluate an AMM Pool
The first thing to check is liquidity depth.
Deeper liquidity usually means lower slippage and better execution.
The second thing to check is trading volume.
Higher volume can generate more fee income for liquidity providers, but it can also reflect short-term incentives or bot activity.
The third thing to check is the asset pair.
A pool with two highly volatile assets can create more impermanent loss risk than a pool with closely related assets.
The fourth thing to check is the fee structure.
Fees should be compared with slippage, volatility, gas costs, and expected LP risk.
The fifth thing to check is contract security.
Users should look for audits, open-source code, bug bounties, and a history of safe operation.
The sixth thing to check is governance and upgrade control.
Users should understand whether rules can change and who has the power to change them.
Best Practices for AMM Traders
AMM traders should check the token contract before swapping unfamiliar assets.
They should review the expected output amount before approving a transaction.
They should use reasonable slippage tolerance based on pool depth and market volatility.
They should avoid trading large amounts through shallow pools without checking price impact.
They should be careful with tokens that have unusual transfer rules or unclear ownership controls.
They should consider splitting large trades when doing so reduces slippage and MEV risk.
They should monitor network fees because high fees can make smaller swaps uneconomical.
They should revoke unnecessary token approvals when they are no longer needed.
Best Practices for Liquidity Providers
Liquidity providers should understand impermanent loss before depositing assets.
They should compare expected fees with potential price divergence between the pooled assets.
They should avoid judging a pool only by advertised annual percentage yield.
They should check whether rewards are paid in a token with real demand or only short-term incentives.
They should understand the withdrawal process and any lockup or penalty rules.
They should monitor pool composition because their asset exposure changes as trades occur.
They should consider whether the pool has enough volume to justify the risk.
They should avoid supplying liquidity to contracts they do not understand.
AMMs and Regulation
AMMs create regulatory questions because they allow trading through autonomous smart contracts rather than a traditional intermediary model.
Regulators may look at who develops the protocol, who controls the interface, who earns fees, who governs upgrades, and whether users receive clear risk disclosures.
The BIS discussion of DeFi risks notes that DeFi can involve a decentralization illusion when governance and control are more concentrated than they appear.
This point matters for AMMs because a pool may look decentralized while upgrades, fee switches, incentives, or front-end access are controlled by a small group.
Regulation may also affect stablecoin pools, tokenized asset pools, liquidity incentives, and interfaces that help users access AMMs.
Users should understand that AMM rules can be shaped by both smart contract code and the legal environment around the applications that connect to that code.
Common Misunderstandings About AMMs
One common misunderstanding is that AMMs always give the best price.
An AMM only gives the price available from its pool and formula at that moment.
Another misunderstanding is that liquidity provision is passive and low-risk.
LP positions can lose value because of impermanent loss, smart contract risk, token risk, and changing incentives.
A third misunderstanding is that high liquidity rewards always mean a good opportunity.
High rewards may exist because the pool has high risk or because incentives are temporary.
A fourth misunderstanding is that a token is safe because it has an AMM pool.
Anyone can create a pool for many token types, so the pool’s existence does not prove quality.
A fifth misunderstanding is that AMM prices cannot be manipulated.
Low-liquidity pools can be moved significantly by large trades, which can create oracle and execution risk.
FAQ
What does AMM mean in crypto?
AMM means Automated Market Maker, which is a smart contract system that lets users trade crypto assets through liquidity pools.
How does an AMM set prices?
An AMM sets prices through a formula based on the balance of assets inside a liquidity pool.
What is a liquidity pool?
A liquidity pool is a smart contract that holds crypto assets so users can trade against the pool.
Who are liquidity providers?
Liquidity providers are users who deposit assets into an AMM pool in exchange for potential fees or rewards.
The constant product formula is x * y = k, where the pool maintains a relationship between two asset balances while trades change their ratio.
What is slippage in an AMM?