How Automated Market Makers Actually Work

Automated market makers use a constant product formula — not order books or brokers — to set prices on-chain. This post explains the mechanism, why slippage works the way it does, and what would displace the model.
Lewis Jackson
CEO and Founder

Most people who use DEXes have no idea how price is determined. They click “swap,” tokens move, there’s a fee, and something happens. The mental model most people carry is vague: “a pool of tokens” and “an algorithm.” That’s technically correct, but it’s not explanatory.

The confusion matters because automated market makers (AMMs) work differently from every financial exchange most people have encountered. There’s no counterparty. No order book. No broker matching buyers and sellers. The mechanism is genuinely novel, and understanding it changes how you read slippage, interpret liquidity depth, and evaluate the risks of providing liquidity yourself.

The Core Mechanism

The most common AMM design is the constant product market maker. Uniswap popularized it. The formula is:

x × y = k

Where x and y are the quantities of two tokens in a pool, and k is a constant that never changes. That formula is the entire price-setting mechanism.

Here’s how it plays out concretely. Imagine a pool containing 100 ETH and 200,000 USDC. The constant k = 100 × 200,000 = 20,000,000. The implicit price of ETH in this pool is 200,000 / 100 = 2,000 USDC.

A trader wants to buy 10 ETH. They’ll remove 10 ETH from the pool. To keep k constant, the USDC side must increase proportionally. The new ETH quantity is 90, so: 90 × new_USDC = 20,000,000. New USDC = 222,222. The trader pays 222,222 − 200,000 = 22,222 USDC for 10 ETH — an average price of 2,222 USDC per ETH, compared to the pre-trade price of 2,000.

That gap is slippage. It’s a direct function of pool depth and trade size. A deeper pool — say, 1,000 ETH and 2,000,000 USDC — would show almost no price impact for the same trade.

Liquidity Providers and Fees

Liquidity providers (LPs) are the people depositing the paired assets. Without them, there’s no pool. In exchange for providing liquidity, LPs earn a fee on every trade — typically between 0.05% and 1%, depending on the pool. This fee accrues inside the pool, slowly increasing the value of LP positions over time.

But there’s a structural cost to providing liquidity: impermanent loss. The AMM rebalances automatically as prices move — always selling the appreciating asset and accumulating the depreciating one, relative to simply holding. If ETH doubles, a liquidity provider ends up with less ETH (and more USDC) than they started with, compared to a holder who did nothing. The fees need to outpace this divergence for the LP position to be net profitable.

High-volume, volatile pairs can clear that bar. Stablecoin pairs — where the two assets are supposed to trade near parity — are usually easier, since price divergence is minimal and fee revenue compounds cleanly.

The Arbitrage Loop

The AMM mechanism doesn’t self-correct in isolation. When the pool price drifts from external markets — say, ETH is trading at 2,100 on Coinbase but the pool still shows 2,000 — arbitrageurs step in. They buy ETH from the cheaper pool and sell it on the exchange (or vice versa), extracting profit until the pool price converges with the market price.

This is what keeps AMMs usable. Without arbitrage, pool prices would drift out of alignment after every trade and stay there. With it, pools approximate real-time market prices most of the time.

Arbitrageurs correct the price, but they’re also trading against the pool — paying fees and shifting the pool ratio in the process. They’re simultaneously a maintenance mechanism and a source of LP revenue.

Where the Constraints Live

The constant product formula imposes hard limits on capital efficiency. In a standard AMM, liquidity is distributed across all possible prices — from zero to infinity. Most of it is never used. A pool with $10 million in liquidity might have only $500,000 effectively available near the current price.

The economic constraint for LPs is the break-even threshold: fees earned must exceed impermanent loss for the position to make sense. This varies widely depending on the pair, the pool’s fee tier, and the volatility path of the underlying assets.

The regulatory constraint is softer and mostly unresolved. AMMs operate through smart contracts with no central operator. This makes the question of who’s responsible — for losses, for compliance, for user funds — genuinely unclear and jurisdiction-dependent.

What’s Changing

The original constant product model has been extended substantially. Uniswap v3 introduced concentrated liquidity: LPs can now specify a price range where they want to deploy capital, rather than spreading liquidity across all prices. An LP can concentrate everything between $1,800 and $2,200 for ETH, dramatically improving capital efficiency within that range — but requiring active management when prices move outside it.

Several protocols have introduced dynamic fee tiers that adjust based on volatility. Curve’s StableSwap formula uses a different curve optimized for near-parity assets, dramatically reducing stablecoin swap slippage. Hybrid designs are also emerging — combining on-chain order books with AMM liquidity to capture the strengths of both.

What Would Confirm This Direction

Continued growth in concentrated liquidity adoption across major protocols. Increasing TVL in v3-style pools relative to the original constant-product design. Active management vaults and range-rebalancing tools gaining real usage. Fee revenue to LPs consistently outpacing impermanent loss in volatile pairs — the metric that would validate the efficiency gains of concentrated liquidity at scale.

What Would Break or Invalidate It

On-chain order books becoming technically and economically viable — particularly on high-throughput Layer 2 environments — could displace AMMs for many trading pairs. If L2 execution speeds and gas costs reach parity with centralized exchange performance, traders may prefer price certainty over slippage-based execution. A major smart contract exploit in a widely-used AMM pool could accelerate capital rotation toward custodied alternatives.

Timing

The AMM mechanism is active infrastructure right now — the foundation of most on-chain trading. Concentrated liquidity has been live for several years and is the dominant model for serious LPs on major DEXes. The competition between AMMs and on-chain order books is a development-cycle story, not a near-term concern. The more immediate question is whether management tooling matures fast enough to make concentrated liquidity accessible to LPs who can’t actively monitor positions.

Boundary

This post explains how the mechanism works. It doesn’t assess whether providing liquidity in any specific pool is appropriate, profitable, or advisable. Impermanent loss is path-dependent — the final price gap matters less than the price path taken to get there. The tracked version of this analysis lives elsewhere.

The formula is simple. The decision about whether to interact with it is not.

Related Posts

See All
Crypto Research
New XRP-Focused Research Defining the “Velocity Threshold” for Global Settlement and Liquidity
A lot of people looking at my recent research have asked the same question: “Surely Ripple already understands all of this. So what does that mean for XRP?” That question is completely valid — and it turns out it’s the right question to ask. This research breaks down why XRP is unlikely to be the internal settlement asset of CBDC shared ledgers or unified bank platforms, and why that doesn’t mean XRP is irrelevant. Instead, it explains where XRP realistically fits in the system banks are actually building: at the seams, where different rulebooks, platforms, and networks still need to connect. Using liquidity math, system design, and real-world settlement mechanics, this piece explains: why most value settles inside venues, not through bridges why XRP’s role is narrower but more precise than most narratives suggest how velocity (refresh interval) determines whether XRP creates scarcity or just throughput and why Ripple’s strategy makes more sense once you stop assuming XRP must be “the core of everything” This isn’t a bullish or bearish take — it’s a structural one. If you want to understand XRP beyond hype and price targets, this is the question you need to grapple with.
Read Now
Crypto Research
The Jackson Liquidity Framework - Announcement
Lewis Jackson Ventures announces the release of the Jackson Liquidity Framework — the first quantitative, regulator-aligned model for liquidity sizing in AMM-based settlement systems, CBDC corridors, and tokenised financial infrastructures. Developed using advanced stochastic simulations and grounded in Basel III and PFMI principles, the framework provides a missing methodology for determining how much liquidity prefunded AMM pools actually require under real-world flow conditions.
Read Now
Crypto Research
Banks, Stablecoins, and Tokenized Assets
In Episode 011 of The Macro, crypto analyst Lewis Jackson unpacks a pivotal week in global finance — one marked by record growth in tokenized assets, expanding stablecoin adoption across emerging markets, and major institutions deepening their blockchain commitments. This research brief summarises Jackson’s key findings, from tokenized deposits to institutional RWA chains and AI-driven compliance, and explains how these developments signal a maturing, multi-rail settlement architecture spanning Ethereum, XRPL, stablecoin networks, and new interoperability layers.Taken together, this episode marks a structural shift toward programmable finance, instant settlement, and tokenized real-world assets at global scale.
Read Now

Related Posts

See All
No items found.
Lewsletter

Weekly notes on what I’m seeing

A personal letter I send straight to your inbox —reflections on crypto, wealth, time and life.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.