...
BTC$87,250.002.34%
ETH$4,120.001.18%
SOL$178.004.72%
BNB$645.000.95%
XRP$2.656.41%
ADA$0.82000.62%
AVAX$42.503.14%
DOGE$0.18002.07%
LINK$32.501.89%
DOT$8.900.44%
UNI$14.202.56%
MATIC$0.58000.71%
BTC$87,250.002.34%
ETH$4,120.001.18%
SOL$178.004.72%
BNB$645.000.95%
XRP$2.656.41%
ADA$0.82000.62%
AVAX$42.503.14%
DOGE$0.18002.07%
LINK$32.501.89%
DOT$8.900.44%
UNI$14.202.56%
MATIC$0.58000.71%
Learn GuideIntermediateUpdated March 2026

Automated Market Makers & Liquidity Pools

An Automated Market Maker (AMM) is a smart contract that enables decentralized trading by using mathematical formulas and liquidity pools instead of traditional order books. This guide covers how AMMs work, the platforms leading the space (Uniswap, Curve, Raydium), concentrated liquidity, and how to manage impermanent loss as a liquidity provider.

What Are Automated Market Makers?

Automated Market Makers (AMMs) are smart contracts that use algorithmic pricing to enable peer-to-contract token swaps. Instead of relying on order books where buyers and sellers match prices, AMMs use liquidity pools—collections of user-deposited assets that traders swap against directly. The price adjusts automatically based on the ratio of assets in the pool, following a mathematical formula called the invariant.

💡Why This Matters

This is one of those topics where surface-level understanding is dangerous. We've seen traders lose significant capital from misconceptions covered in this guide.

Key Insight: AMMs democratized trading. Before AMMs, decentralized trading required order books, market makers, and complex matching engines. AMMs made it possible for anyone to deposit liquidity and earn trading fees, while anyone else could swap instantly without waiting for counterparties.

The three core components of an AMM are: (1) Liquidity Pools — smart contracts holding paired token reserves, (2) Pricing Formula — the mathematical invariant determining swap prices, and (3) Liquidity Providers (LPs) — users who deposit equal values of two tokens and earn a percentage of trading fees. As of March 2026, Uniswap commands ~37% of DEX market share with ~70,000 daily active users across 12 deployed networks.

How AMMs Enable DEX Composability

AMMs aren't just trading venues—they're DeFi primitives. Other protocols build on top of them: yield aggregators route through multiple pools for better prices, lending protocols use AMM prices for oracle data, and yield farming strategies optimize across different AMMs. This composability makes AMMs the foundation of decentralized finance.

The Constant Product Formula

The constant product formula is the core innovation that makes AMMs work. It's deceptively simple: x * y = k, where x and y are the reserves of two tokens in a pool, and k is a constant. This formula ensures that no matter the size of a trade, the product of reserves always equals k after the trade.

The Constant Product Formula: x * y = k

Example: Imagine a USDC/ETH pool with 1,000,000 USDC and 500 ETH. Then k = 500,000,000. A trader wants to buy 1 ETH. They must provide enough USDC so that the new reserves still satisfy the formula:

  • New ETH reserve: 500 - 1 = 499
  • New USDC needed: k / 499 = 500,000,000 / 499 ≈ 1,002,004
  • Cost to buyer: 1,002,004 - 1,000,000 = 2,004 USDC per ETH
  • The more you trade, the worse the price (slippage increases with order size)

This formula creates a critical property: larger trades receive worse prices than smaller trades. This incentivizes liquidity provision—more liquidity in a pool means less slippage, which attracts traders, which generates more fees. It's a virtuous cycle that favors deep, liquid pools over thin ones.

Note: Uniswap V1 and V2 use pure constant product. V3 introduced concentrated liquidity with multiple price ranges. V4 (launched early 2025) offers hooks for custom pricing logic while maintaining the same foundational concept.

Concentrated Liquidity Explained

Uniswap V3 introduced concentrated liquidity, a major innovation that allows LPs to specify a price range and concentrate capital within it. Instead of spreading capital uniformly across all prices (from $0 to infinity), LPs can focus capital where trading actually occurs.

Concentrated Liquidity Benefits

  • Higher Capital Efficiency: 1 unit of capital concentrated in a narrow range can earn the same fees as 100 units spread across all prices
  • Better Fees on Same Capital: Tighter ranges = higher fee earning if trading occurs within that range
  • Managed Impermanent Loss: By keeping ranges tight around the current price, LPs reduce IL risk
  • Flexibility: Create multiple positions at different ranges to adjust risk/reward

However, concentrated liquidity requires active management. If the price moves far outside your specified range, your position provides zero liquidity and earns zero fees. Passive LPs still prefer V2's simplicity, but V3 is dominant for active yield farming and professional LP strategies.

V4 (launched early 2025) builds on V3's concentrated liquidity with hooks—programmable functions that execute before/after swaps and LP actions. This enables dynamic fees (adjust based on volatility), KYC gates, auto-compounding of fees, and custom liquidation logic.

Top AMM Platforms Compared

The AMM landscape is diverse. Each platform offers different trade-offs in terms of chain, model, TVL, and features:

PlatformChainModelTVLSpecial FeatureFee Structure
Uniswap V4Multi-chain (12+)Constant Product + Hooks$5B+Singleton, programmable hooks0.01%, 0.05%, 0.30%, 1%
CurveMulti-chain (14+)StableSwap Invariant$2B+Optimized for stablecoins0.04%-0.4%
RaydiumSolanaHybrid AMM + Order Book$1.4BHigh throughput, low cost0.25%, 0.5%
Balancer V3Multi-chain (6+)Weighted Pools$450M+Multi-token pools, dynamic feesCustom per pool
PancakeSwapBNB Chain, othersConstant Product$800M+Perpetuals, farming focus0.01%-0.25%

Uniswap V4

The market leader (~37% DEX share). V4 introduced singleton architecture and hooks. Hooks allow custom logic: dynamic fees based on volatility, TWAMM (time-weighted AMM for large orders), KYC gates, auto-compounding. Deployed on 12+ networks with $1B+ daily volume.

Curve Finance

The stablecoin trading hub. Curve's StableSwap invariant minimizes slippage for pegged assets. Special for trading stablecoin pairs (USDC/USDT) with <0.1% slippage even on large orders. ~$2B TVL, $500M+ daily volume.

Raydium on Solana

Solana's #1 DEX. Combines AMM with order book (hybrid). Sub-cent transactions and rapid finality make it ideal for high-frequency trading and farming. ~$1B daily volume, $1.4B TVL. Fast-moving, newer projects launch here first.

Balancer V3

Multi-token pools (not just pairs). LPs can create pools with 2-8 tokens at custom weights (not 50/50). Enables index-like strategies and custom portfolio rebalancing. Dynamic fee models allow APY optimization.

Uniswap V4 Hooks Deep Dive

Uniswap V4 (launched early 2025) introduced hooks—programmable functions that execute at key moments in the pool lifecycle. Hooks sit between the user and the pool, allowing custom logic to be inserted without modifying core pool code. This enables innovation at the application layer.

Core Hook Types

  • beforeSwap/afterSwap: Execute custom logic before/after token swaps. Use cases: dynamic fees based on volatility, limit orders, swap routing optimization.
  • beforeAddLiquidity/afterAddLiquidity: Run logic when LPs deposit. Use cases: auto-compounding fees, position rebalancing, KYC checks.
  • beforeRemoveLiquidity/afterRemoveLiquidity:Execute on LP withdrawals. Use cases: custom redemption logic, anti-sandwich protection, liquidity lock mechanisms.
  • beforeDonate/afterDonate: Custom donations (fee injection). Use cases: protocol-owned liquidity funding, governance rewards.

Real-World Hook Examples

  • Dynamic Fees: Fees auto-adjust from 0.01% to 1% based on 1-hour volatility. Low volatility = low fees (tight spreads), high volatility = high fees (compensation for risk).
  • TWAMM Hook: Time-Weighted Average Market Maker allows splitting large orders across time periods, reducing slippage by averaging entry prices.
  • Auto-Compounding Hook: Automatically reinvest earned fees back into the LP position, compounding returns without manual intervention.
  • KYC Gate Hook: Restrict LP participation to whitelisted addresses, enabling institutional-grade pool controls.

V4's singleton architecture (single router contract) combined with hooks creates a highly flexible platform. Developers can launch specialized pools with custom economics without forking Uniswap's core contracts. This drives innovation while maintaining security through Uniswap's audited hook interface standards.

Becoming a Liquidity Provider

Being an LP is straightforward but requires understanding the risks. Here's the step-by-step process and considerations:

  1. Choose a Pool & Platform: Select the trading pair and AMM. Consider: TVL (liquidity depth), fee tier (higher fees = higher yield but higher slippage/IL), platform fees, and available incentives.
  2. Deposit Equal Values: LPs must provide equal values of both tokens. If you LP on a 100 USDC / 0.1 ETH pool, deposit amounts should maintain this ratio (or the contract will rebalance).
  3. Receive LP Tokens: Once deposited, you receive LP tokens representing your share of the pool. These track your principal + earned fees. You can sell LP tokens (withdraw) or stake them for additional incentives.
  4. Monitor Position: On V3/V4: monitor if trading stays in your price range. On V2/Curve: passive unless managing impermanent loss. Check fee earnings vs IL impact quarterly.
  5. Harvest Fees (Optional): Earn trading fees passively. Some hooks (V4) auto-compound. Otherwise, manually claim fees and decide: keep as stables, reinvest, or exit.
  6. Exit When Ready: Burn LP tokens to withdraw principal + accrued fees. Fees = your share of pool fees since deposit. No forced holding period (unless incentivized).

LP Yield Sources

  • Trading Fees

    Proportional share of swap fees. Example: 0.3% fee pool with $1M daily volume = $3,000 daily fees split among LPs.

  • Incentive Rewards

    Additional token rewards (often governance tokens) to bootstrap liquidity. Uniswap, Curve, Balancer may offer 2-5% APY in rewards.

  • Governance Yield

    Some protocols (Curve veCRV, Aura) distribute protocol revenue to governance token holders staking LP positions.

Use tools like our Yield Farming Calculator to estimate expected returns. Transparent LPs model scenarios: "If I deposit $10K in a 0.3% fee pool with $50M TVL and current trading volume, what's my monthly fee yield?" Then compare to impermanent loss risk.

Impermanent Loss Explained

Impermanent Loss (IL) is the primary risk for LPs. It occurs when the price of one token diverges from the price when you deposited. The larger the divergence, the more IL you incur. It's called "impermanent" because if prices converge back to where they were, the loss disappears.

Impermanent Loss Example

You deposit 1 ETH + 1,000 USDC (ratio 1:1,000, current price = $1,000/ETH). The pool maintains x * y = k. If ETH rises to $1,500:

  • Your LP position: ~0.816 ETH + 1,225 USDC (price ratio changed to maintain k)
  • Your position value: 0.816 * $1,500 + $1,225 = $2,449
  • If you'd held 1 ETH + 1,000 USDC: $1,500 + $1,000 = $2,500
  • IL = $51 (2% loss) on a 50% price move

IL Rule of Thumb: A 50% price movement in one direction causes ~25% IL. A 2x price move causes ~5.7% IL. A 10x move causes ~50% IL. This is unavoidable in constant product AMMs unless you use concentrated liquidity.

To manage IL, LPs can: (1) Choose stable pairs: USDC/USDT has minimal IL since prices are pegged. (2) Use concentrated liquidity: V3/V4 ranges keep capital focused, reducing IL exposure for volatile pairs. (3) Ensure fees exceed IL: If your pool earns 5% APY in fees and experiences 4% IL, you're +1% overall.

Check our Impermanent Loss Calculator to estimate IL for your specific pairs and price scenarios before depositing.

Advanced AMM Designs

Beyond the constant product formula, innovative AMM designs optimize for specific use cases:

StableSwap Invariant (Curve)

Optimized for pegged assets (stablecoins, wrapped tokens). Uses a hybrid formula that maintains tight price bands near peg while enabling large swaps with minimal slippage. USDC/USDT slippage: <0.1%. Enables profitable arbitrage.

Weighted Pools (Balancer)

Support non-50/50 ratios. Example: 50% ETH + 30% USDC + 20% DAI. Functions as an auto-rebalancing index. Weighted pools create different IL profiles and enable portfolio-like strategies.

Hybrid Pools (Raydium)

Combine AMM pricing with order book matching. Traders can place limit orders or market orders. Hybrid model reduces slippage compared to pure AMM while enabling order-book efficiency.

Proof-of-Liquidity (Berachain)

Validators earn yields by directing liquidity to specific pools. Novel incentive structure where liquidity provision is a consensus mechanism, not just a trading feature.

Risks & Considerations

LPs and traders should be aware of the following risks:

Impermanent Loss

Diverging token prices force your position into unfavorable ratios. Volatile pairs require significant fee yield to offset IL.

Smart Contract Risk

AMM contracts are complex. Bugs in pricing logic, hooks, or fee calculations can lead to funds loss. Use audited platforms (Uniswap, Curve, Balancer) over newer AMMs.

Liquidity Rug Pulls

Some protocols allow creators to withdraw liquidity without warning. Check if pools have time-locks or governance-controlled removals.

Low Liquidity Slippage

New or unpopular pairs have low TVL, making swaps expensive. A $10K trade might move the price 50%, costing you 5% slippage.

Oracle Attacks

If other protocols rely on your AMM for price data, attackers can manipulate prices via large, temporary trades, then exploit dependents.

Token Depegging

Stablecoin L Ps face depeg risk. If a stablecoin loses its peg permanently, your LP position holds mostly worthless tokens.

Liquidity Provider Warning:

LPing on new tokens or low-liquidity pairs is high-risk. You're competing with sophisticated market makers and arbitrageurs. Unless you have a thesis on the token's fundamentals and can actively manage your position, stick to large, established pairs on major platforms.

Frequently Asked Questions

What is an Automated Market Maker?

An Automated Market Maker is a smart contract that uses mathematical formulas (invariants) to price assets and enable trading without an order book. Instead of matching buyers and sellers, AMMs use liquidity pools where users can swap tokens directly.

What is the constant product formula (x * y = k)?

The constant product formula is the pricing mechanism used by Uniswap and most AMMs. It maintains a constant product of two token reserves: x * y = k. When you swap one token for another, the ratio changes but the product stays constant, automatically determining the price based on supply and demand.

What is impermanent loss?

Impermanent loss (IL) occurs when the price of tokens in a liquidity pool diverges from the price when you deposited them. If you LP at a 1:1 price ratio and the price moves 2x in one direction, you'll have less of the appreciated asset and more of the depreciated one compared to simply holding. It's called impermanent because it can reverse if prices converge back.

How do I earn yield as a liquidity provider?

LPs earn a portion of trading fees proportional to their share of the pool. For example, if a Uniswap V4 pool has a 0.3% fee and $1M trades through it daily, the pool collects $3,000 in fees, distributed to LPs. You can also earn additional incentives (rewards) on top of fees.

What is concentrated liquidity?

Introduced in Uniswap V3, concentrated liquidity allows LPs to specify a price range and concentrate their capital within it. Instead of spreading capital across all prices, LPs can focus capital where trading actually occurs, earning higher fees on the same capital with less IL risk.

Which AMM should I use?

Choose based on your use case: Uniswap V4 for maximum flexibility and hooks, Curve for stablecoin/low-slippage trades, Raydium on Solana for speed and volume, or Balancer for weighted pools. Compare fees, TVL, daily volume, and available incentives on each platform.

Related Resources

Disclaimer: This guide is for educational purposes. AMMs, liquidity pools, and DeFi carry significant risks including impermanent loss, smart contract bugs, and total capital loss. Always conduct due diligence before depositing. Past yields do not guarantee future returns. Verify all data independently.

This guide was last updated March 23, 2026. DeFi moves fast. Always verify current yields, TVL, and protocol details before deploying capital.

D
DegenSensei·Content Lead
·
Mar 23, 2026
·
Updated Apr 12, 2026
·
6 min read

Educational disclaimer: This guide is for informational purposes only and does not constitute financial advice. Crypto involves significant risk — do your own research before making any decisions. Learn more about our team.

Explore More

All Learning GuidesCrypto ToolsCompare Projects