h hoge.gg
Subscribe
BTC$67,432.18+2.34%ETH$3,521.44+1.08%SOL$178.62-0.62%BNB$612.30+0.41%XRP$0.6234-0.18%ADA$0.4521+3.12%DOGE$0.1623+1.86%AVAX$38.71-1.24%LINK$17.84+0.92%HOGE$0.00004120+4.21%
BTC$67,432.18+2.34%ETH$3,521.44+1.08%SOL$178.62-0.62%BNB$612.30+0.41%XRP$0.6234-0.18%ADA$0.4521+3.12%DOGE$0.1623+1.86%AVAX$38.71-1.24%LINK$17.84+0.92%HOGE$0.00004120+4.21%
● DeFi & On-chain

AMM Design in 2026: How On-Chain Markets Price Your Trade

Automated market makers now clear a record share of spot crypto volume. Here is how the curves, fees, hooks, and solvers behind them actually decide what your swap costs.

In July 2026, decentralized exchanges cleared a record 24.16% of the spot volume that centralized exchanges did, the highest share since The Block began tracking the ratio in 2019. That milestone arrived even though on-chain turnover actually fell that month; centralized volume simply fell faster, and Solana alone led every chain with roughly $50 billion in 30-day DEX volume. Behind almost every one of those on-chain trades sits a piece of code that never sleeps, never quotes a spread by hand, and never cancels an order: the automated market maker.

An AMM is the engine that decides what your swap costs. Yet most guides stop at the phrase “it uses a formula” and move on. This piece goes one level deeper. It follows a single trade from the moment you press confirm to the moment tokens land in your wallet, showing exactly how the curve, the fees, the routing, and (increasingly) a competitive network of solvers combine to set your price. Along the way it covers why one formula never fit every asset, what the liquidity provider quietly pays so that you can trade instantly, and how the design is mutating in 2026 through hooks, intents, and dynamic fees.

The examples lean on Ethereum and its largest venue, Uniswap, because that is where the mechanics are best documented, but the same logic drives Curve, Balancer, Aerodrome, PancakeSwap, and the fast-growing Solana venues Raydium and Meteora. Figures are current as of late August 2026.

An AMM Is a Pricing Robot, Not an Order Book

A traditional exchange runs an order book: buyers post bids, sellers post asks, and a matching engine pairs them, while professional market makers quote both sides and earn the spread. An AMM throws all of that out. In its place sits a pool of two (or more) assets and a mathematical rule, called an invariant, that sets the price directly from the ratio of what the pool holds. Liquidity providers deposit both assets into the pool; traders swap against it; the formula moves the price as the reserves shift. There is no counterparty to find at the moment you trade, because the pool itself is always willing to quote.

The crucial thing to understand is that the AMM does not know the true market price of anything. It only knows its own reserves. What keeps a pool tethered to the wider market is arbitrage: when the pool’s price drifts away from the price on other venues, arbitrageurs trade against it until the two line up, pocketing the difference. That single mechanism is both the reason AMM prices stay honest and, as we will see later, the reason liquidity providers slowly bleed. Hold that thought.

You interact with all of this through a wallet, which signs a transaction that is really just a function call to the pool contract. The wallet you choose (see our MetaMask vs Phantom vs Rabby comparison) shapes how much of the machinery you see, from the slippage settings to the MEV protection, but the underlying trade is the same call to the same code. The design’s real breakthrough is permissionlessness: anyone can spin up a pool, anyone can add liquidity, and anyone can trade, all without an intermediary taking orders. That is why AMMs, not order books, became the default trading engine of DeFi.

The Math of x Times y Equals k, and the Real Cost Called Price Impact

The canonical invariant is the constant product formula: x times y equals k, where x and y are the two reserves and k stays fixed across a trade. When Vitalik Buterin formalized the idea in a March 2018 ethresear.ch post, he framed it explicitly around “front-running resistance,” anticipating the MEV problem years before that term stuck. He credited the formulation to the Gnosis team; Hayden Adams turned it into Uniswap and shipped the first version in November 2018.

A worked example makes the mechanics concrete. Suppose a pool holds 100 ETH and 250,000 USDC, so k equals 25,000,000 and the quoted price is 2,500 USDC per ETH. You buy 10 ETH. The ETH reserve drops to 90, and to keep k constant the USDC reserve must rise to 25,000,000 divided by 90, which is about 277,778. You therefore pay roughly 27,778 USDC for your 10 ETH, an average of about 2,778 per ETH rather than the 2,500 you saw before you traded. That premium of about 11% is price impact, and it exists because the curve steepens as you push along it. Ignore fees for a moment; the impact is a property of the math itself.

Price impact is the core trade-off of constant product design. The pool offers effectively infinite liquidity, in the sense that it never runs dry, it just gets more expensive the more you take, and the cost of that guarantee is that big trades pay dearly. A tiny order barely nudges the price; a whale-sized order climbs a long way up the curve. Deep pools have gentle curves and absorb size well; thin pools punish it. Note that price impact is distinct from your slippage tolerance, which is the maximum adverse move you agree to accept between signing and execution, and which exists mainly to protect you from front-runners rather than from the curve.

One Curve Does Not Fit All: The Invariant Families

Constant product is general, but it is wasteful for assets that are supposed to trade near a fixed ratio, such as two dollar stablecoins or ETH against a liquid-staking token. Forcing a 5.7% price impact on a swap between two assets that should sit at par is absurd, so different jobs got different curves.

The purest alternative is the constant sum rule (x plus y equals k), which offers zero slippage but is unusable on its own, because one side of the pool can be drained completely the moment the market price leaves the peg. Curve’s insight, set out in Michael Egorov’s 2019 StableSwap whitepaper, was to blend the two: behave like constant sum near the peg for near-zero slippage, and fall back to constant product near the edges so the pool degrades gracefully if the peg breaks. A tunable amplification coefficient sets how flat the middle of the curve is. That is why Curve dominates stablecoin swaps, with its 3pool of USDC, USDT, and DAI and its newer StableSwap-NG pools carrying the deepest stable liquidity in DeFi. Balancer generalized in a different direction, extending constant product to pools of many assets with arbitrary weights (an 80/20 pool, say), which makes a Balancer pool behave like a self-rebalancing index fund. Uniswap V3 added concentrated liquidity, the subject of the next section.

Invariant familyCore ideaBest forExample venue
Constant productx times y equals kAny volatile pairUniswap V2
Constant sumx plus y equals k, zero slippageIdentical-value assets (theory only)Component of hybrids
StableSwap (hybrid)Constant sum near peg, product at edgesStablecoins, liquid-staking tokensCurve
WeightedGeneralized product, custom weightsMulti-asset baskets, index poolsBalancer
ConcentratedConstant product inside a chosen rangeCapital-efficient liquidity, any pairUniswap V3/V4, Meteora DLMM

Concentrated Liquidity: Ticks, Ranges, and Capital Efficiency

Uniswap V2 spread each provider’s liquidity across every possible price from zero to infinity, the vast majority of which never sees a trade. Most of the capital just sat there. Uniswap V3, launched in May 2021, let providers concentrate their capital inside a price range they choose, quoting up to 4,000 times more depth per dollar within that band. The price axis is chopped into discrete ticks, and a position earns fees only while the price sits inside its range; outside the range it earns nothing and sits entirely in one asset. V3 also introduced fee tiers (0.05%, 0.30%, and 1.00%), so pools could price risk per pair, and it turned liquidity positions into NFTs rather than fungible tokens, because every range is unique.

The trade-off is sharper economics. A concentrated provider earns far more in fees per dollar while price stays in range, but takes heavier losses when it moves, and must actively manage or delegate the position. Solana’s venues pushed the concept further: Meteora’s Dynamic Liquidity Market Maker slices liquidity into discrete bins, each with its own dynamic fee, while Raydium and Orca run their own concentrated pools. The practical result across every chain is the same. A project can now bootstrap tight spreads and low slippage with a small fraction of the capital a full-range pool would demand, which is why concentrated designs have become the default for serious liquidity.

Concentration has a dark side that we will meet again in the MEV section: just-in-time liquidity. A searcher can watch for a large incoming swap, add an enormous concentrated position in the block right before it, capture most of the swap’s fee, and pull the liquidity out immediately after, taking almost no real risk. It is capital efficiency turned into a weapon against the passive providers who keep the pool alive around the clock.

Fees: Static Tiers, Dynamic Fees, and the Protocol’s New Cut

The swap fee is what pays the liquidity provider. Uniswap V2 charged a flat 0.30% on every trade. V3’s tiers let thin-risk stable pairs charge as little as 0.01% to 0.05% while exotic pairs charge a full 1%. The frontier now is dynamic fees: a fee that rises when volatility or toxic order flow is high and falls when the market is calm, so providers are compensated precisely when adverse selection is worst. Uniswap V4 makes this programmable through hooks, and Meteora’s bins already flex their fee on a per-trade basis.

The 2026 twist is that providers now share the fee with the protocol itself. Uniswap’s UNIfication upgrade turned on a protocol fee switch that routes part of trading fees into buying and burning UNI. Governance passed it with roughly 99.9% support and retroactively burned 100 million UNI, worth about $590 million at the time, from the treasury. For V2 pools the provider’s cut drops from 0.30% to 0.25%, with the remaining 0.05% feeding the burn. The mechanism has made UNI deflationary even as the token itself slid toward a cycle low, a useful reminder that value accrual and token price are not the same thing.

Turning a fee switch on, or changing any pool parameter, runs through governance, and governance is its own attack surface. The Term Finance exploit showed how a malicious proposal can be pushed past a timelock, which means the fee you pay and the rules your liquidity lives under are only ever as safe as the process that can change them.

Impermanent Loss and LVR: The Hidden Price of Being the Market

Someone pays for the instant liquidity you enjoy, and it is the provider. Impermanent loss is the gap between depositing two assets in a pool and simply holding them in your wallet, and it appears whenever the price ratio moves. Because the pool mechanically sells whichever asset is rising and buys whichever is falling, a provider always ends up holding more of the loser. The loss is symmetric (a move up hurts as much as the equivalent move down) and it grows with the size of the move, as the figures from Binance Academy show.

Price change of one assetImpermanent loss versus holding
1.25x0.6%
1.5x2.0%
2x5.7%
3x13.4%
4x20.0%
5x25.5%

The loss is only “impermanent” if the price comes back. If it does not, the shortfall is permanent and real. Fees are meant to make up the difference, which is the whole provider bet: earn more in fees than you lose to price divergence. Researchers sharpened this into a cleaner metric called loss-versus-rebalancing, or LVR. A team at a16z crypto, in work led by Tim Roughgarden and Ciamac Moallemi with Jason Milionis and Anthony Lee Zhang, showed that the real, ongoing bleed is the money arbitrageurs extract every time they realign a stale pool price to the market, and that it scales with volatility squared. For an ETH/USDC constant-product pool at 5% daily volatility, LVR runs about 3.125 basis points a day, on the order of 11% a year, before fees. Their blunt conclusion is that an AMM only works if its providers are happy, which means fees have to at least cover LVR, or the sophisticated liquidity walks. That thesis is the analytical spine of the whole 2026 design debate.

Providers weigh all of this against safer yields. The benchmark many use is the staking return they could earn on the same ETH instead, which is why understanding validator economics and how staking yield really works is part of judging whether a pool is worth the risk. If a pool’s fees, net of impermanent loss and LVR, do not beat staking, the rational move is to stake.

Routing and Aggregation: Why Your Trade Splits Across Pools

Your wallet rarely sends a swap to a single pool. A router or aggregator simulates dozens of possible paths, a direct ETH-to-USDC hop, a two-step ETH-to-WBTC-to-USDC route, a split that sends 60% through a Uniswap 0.05% pool and 40% through a Curve pool, and picks the combination with the lowest total cost after gas. Splitting a large order across venues flattens the curve you have to climb, so the blended price beats what any single pool would have charged. In practice the price you see quoted is the output of a search across the entire liquidity graph, not the reading of one formula.

This matters more every year because liquidity keeps fragmenting: across chains, across protocol versions (V2, V3, and V4 all coexist), and across dozens of venues. Aggregators, and now solvers, exist to stitch that fragmented liquidity back together. The more scattered it becomes, the more the router rather than the pool determines what you actually pay, and the more value flows to whoever runs the smartest routing.

The competition to route well has become its own industry. Aggregators such as 1inch, Matcha, and CoW Swap publish quotes that beat any single venue by shopping the whole graph, and they increasingly weigh gas, MEV protection, and even the odds that a given route reverts. For a small swap the saving is a rounding error, but on a six or seven figure order the routing engine can save more than the entire trading fee, which is why professional desks never fire a large market order straight into one pool.

MEV at Execution: Sandwiches, JIT Liquidity, and Backrunning

Because pending swaps sit in a public mempool and their price impact is easy to predict, bots can reorder the block around your trade to profit from it. The classic move is the sandwich: a bot buys the same asset just before you, pushing the price up, lets your order fill at the worse price, then sells right after, keeping the difference. Backrunning captures the arbitrage your trade opens up. Just-in-time liquidity, from the concentrated-liquidity section, skims the fee. Buterin’s original worry about “front-running resistance” grew into a multi-billion-dollar extraction industry, and it is worth seeing the connection to the previous section clearly: arbitrage MEV is LVR being realized. The very trades that keep a pool’s price honest are the ones draining its providers.

Defenses exist at several layers. A tight slippage tolerance caps how badly a sandwich can hurt you. Private mempools and order-flow auctions route your transaction away from public front-runners. And intent systems, covered shortly, can clear a trade without ever exposing it to the open mempool at all. This is precisely where a competitive network of solvers starts to earn its keep, by turning MEV from something taken from you into something bid back to you.

The encouraging trend is that the share of value lost to crude sandwiching has been falling as private order flow and intent-based routing spread. That is the clearest sign yet that better AMM plumbing can shrink the hidden tax on traders rather than merely move it around, even if the arms race between searchers and the systems built to contain them is nowhere near settled.

Hooks: How Uniswap V4 Turned the AMM Into a Platform

Uniswap V4, which launched on 31 January 2025, rebuilt the AMM as a platform rather than a single product. Its headline feature is hooks: external contracts that run at defined points in a pool’s life, before or after a swap and when liquidity is added or removed, and that can inject custom logic. A hook can charge a dynamic fee, run an on-chain limit order, auto-compound fees, deploy idle liquidity into a lending market between trades, gate access for compliance, or hand value back to providers in ways the base contract never imagined. V4 also collapsed every pool into one contract, the singleton, and added flash accounting, which together cut the gas cost of creating pools and of multi-hop swaps.

The effect is thousands of specialized pools instead of one-size-fits-all AMMs. By late August 2026, V4 held roughly $820 million in total value locked across 18 chains and had processed about $25 billion in swaps over the prior 30 days, according to DefiLlama. This is also why “AMM design” in 2026 is less about one curve and more about a design space: mechanisms like the auction-managed AMM sell off the right to set a pool’s fee, and builders such as Bunni and Arrakis stack managed strategies on top of hooks. Hayden Adams, who wrote the first Uniswap contract, has pushed back on the idea that AMMs are a dead end, arguing they are “only just getting started” thanks to cheaper capital and composability. Whether or not you buy that, the hook model has clearly reopened the design space that constant product once seemed to close.

Intents and Solvers: When Your Swap Skips the AMM Entirely

The newest shift changes what you even submit. Instead of a transaction aimed at a specific pool, you sign an intent, a statement of the outcome you want, such as “I want at least 2,480 USDC for 1 ETH,” and let a competitive network of solvers work out the execution. As solver-based systems are designed, a solver can route through AMMs, order books, professional market-maker desks, its own inventory, or a cross-chain combination, and solvers compete to hand you the best price. CoW Protocol clears trades in batch auctions and can match a coincidence of wants, your ETH-to-USDC against someone else’s USDC-to-ETH, directly, so neither side touches an AMM or pays its price impact. UniswapX runs a Dutch auction among fillers, and protocols like Across handle the cross-chain leg. Together the leading intent systems clear billions of dollars a month.

For AMM design this is a quiet revolution. Intents move MEV from something extracted against you into something solvers compete to return as price improvement, and they demote the AMM from the venue to just one venue a solver might use. They also blur the line between AMM and order book that defined DeFi’s first era; the two are converging fast. The catch is trust. A solver bridging your funds inherits every weakness of the bridge it chooses, and 2026 has not been short of bridge exploits, as our investigation into where stolen cross-chain crypto goes lays out. You are trusting an off-chain actor to act in your interest, so the guarantees you get from the auction design, and from settlement happening on-chain, are what keep the model honest.

AMMs as Oracles: The Price Feed That Can Be Gamed

Because an AMM’s price is nothing more than its reserve ratio, other contracts often read it as a price oracle. That is convenient and genuinely dangerous. A large swap funded by a flash loan can shove a shallow pool’s reserve ratio far from the real market price for the length of a single block, and any protocol that trusts that spot reading can be tricked into mispricing collateral, minting too much of an asset, or liquidating a healthy position. A long list of DeFi exploits has run exactly this play. The standard defense, added back in V2, is a time-weighted average price that averages the reserve ratio over many blocks, which makes sustained manipulation far more expensive; concentrated-liquidity and multi-block oracle designs raise the cost further still. The lesson for builders is never to trust a single-block spot price from a thin pool, and the lesson for everyone else is that a token’s on-chain price is only as trustworthy as the liquidity depth sitting behind it.

The pattern shows up again and again in exploit post-mortems. An attacker takes a flash loan, dumps a large amount into a thinly traded pool to crater or spike its reported price, then hits a second protocol that read that price as gospel, often a lending market that lets them borrow far more than their collateral is really worth, all inside a single atomic transaction. The defenses are well understood by now: average the price over time, pull it from a dedicated oracle network such as Chainlink that aggregates many venues rather than one pool, and require deep liquidity before a market treats a pair as safe to price against. Treating a raw AMM quote as a trustworthy oracle remains one of the most reliable ways to lose user funds in DeFi.

The 2026 AMM Landscape: Who Prices What

Zoom out and the market has a clear shape. DEXs took a record 24.16% of centralized-exchange spot volume in July 2026, with Solana leading all chains at roughly $50 billion in 30-day volume, edging out BNB Chain, Ethereum, and Base combined. Uniswap remains the largest single DEX by volume across chains, Curve owns the deep stablecoin liquidity, and a cluster of specialized venues price the rest. Each one is defined by the invariant it chose.

VenueAMM modelNiche it prices best
Uniswap (V2/V3/V4)Constant product, concentrated, hooksGeneral purpose, most pairs
CurveStableSwap hybridStablecoins and pegged assets
BalancerWeighted and custom poolsMulti-asset baskets, index-style
Aerodromeve(3,3) with concentrated liquidityBase ecosystem liquidity hub
PancakeSwapConstant product and concentratedBNB Chain retail volume
RaydiumStandard AMM and concentratedSolana general trading and launches
MeteoraDynamic bins (DLMM)Solana capital-efficient and launch liquidity

One recurring confusion is worth clearing up. Order-book perpetual venues, Hyperliquid being the obvious example, are frequently lumped in with DEXs, but they are not AMMs. They run a central limit order book on-chain, matching bids and asks the old-fashioned way rather than pricing against a pool. When you read a volume chart that mixes the two, keep the distinction in mind, because the price-formation mechanics, and the risks, are completely different.

Regulation and the Risks Every Provider Should Weigh

On the regulatory side, the United States gave DeFi a rare piece of clarity. The SEC issued Uniswap Labs a Wells notice in 2024 and then closed the investigation with no enforcement action in February 2025, under leadership that preferred writing rules to litigating them. The open question is whether a front-end operator or a governance token can be regulated even when the underlying pools are autonomous code, and the debate over what counts as “sufficiently decentralized” remains unsettled. Teams building compliant on-chain venues are still feeling out that line, a process our guide to DeFi compliance in 2026 covers in detail.

For anyone thinking about providing liquidity, the risks stack up in a predictable order, and they are worth reading before you deposit a single dollar.

  • Impermanent loss and LVR: fees may not cover price divergence, so measure your return net of both, never gross.
  • Smart-contract risk: pools, hooks, and routers are all code, and audits reduce but never remove the chance of a bug.
  • Governance risk: fee switches, hook whitelists, and pool parameters can change, and a captured DAO or a beaten timelock can rewrite the rules under you.
  • Oracle and price-feed risk: a shallow pool’s price is manipulable, so do not lend against it or trust it as a feed.
  • MEV: on large trades, use tight slippage limits and private or intent-based routing.
  • Depeg risk: StableSwap pools concentrate the downside if one of their stablecoins loses its peg.

The practical habit is simple. Before you provide liquidity, read the pool’s depth, its fee tier, and its total value locked, and treat any headline yield as a gross number that impermanent loss and LVR will steadily chip away. An AMM is an elegant machine, but it never works for free, and understanding exactly how it prices your trade is the difference between using that machine and being used by it.

Frequently Asked Questions

What is an automated market maker in simple terms?

An AMM is a smart contract that holds a pool of two or more tokens and uses a fixed formula to quote a price from the ratio of what it holds. Instead of matching buyers with sellers the way an order book does, it always trades against the pool, and the price moves automatically as the reserves change.

How does an AMM decide the price of my trade?

It plugs your trade into its invariant, which for most pools is x times y equals k. As you buy one asset its reserve shrinks and the formula makes each additional unit more expensive, which is why large trades face far more price impact than small ones. Aggregators and solvers then try to split or reroute your order across pools to reduce that cost.

What is impermanent loss and can I avoid it?

Impermanent loss is the shortfall a liquidity provider takes versus simply holding the two tokens, and it grows as the price ratio moves, reaching about 5.7% at a 2x move. You cannot remove it entirely while providing liquidity to a volatile pair, but fees can offset it, and choosing pegged or highly correlated pairs keeps the divergence small.

Are AMMs safer than centralized exchanges?

They remove custody risk, because you keep your keys, and counterparty risk, because the pool cannot go insolvent the way a company can. In exchange they add smart-contract, governance, and MEV risks, and they cannot reverse a bad transaction. They are a different risk profile, not strictly safer.

What is the difference between Uniswap and Curve?

Uniswap uses a general constant-product design, now with concentrated liquidity and hooks, that can price any pair, so it is the default for volatile tokens. Curve uses a StableSwap curve tuned for assets that should trade near a fixed ratio, which gives far lower slippage on stablecoins and liquid-staking tokens.

By Yuki Tanaka, DeFi correspondent at HOGE Wire, covering AMM design, market structure, and on-chain liquidity.

Share 𝕏 Post Telegram