Quick answer: an automated market maker (AMM) is a type of decentralized exchange (DEX) protocol that uses a mathematical formula to price assets and execute trades automatically, without relying on a traditional order book or human market makers.
What is an automated market maker?
In traditional finance, stock exchanges like the NYSE rely on market makers: professional firms that continuously post buy and sell orders, providing liquidity for other traders. If you want to buy 100 shares of Apple, a market maker stands ready on the other side of the trade.
Automated market maker: a smart contract that holds reserves of two or more tokens in a liquidity pool, uses a pricing algorithm to determine exchange rates in real time, and settles trades on-chain without any centralized intermediary.
AMMs replaced the order book model entirely. Instead of matching buyers with sellers, they match traders with liquidity pools. Anyone can deposit tokens into a pool and earn a share of trading fees as a liquidity provider (LP). This model powers most decentralized exchanges on Ethereum and its Layer 2 networks, including Base.
According to DeFiLlama data from early 2026, DEX trading volume across all chains regularly exceeds $20 billion per week, with AMM-based protocols accounting for the vast majority of that activity.
How AMMs work: the constant product formula
The dominant AMM design, first introduced by Uniswap in 2018, uses what is called the constant product formula:
x * y = k
Where:
- x = reserve of token A in the pool
- y = reserve of token B in the pool
- k = a constant that never changes
When a trader swaps token A for token B, they add to the pool's reserve of A and remove from the reserve of B. The formula ensures the product of both reserves stays constant, which automatically adjusts the price. The more of one token you take out, the more expensive it becomes relative to the other.
A practical example
Suppose a USDC/ETH pool holds 1,000,000 USDC and 400 ETH. The implied price of ETH is 2,500 USDC. If a trader buys 10 ETH from the pool:
- ETH reserve drops from 400 to 390
- To keep k constant, USDC reserve must rise to approximately 1,025,641 USDC
- The trader pays roughly 25,641 USDC for 10 ETH, an effective price of ~2,564 per ETH
The difference between the spot price (2,500) and the execution price (2,564) is called slippage. Larger trades cause more slippage. Deeper liquidity pools reduce slippage, which is why liquidity depth is one of the most important metrics for any DEX.
The role of liquidity providers
Liquidity providers (LPs) deposit equal values of two tokens into a pool. In exchange, they receive LP tokens representing their share of the pool. As traders pay fees (typically 0.05% to 1% per swap, depending on the pool tier), those fees accumulate in the pool, increasing the value of each LP token.
| Role | Action | Reward |
|---|---|---|
| Liquidity provider | Deposits token pair into pool | Share of trading fees + LP tokens |
| Trader | Swaps one token for another | Execution at algorithmic price |
| Protocol | Governs fee tiers, upgrades | May collect a protocol fee |
However, LPs face a risk that does not exist in traditional savings or staking: impermanent loss. If the price of one token in the pair changes significantly after you deposit, you may end up with less total value than if you had simply held the tokens. The "impermanent" label means the loss becomes realized only if you withdraw at that point; if prices return to the original ratio, the loss disappears.
AMM types and evolution
The constant product formula is not the only approach. Different AMM designs optimize for different use cases.
| AMM Type | Formula | Best For | Examples |
|---|---|---|---|
| Constant product | x * y = k | General token pairs | Uniswap v2, SushiSwap |
| Concentrated liquidity | Custom price ranges | Capital efficiency | Uniswap v3/v4, Aerodrome |
| StableSwap | Hybrid formula | Stablecoin pairs | Curve Finance |
| Weighted pools | Multi-asset, custom weights | Index-like portfolios | Balancer |
| Dynamic fees | Fee adjusts with volatility | High-volatility pairs | Various v3 forks |
Uniswap v3 introduced concentrated liquidity in 2021, allowing LPs to allocate capital within specific price ranges rather than across the entire curve from zero to infinity. According to Uniswap's own research, concentrated liquidity increased capital efficiency by up to 4,000x for stablecoin pairs compared to the v2 design.
AMMs vs. traditional order books
Understanding what AMMs replaced helps explain their significance.
| Dimension | AMM (DEX) | Order Book (CEX) |
|---|---|---|
| Custody | Non-custodial: you hold your keys | Custodial: exchange holds your funds |
| Market maker | Smart contract (algorithmic) | Human or firm |
| Liquidity source | Anyone can provide liquidity | Professional market makers |
| Price discovery | Formula-driven, reactive | Bid/ask matching |
| Downtime risk | None (blockchain never stops) | Exchange can halt trading |
| Transparency | All trades on-chain, verifiable | Opaque internal order book |
| Minimum capital | Any amount | Often minimum order sizes |
| Settlement | Immediate, on-chain | T+0 or T+2 depending on platform |
The FTX collapse in November 2022 demonstrated the systemic risk of custodial exchanges. AMM-based DEXs, by contrast, cannot freeze user funds or engage in undisclosed lending because all logic is encoded in auditable smart contracts. According to Chainalysis research, DEX volume as a percentage of total crypto trading volume has grown steadily since 2020, accelerating after each major CEX failure.
Key risks of using AMMs
AMMs offer real advantages, but they come with risks worth understanding:
- Impermanent loss: Price divergence between pooled assets reduces LP returns compared to simple holding.
- Smart contract risk: Bugs or exploits in the AMM contract can drain pools. Several AMMs have suffered nine-figure hacks over the years.
- Front-running and MEV: Miners and bots can insert transactions before yours to extract value from large swaps.
- Slippage on thin markets: Low-liquidity pools produce poor execution prices for any meaningful trade size.
- Price oracle manipulation: Some protocols that rely on AMM spot prices for oracles are vulnerable to flash loan attacks.
- Regulatory uncertainty: Regulatory treatment of DeFi protocols and LP fee income remains unclear in most jurisdictions.
Key insight: the risks above are real but manageable. Choosing pools with deep liquidity, audited contracts, and battle-tested protocols reduces most of the practical risk for ordinary users.
How AMMs fit into DeFi index funds
AMMs are the trading infrastructure that makes DeFi index funds possible. When an on-chain index fund rebalances its portfolio, it executes swaps through AMMs to adjust its token weights. The quality of those swaps, the slippage incurred, and the fees paid all affect the net return delivered to index fund investors.
This is why QINV (qinv.ai), an AI-managed index fund on Base, routes rebalancing trades through the deepest and most capital-efficient AMM pools available on Base. Rather than building their own trading infrastructure, QINV's smart contracts interact directly with established AMMs, benefiting from the liquidity depth those protocols have aggregated. The AI layer manages which assets to hold and at what weights; AMMs handle the actual execution.
For investors, this means you do not need to interact with AMMs directly. You buy Portfolio Tokens, and the underlying rebalancing happens automatically, transparent and verifiable on BaseScan.
How to use an AMM: step by step
If you want to swap tokens or provide liquidity directly on an AMM, here is the standard flow:
Step 1: Set up a Web3 wallet
You need a self-custody wallet like MetaMask, Coinbase Wallet, or Rabby. These wallets let you interact with smart contracts directly from your browser.
Step 2: Bridge assets to your target network
AMMs exist on many chains. Aerodrome Finance, for example, is the leading AMM on Base. To use it, you first bridge assets from Ethereum mainnet to Base via the Base bridge or a third-party bridge like Across Protocol.
Step 3: Connect your wallet to the DEX
Visit the AMM's official interface (always verify the URL), click "Connect Wallet", and approve the connection. Never connect to URLs found in social media comments or DMs.
Step 4: Execute a swap or add liquidity
For a swap: select the input token, output token, enter the amount, review the price impact and slippage tolerance, and confirm. For liquidity provision: select a pool, choose a price range (if concentrated liquidity), deposit both tokens in the required ratio, and receive LP tokens.
Step 5: Monitor and manage
Track your LP position's fees earned and impermanent loss over time. Most DEX interfaces show this in the "My positions" section. Withdraw at any time by returning your LP tokens.
Frequently asked questions
What is an automated market maker in simple terms?
An automated market maker is a smart contract that acts as both buyer and seller for any token it holds. It uses a pricing formula to calculate exchange rates automatically, so trades can happen 24/7 without a centralized exchange or human counterparty. Think of it as a vending machine for tokens: put in one token, get out another, with the price set by the machine's formula.
What is the difference between an AMM and a DEX?
A DEX (decentralized exchange) is the broader category: any exchange that operates via smart contracts without taking custody of user funds. An AMM is one specific mechanism a DEX can use to provide liquidity and price assets. Most leading DEXs today (Uniswap, Aerodrome, Curve, Balancer) use AMM mechanisms, but some DEXs use on-chain order books instead.
Is providing liquidity to an AMM profitable?
It can be, but it depends on the pool's fee income versus the impermanent loss from price divergence. Stablecoin/stablecoin pools have very low impermanent loss and can generate steady fee income. Volatile pairs like ETH/MEME tokens carry higher impermanent loss risk. Most serious LPs model their expected returns before deploying capital.
Which AMMs are available on Base network?
The leading AMMs on Base in 2026 include Aerodrome Finance (the highest-volume DEX on Base), Uniswap v3 (also deployed on Base), and BaseSwap. Aerodrome is a fork of Velodrome on Optimism, optimized for Base's ecosystem with a vote-escrow incentive model.
How does an AMM determine the price of a token?
The price is not set externally: it emerges from the ratio of token reserves in the pool. If a pool holds equal dollar values of ETH and USDC, and traders start buying ETH heavily, the ETH reserve drops and the USDC reserve rises, which pushes the AMM's implied ETH price higher. Arbitrageurs then step in to align the AMM price with prices on other platforms, which is what keeps AMM prices close to global market prices.
Do I need to understand AMMs to invest in DeFi?
Not necessarily. If you use a managed DeFi platform or index fund, the underlying AMM interactions happen automatically. Understanding AMMs helps you evaluate the security, fees, and risks of the platforms you use, but you do not need to interact with them directly.
If you want diversified crypto exposure without the complexity of managing individual assets, QINV offers AI-managed on-chain index fund tokens on Base network. Connect your wallet and get started in minutes.
This article is for educational purposes only and does not constitute financial or investment advice.



