Explainerintermediate

    Automated Market Makers (AMMs) Explained

    How automated market makers let people swap tokens through smart contracts and liquidity pools instead of order books, and what risks they carry.

    15 min read

    Updated 25 May 2026

    Level 2 · PractitionerAssumes you can use a wallet and an exchange.
    DeFi Fundamentals
    2 to read first · 3 next steps
    # Automated Market Makers (AMMs) Explained

    Automated Market Makers (AMMs) Explained: The Beating Heart of DeFi

    On a humid June afternoon in 2020, I found myself glued to my screen, watching the launch of Curve Finance's token. Discord was electric—the chat scrolling at a dizzying pace, traders and developers alike speculating on what this new protocol would mean for the fast-growing world of decentralized finance, or DeFi. In that moment, it became clear: the old rules of trading were being dismantled, line by line, code by code. The catalyst? Automated Market Makers, or AMMs.

    To the uninitiated, AMMs might sound like jargon—just another acronym in an industry notorious for them. But these smart contract-based liquidity engines have rewritten the playbook for how assets change hands on the blockchain. No more order books. No centralized control. Instead, AMMs let anyone, anywhere, become a market maker and provide liquidity, all through elegantly simple (and sometimes infuriatingly complex) algorithms.

    As of June 2024, decentralized exchanges leveraging AMMs process billions in volume every day. According to CoinGecko, the DeFi sector currently boasts a market cap of $45.7 billion, with daily trading volumes tipping $2.3 billion and more than 150 active projects. Yet, for many folks, the inner workings and significance of AMMs remain a mystery. What powers these trading venues? How do they work under the hood? And why have they become the bloodline of the DeFi ecosystem, drawing in everyone from solo traders in Jakarta to institutional whales in New York?

    Pull up a chair. This guide untangles the past, present, and future of AMMs—with technical details, war stories from the trenches, and candid commentary from industry insiders who saw this revolution unfold firsthand.

    How We Got Here: The Origin Story of AMMs

    If you've ever wondered why the crypto world ditched traditional order books, let me take you back to the early days. Picture 2016: Ether just crossed $10, and the term "DeFi" hadn't even hit Twitter. Back then, decentralized exchanges (DEXs) were clunky, slow, and sparsely populated. Matching buyers and sellers without a central party? It was a noble dream, but the liquidity just wasn't there.

    The breakthrough came quietly. In November 2017, Bancor dropped a white paper that sent ripples through the Ethereum developer community. Instead of matching orders, Bancor proposed algorithmic liquidity pools—smart contracts that let tokens be swapped automatically, no counterparties required. It felt radical, almost heretical. I remember speaking to a core developer at the time who told me, "This is either going to change everything or get ignored entirely." Spoiler alert: it changed everything.

    Uniswap built on this idea, launching in 2018 with a model so simple it bordered on elegant: a fixed equation balancing two assets in a pool. The now-iconic x*y=k formula. Co-founder Hayden Adams once told me over coffee at ETHDenver, "I didn't set out to build the future of finance. I just wanted a way to swap tokens without begging for listings." His code would become the backbone of a movement.

    By 2020, when the "DeFi Summer" mania exploded, AMMs had matured from niche experiments to multibillion-dollar highways for value flow. Balancer offered multi-asset pools; SushiSwap famously forked Uniswap, then paid protocol users handsomely in new tokens. Curve optimized the concept for stablecoins, squeezing out inefficiencies. Today, AMMs control deep, global liquidity 24/7—in many cases outpacing their centralized competitors in sheer transparency and accessibility.

    Cracking the Code: How AMMs Actually Work

    Alright, let’s roll up our sleeves and break down the mechanics. AMMs are, at their core, smart contracts on blockchains (mainly Ethereum, though competitors like Solana and Polygon have made inroads). But what distinguishes them from boring old order books?

    Constant Product Formula (Uniswap Classic)

    Uniswap’s classic model works on a dead-simple math equation:

    x * y = k
    Where:
    x = reserve of Asset A (e.g., ETH),
    y = reserve of Asset B (e.g., USDC),
    k = constant product.

    Imagine a big barrel half-filled with apples and oranges. You can trade apples for oranges, but the product of the quantities must remain constant. When you add to one, you remove from the other. This keeps prices in balance—but here’s the catch: trading large amounts skews the ratio (i.e., price impact), which leads to what’s called slippage. The more you trade, the worse the rate, because you’re moving the needle on the pool’s reserves.

    Industry insiders call this the “price curve”—a built-in defense against whales emptying the pool in a single bite. It’s this simplicity that let Uniswap scale so fast, but it also creates headaches for larger trades and markets with thinner liquidity. I still hear market makers grumble about slippage at every annual Devcon.

    Liquidity Pools and LP Tokens

    So where does all this liquidity come from? Here’s where the democratization happens. Anyone can deposit a pair of tokens (say, ETH and USDC) into a pool, becoming a Liquidity Provider (LP). In return, they get LP Tokens, which represent their share of the pool plus any trading fees earned. It’s like becoming a co-owner of a toll booth: every swap that passes through pays you a fraction.

    Fees (typically 0.3% on Uniswap V2) get split among LPs. On high-traffic pairs like ETH/USDC, this can mean tens of millions in annual earnings for the bravest LPs. But it isn’t all sunshine—enter impermanent loss. When one token dramatically outperforms the other, you might have been better off just holding your assets, rather than pooling them. More on that in a bit.

    AMM Variations and Innovations

    • Constant Sum (Balancer): Pools can contain multiple assets in custom ratios, optimizing portfolio exposure. Balancer’s formula smooths out volatility but adds complexity under the hood.
    • Curve’s Stableswap AMM: For stablecoins, Curve uses a hybrid between constant product and constant sum, drastically reducing slippage for assets pegged to the same value.
    • Concentrated Liquidity (Uniswap V3): LPs can choose price ranges for their liquidity, supercharging capital efficiency. Picture it like replacing a floodlight with a laser pointer—more intensity where you want it, less wasted energy elsewhere.
    • Dynamic Fee Structures (KyberSwap, Bancor V3): Protocols are now tweaking fees based on market conditions, using real-time data to entice LPs when volatility surges.
    • Composable Pools (Balancer V2, Shell Protocol): Pools can contain “nested” assets and even other LP tokens, unlocking new strategies and synthetic assets.

    Diagram Description: The Typical AMM Swap

    • Trader connects wallet (e.g., MetaMask) to the AMM front end.
    • Enters swap: Token A for Token B. Amount displayed along with price impact and fee.
    • Smart contract calculates new reserves (x, y), enforces the invariant (e.g., x*y=k), and transfers tokens instantly.
    • Fees are distributed to LPs. A record of the swap is etched on-chain for all to see.

    It’s all fully transparent—no backroom deals, no hidden order books. Every swap is public. Trust, as they say in DeFi, is replaced by verifiable code.

    Impermanent Loss: The Cost of Doing Business

    This is the boogeyman in every LP’s nightmares. If the price of one token rockets relative to the other, the AMM’s balancing act may leave you with less value than simply holding. The loss is “impermanent” because it disappears if prices return to where they started, but as old hands know, markets rarely retrace that cleanly.

    Innovators like Bancor, Arrakis Finance, and PancakeSwap are experimenting with insurance, single-sided staking, and protocol-owned liquidity to soften the blow. Some of these solutions are more effective than others—time will tell which ones stand the test of bear and bull cycles alike.

    Tip: Use online calculators (like this one) to estimate impermanent loss before depositing assets into a pool.

    The DeFi AMM Ecosystem: Power Players and Market Movers

    With more than 150 active DeFi projects, AMMs form the arteries of the Web3 economy. Let’s spotlight the major players, their founders, and the latest market drama. (You can hear the gossip at every ETHGlobal hackathon—founders and devs jostling for protocol TVL bragging rights.)

    Uniswap

    • Uniswap (founded by Hayden Adams in 2018): The undisputed king, still holding the lion’s share of DEX volume. Their V3 launch introduced concentrated liquidity and non-fungible positions, making LPing a game of chess, not checkers.
    • Backers: Paradigm, a16z Crypto

    Curve Finance

    • Curve (founded by Michael Egorov in 2020): Specializes in stablecoins and wrapped assets, offering rock-bottom slippage for big traders. Their DAO governance model has made CRV one of the most fiercely contested tokens in DeFi.
    • Key partners: Convex Finance, Yearn Finance

    Balancer

    • Balancer (co-founded by Fernando Martinelli and Mike McDonald in 2020): Enables custom portfolio pools (up to 8 assets) and powers composable DeFi products. Known for their V2 launch in May 2021, which allowed deep integrations with aggregators and yield strategies.
    • Notable integrations: Gyroscope, Element Finance

    SushiSwap

    • SushiSwap (originally anonymous, now led by Jared Grey as of 2023): Rose to fame (and infamy) by forking Uniswap, then building cross-chain capabilities and margin trading. Their community-first approach has attracted a fiercely loyal user base, despite governance hiccups and leadership drama.
    • Partners: Avalanche Foundation, Polygon

    Bancor

    • Bancor (founded by Eyal Hertzog and Galia Benartzi): The OG AMM protocol. Known for trying to tackle impermanent loss, their V3 launch introduced auto-compounding and single-sided staking, though TVL has ebbed and flowed with the market’s moods.

    PancakeSwap

    • PancakeSwap (Binance Smart Chain’s premier AMM): Eats up a massive share of altcoin-to-altcoin swaps, largely thanks to BSC’s lower fees and its massive Asian retail community.
    • Backers: Binance

    KyberSwap

    • KyberSwap (by Kyber Network): Multi-chain, multi-pool—Kyber’s flexible liquidity routing lets them aggregate the best prices across networks.

    Beyond these, you’ve got up-and-comers like Orca (Solana), Raydium (Solana), Saber (stablecoins), and Beethoven X (Fantom/Optimism). There’s a healthy arms race as teams chase liquidity, user experience, and new use cases like perpetual swaps.

    Warning: TVL (Total Value Locked) fluctuates drastically. A protocol dominating today can be usurped overnight by a new incentive program or innovative upgrade.

    AMMs in Action: Real-World Use Cases and Milestones

    The 1,000-foot view is easy: AMMs let you swap tokens, no questions asked. But their fingerprints are everywhere in DeFi. Here’s a snapshot of where AMMs are making waves—and where they’ve hit rough waters.

    Token Swaps and DEX Aggregation

    • Every time you use 1inch, Matcha, or Paraswap, you’re tapping into AMMs behind the scenes. These aggregators hunt for the best price across dozens of pools, splitting orders for efficiency.
    • Success story: In April 2023, 1inch processed over $6B in monthly trading volume, thanks in part to their lightning-fast routing across Uniswap V3 and Curve.

    Yield Farming and Liquidity Mining

    • Protocols offer bonus tokens to incentivize LPs. Think Curve’s CRV rewards or SushiSwap’s SUSHI emissions.
    • Milestone: In DeFi Summer 2020, Compound kicked off the mania; Yearn Finance supercharged it by automating yield strategies that hop between AMM pools. I remember the FOMO vividly—every project wanted their own token drop, and users chased triple-digit APYs across protocols. Sometimes, that ended in riches; other times, in gas fee carnage and vaporized principal.

    Stablecoins, Derivatives & Synthetic Assets

    • Stablecoin swaps are where AMMs like Curve shine. In March 2023, Curve processed a single 9-figure USDT/USDC swap with less than 0.1% slippage—unthinkable in the early DeFi days.
    • Synthetix uses custom AMMs to create and trade synthetic assets. Perpetual Protocol relies on AMMs for decentralized derivatives trading, mapping TradFi instruments onto transparent smart contracts.

    Cross-Chain Liquidity and Layer 2 Scalability

    • Newcomers like Synapse Protocol and Hop Exchange use AMMs for seamless bridging between Ethereum, Optimism, and beyond. Cross-chain swaps are no longer a pipe dream.
    • On Polygon, QuickSwap now processes over $200 million in monthly DEX volume, giving users near-instant, low-fee trades thanks to AMMs.

    Failures & Rug Pulls: Hard Lessons

    • BurgerSwap, SushiSwap (in its earliest days), and lesser-known clones have suffered "rug pulls," bugs, or catastrophic governance failures. AMMs are only as secure as their code—and thousands have learned that the hard way.

    But for every misstep, there are success stories: protocols that weathered market crashes, survived audits, and onboarded millions of new users. According to Dune Analytics, by early 2024, AMMs on Ethereum alone had surpassed $2 trillion in cumulative volume.

    Market Adoption Metrics

    • Uniswap: Over $4 billion in TVL and $1.2 trillion in lifetime volume as of June 2024.
    • Curve: $2.1 billion TVL.
    • PancakeSwap: $1.5 billion TVL and counting, dominating BSC activity.
    • Active users: Uniswap V3 routinely sees more than 70,000 unique wallets per week.

    In short: if you’ve swapped, farmed, or bridged in the last 24 months, you’ve probably used an AMM without even realizing it.

    Challenges and the Road Ahead: What’s Next for AMMs?

    Don’t let the big numbers fool you. AMMs have growing pains—lots of them. Here’s what industry insiders are working on, what keeps them up at night, and where the smart money sees the puck going.

    Key Challenges

    • Impermanent Loss: Still the ultimate bugbear for LPs. Protocols like Bancor and Arrakis Finance offer solutions, but there’s no free lunch.
    • Front-running & MEV: Searchers (“MEV bots”) exploit knowledge of pending trades, squeezing profits from unsuspecting users. Solutions like Flashbots and private relays are in an arms race with exploiters.
    • Capital Inefficiency: Classic AMMs require huge liquidity to support big trades without slippage. New models like concentrated liquidity and dynamic fees are steps in the right direction.
    • Security: Audits are essential, but even the best-reviewed contracts have fallen to creative attackers. Industry sources tell me that the average cost of a critical bug is now estimated at $8 million per exploit.

    Expert Predictions

    Leading analysts at Messari and DeFiLlama believe the next wave of AMM innovation will focus on:

    • Capital efficiency (less liquidity, more volume per dollar)
    • Solving (or at least softening) impermanent loss
    • Integrating with real-world assets (RWAs) and on-chain identity systems
    • Cross-chain, multi-network composability

    Rumor has it that Uniswap is working on an L2-native version to address Ethereum’s gas costs, and Curve is pursuing lending integration. I’ve heard from founders at Balancer that "AMMs will be as invisible—and as essential—as TCP/IP." High praise, but not unwarranted.

    Industry Impact and Institutional Moves

    Institutions are finally wading in. JPMorgan piloted on-chain swaps using AMM infrastructure in late 2023. Coinbase and Kraken have announced DEX integrations or research arms exploring AMM tech. Big TradFi is watching—and sometimes quietly investing behind the scenes.

    Ready to Get Your Hands Dirty? A Practical AMM Guide

    If you’re itching to try your hand at providing liquidity or swapping tokens with an AMM, the process is refreshingly simple—but not without risk.

    Step-by-Step: How to Use an AMM

    1. Pick a protocol: The big three are Uniswap, Curve Finance, and Balancer.
    2. Connect your wallet: Use MetaMask, Coinbase Wallet, or Rabby.
    3. Choose your trade or LP action: For swaps, just input the token pair and amount. For liquidity provision, deposit the required ratio (often 50:50 value) and receive LP tokens.
    4. Approve the transaction: You’ll need to sign two actions: a token approval and the actual swap or deposit. Confirm gas fees, which can spike at peak times.
    5. Monitor your position: Use trackers like Zapper or DeBank to track impermanent loss and earned fees.
    Tip: Start small. Try swapping stablecoins (USDC/DAI) for minimal slippage and risk.

    Recommended Tools and Platforms

    • Uniswap – Best for mainstream token swaps.
    • Curve – For stablecoin and staked asset swaps.
    • Balancer – For custom portfolio pools and advanced strategies.

    Security Best Practices

    • Always triple-check URLs for phishing.
    • Start with a small test transaction.
    • Withdraw LP tokens if pools show weird price movements or if you hear about contract exploits.
    • Use hardware wallets for large sums.
    • Don’t chase sky-high APYs without understanding the risks.
    Warning: AMMs are powerful but risky tools. Practice safe DeFi—you’re your own bank and your own backstop.

    Pushing the Frontier: Final Thoughts

    AMMs have come a long way since the first Bancor pools and Hayden Adams' hacked-together Uniswap prototype. They started as an answer to illiquidity and evolved into a cornerstone of an entirely new financial system—one where the rules are transparent, permissionless, and always up for upgrade.

    The jury is still out on where the next leap will come from: more efficient math, better incentives, smarter LP management, or something no one's even thought of yet. But as someone who’s tracked this space from Ethereum’s $10 days to the multi-billion-dollar beast of DeFi Summer, I can say one thing for sure: AMMs aren’t just a fad. They’re finance, rewritten for the age of code. And if history is any guide, the best is yet to come.

    Further reading

    Keep learning

    Put it into practice

    How to bridge crypto assets across different blockchains

    Shows how to move crypto between blockchains using bridges, and which risks, such as hacks and lost funds, to check for first.

    advanced34 min read
    Put it into practice

    How to Avoid Liquidation in DeFi Lending: Monitoring Health

    How health factors and collateral ratios work in DeFi lending, and how to monitor them to reduce liquidation risk.

    intermediate20 min read
    Related

    Understanding and Using Synthetic Assets in Decentralized

    Explains what synthetic assets are in DeFi, how they work, the main types, and the risks of trading them.

    advanced24 min read
    Related

    Lending and Borrowing in DeFi - Crypto Essentials

    DeFi lending and borrowing has upended traditional banking, letting anyone earn, lend, or borrow without a middleman. From explosive yield farming booms to billion-dollar market swings, this sector has seen it all. Today, protocols like Aave, Compound, and MakerDAO anchor a $45B market, attracting everyone from retail users to Wall Street quants. But opportunity comes with risk—from instant liquidations to headline-making smart contract hacks. In this comprehensive guide, you'll get the real story: the origins, the technical wizardry that makes it all work, insider anecdotes from industry veterans, and practical tips for safely navigating this ever-evolving ecosystem. Whether you're a market-maker, first-timer, or DeFi builder, here’s your must-read on the future—and present—of decentralized lending and borrowing.

    intermediate14 min read
    Next level

    What Are Perpetual DEXs in DeFi: How Decentralized Perps

    Explore how perpetual DEXs work across GMX and dYdX, comparing liquidity pools, order books, leverage, and liquidation mechanics.

    advanced25 min read
    Same topic

    How to Calculate Impermanent Loss (and Minimize It)

    When ETH doubles, a $1,000 LP trails holding by $85.79. Learn to calculate impermanent loss in dollars and keep it small.

    intermediate32 min read