
Uniswap processes $100 billion monthly using a formula you could write on a napkin: x * y = k. That's the entire trading algorithm. No order books, no market makers, no matching engine—just pure math determining prices for $2 trillion in cumulative volume since 2018. Automated Market Makers brought algorithmic trading pools that operate 24/7, settle instantly, and let anyone become a market maker by depositing tokens.
An AMM is a smart contract holding reserves of two or more tokens with a mathematical formula determining exchange rates between them. When you trade, you're trading against the pool itself. The formula automatically adjusts prices based on token ratios. Buy a lot and you drain it from the pool, raising its price. Sell a lot and you flood the pool, lowering the price. Supply and demand encoded into math.
The breakthrough came in 2018 when Hayden Adams launched Uniswap. Before AMMs, decentralized exchanges tried replicating order book models on-chain, which was slow, expensive, and suffered from poor liquidity. AMMs flipped the model: instead of matching individual orders, everyone trades against shared liquidity pools. As of 2025, AMM-based DEXs process $50-100 billion monthly across dozens of blockchains.
The constant product market maker is expressed as: x * y = k. Here x is the quantity of token A, y is the quantity of token B, and k is a constant.
Concrete example: A liquidity pool has 100 ETH and 200,000 USDC. The constant k = 100 * 200,000 = 20,000,000. The implied price is 2,000 USDC per ETH. When someone buys 10 ETH, they add USDC and remove ETH. The formula must maintain k = 20,000,000, so if there's now 90 ETH left: 90 * y = 20,000,000, which means y = 222,222 USDC. The buyer deposited 22,222 USDC to get 10 ETH—an average price of 2,222 USDC per ETH, higher than the starting 2,000 price.
This price increase is the constant product curve in action. The larger your trade relative to pool size, the exponentially worse your price gets. This creates slippage—the difference between quoted price and actual execution price. It's an unavoidable mathematical consequence.
The genius: it always provides liquidity at some price. Traditional order books can have gaps. AMMs never have this problem. You can always trade, though the price might suck if the pool is small or your trade is large. Arbitrage traders keep pool prices aligned with external markets by profiting from any divergence.
The constant product curve is hyperbolic. As you drain one token, its price rises exponentially. The pool never runs completely dry—to extract the last token would require infinite amounts of the other token.
While x*y=k became the standard, variants exist. Curve's StableSwap uses a hybrid formula for stablecoins, creating flatter price curves. Uniswap V3's concentrated liquidity lets providers focus capital on specific price ranges, improving efficiency 100-1000x. Balancer supports weighted pools with multiple tokens.
AMMs require liquidity from liquidity providers (LPs)—people who deposit token pairs into pools. You deposit equal values of both tokens, receive LP tokens representing your pool share, and earn trading fees (typically 0.3% per swap on Uniswap V2).
Being an LP isn't free money. The AMM automatically rebalances your position as prices change to maintain the constant product formula. If one token pumps, the AMM sells it. If it dumps, the AMM buys it. This means LPs underperform just holding tokens if prices diverge significantly—impermanent loss.
Real example: You deposit 1 ETH + 2,000 USDC when ETH = $2,000. ETH doubles to $4,000. The AMM rebalances through arbitrage, and your position becomes roughly 0.707 ETH + 2,828 USDC (total value $5,656). If you'd just held, you'd have $6,000. That $344 difference is impermanent loss.
Fee earnings must compensate for impermanent loss and smart contract exploits. Stablecoin pools attract risk-averse LPs seeking modest yields. Volatile pairs attract LPs betting fee earnings will exceed impermanent loss.
Slippage is the AMM's most visible downside: the larger your trade relative to pool depth, the worse your execution price. In a $10 million pool, buying $100k might move price 1-2%. Buying $1 million could move price 10-15%. Buying $5 million would suffer 40%+ slippage.
Traders manage slippage by splitting large orders, using DEX aggregators, or adjusting slippage tolerance. Deep pools create network effects—more liquidity attracts traders, traders generate fees, fees attract more liquidity. But slippage remains inherent to trading against algorithmic pools.
AMMs don't have price oracles. So how do they track market prices? Arbitrage traders profit from correcting price discrepancies. If ETH is $2,000 on Coinbase but $2,050 in a Uniswap pool, bots immediately buy on Coinbase and sell on Uniswap, pocketing $50 profit while rebalancing the pool to $2,000.
This happens constantly, often within the same block. The downside: arbitrage is effectively a tax on LPs. Every time arbitrage trades rebalance a pool, LPs are buying high and selling low, creating part of impermanent loss.
Traditional exchanges use order books—buyers post bids, sellers post asks, exchanges match them. This works great for centralized exchanges but terribly for blockchain. Order books on-chain require posting every bid and ask as separate transactions—expensive in gas and slow.
AMMs sidestep these problems. LPs deposit capital once, and it provides liquidity across all price points via the formula. No constant order updates. No professional market makers needed.
Order books offer advantages: limit orders, better execution for large trades. But for general-purpose DEX trading, AMMs won. The $50-100 billion in monthly AMM DEX volume versus $10-20 billion for order book DEXs proves this. AMMs democratized market making—anyone can provide liquidity, not just pros.
Smart contract risk is number one—Curve's $60 million Vyper exploit and countless smaller protocols prove code bugs are real. MEV exploitation extracts value through sandwich attacks: bots front-run your trade, then back-run after, profiting from your price impact. Regulatory uncertainty looms—the SEC suggests LP tokens might be securities, creating legal risk that's probably the biggest long-term threat.
Automated Market Makers are legitimately one of crypto's breakthrough innovations—a genuinely new approach to market making that enabled decentralized trading at scale. The constant product formula is elegantly simple yet works for billions in volume.
Trade-offs are real. Slippage is inevitable. Impermanent loss is real. MEV extraction taxes users. For large trades, centralized order books often offer better execution. But AMMs are "good enough" for most DeFi use cases while offering massive benefits: permissionless liquidity provision, no need for professional market makers, passive income for capital providers, full decentralization.
Understanding AMM mechanics is essential. You need to grasp slippage to avoid getting rekt. If you're an LP, you must understand impermanent loss math—not just the concept, but actual calculations. The formula is simple, but implications are subtle and can cost money if you don't respect them.
AMMs represent crypto's philosophy: replace trusted intermediaries with algorithmic guarantees. The math doesn't lie, doesn't discriminate, doesn't require permission. The x*y=k formula might be the most important mathematical innovation in crypto since Bitcoin's proof-of-work. And unlike a lot of crypto "innovation," it actually works.
Further Reading:

A lending protocol is a DeFi platform that facilitates cryptocurrency lending and borrowing through smart contracts without traditional financial intermediaries. Protocols like Aave and Compound let you deposit crypto to earn interest (often 3-15% APY on stablecoins) or borrow against your holdings by providing overcollateralized assets as security—with everything managed automatically by code including interest rates and liquidations.

Collateral in crypto refers to digital assets you deposit into a DeFi protocol to secure a loan. Unlike traditional finance where you might put down 20% for a mortgage, DeFi requires overcollateralization—depositing 130-200% of what you're borrowing. This protects lenders since there are no credit checks, but it means you can get automatically liquidated if your collateral's value drops too low.

APY (annual percentage yield) in crypto represents the projected annual return on deposited assets, including compound interest. While traditional finance APYs are stable and reliable, crypto APYs are highly volatile, often inflated by token emissions that may have little value, and displayed as eye-catching numbers that rarely reflect actual realized returns after factoring in token price changes, impermanent loss, and gas fees.

Non-fungible tokens (NFTs) went from obscurity to $40 billion in sales in 2021, then crashed 90%+ by 2023. Beyond the hype and crash, NFTs are blockchain tokens representing unique digital itemswith both legitimate use cases and serious problems nobody talks about.