© 2025
Back to writing

Liquidity Pools

How a simple formula replaced Wall Street's market makers

3 min readJanuary 14, 2022

On traditional exchanges, market makers are specialized firms with millions in capital. They quote buy and sell prices, pocket the spread, and keep markets liquid. It's a profitable, competitive, capital-intensive business.

Uniswap replaced all of that with a formula: x · y = k

No order books. No market makers. No permission required. Just a smart contract holding two tokens and a math equation determining the price.

This wasn't supposed to work. It did. Liquidity pools now handle billions in daily volume.

Key Takeaways

  • Liquidity pools automate market making through smart contracts—anyone can deposit assets and earn trading fees.
  • The constant product formula (x · y = k) enables continuous trading without order books.
  • Impermanent loss is the key risk: when prices diverge, liquidity providers can end up worse off than simply holding.

The Formula That Changed Everything

Traditional exchanges match buyers and sellers through order books. Someone posts "I'll buy ETH at $2,000," someone else posts "I'll sell at $2,001," and the exchange matches them when prices meet.

This requires:

  • Market makers willing to quote prices
  • Enough liquidity to fill orders without massive slippage
  • Complex matching engines
  • Trust in the exchange operator

Liquidity pools skip all of this.

Instead, a smart contract holds reserves of two tokens—say, ETH and USDC. The price isn't set by orders. It's determined by the ratio of tokens in the pool.

x · y = k

  • x = quantity of token A
  • y = quantity of token B
  • k = constant (the product of x and y)

When you buy token A, you add token B to the pool and remove token A. This changes the ratio, which changes the price. The bigger your trade relative to pool size, the more you move the price (slippage).

The formula ensures:

  • There's always a price (no "market closed")
  • Larger trades cost more (natural slippage)
  • Arbitrageurs keep prices aligned with external markets
  • No one can manipulate the order book (there isn't one)

It's elegantly simple. It's also good enough that it bootstrapped trillion-dollar markets.

Providing Liquidity

Anyone can add tokens to a pool and become a liquidity provider (LP).

You deposit both tokens in the pool's current ratio—say, $1,000 of ETH and $1,000 of USDC. In return, you receive LP tokens representing your share of the pool.

When traders swap through the pool, they pay fees (typically 0.3%). These fees accumulate in the pool, increasing the value of LP positions.

When you want out, you burn your LP tokens and withdraw your share of both assets—plus accumulated fees.

It's passive market making. You provide capital, earn fees, and let the math handle pricing.

Impermanent Loss: The Catch

There's a reason professional market makers charge for their services. Providing liquidity has risks.

Impermanent loss is what happens when token prices change after you deposit.

Here's the intuition:

You deposit 1 ETH ($2,000) and 2,000 USDC into a pool. Your position is worth $4,000.

ETH doubles to $4,000. If you had just held, you'd have:

  • 1 ETH = $4,000
  • 2,000 USDC = $2,000
  • Total: $6,000

But in the pool, arbitrageurs have been rebalancing. The constant product formula means your position now looks something like:

  • 0.707 ETH = $2,828
  • 2,828 USDC = $2,828
  • Total: $5,656

You made money ($5,656 > $4,000), but less than if you'd simply held ($5,656 < $6,000). The $344 difference is impermanent loss.

It's "impermanent" because if ETH returns to $2,000, your loss disappears. It becomes permanent when you withdraw at diverged prices.

The fees you earn can offset this—but in volatile markets, impermanent loss often exceeds fee income. This is why liquidity provision isn't free money.

Innovations

The basic x · y = k formula was just the beginning.

InnovationWhat It DoesWhy It Matters
Concentrated LiquidityLPs provide liquidity within specific price ranges100x+ capital efficiency in tight ranges
Multi-Token PoolsPools with 3-8 tokens instead of pairsReduced impermanent loss, diverse exposure
Dynamic FeesFees adjust based on volatilityBetter compensation during risky periods
Stablecoin CurvesOptimized formulas for pegged assetsNear-zero slippage for stable-to-stable swaps

Uniswap v3's concentrated liquidity was particularly significant—it let LPs compete with professional market makers on capital efficiency, but required active position management.

What This Enables

Liquidity pools are infrastructure. They make other things possible:

  • Token launches: New projects can create instant markets without exchange listings
  • Arbitrage: Price differences across pools create profit opportunities that keep markets efficient
  • Composability: Other protocols can build on pool liquidity (lending, derivatives, aggregators)
  • Permissionless trading: Anyone can swap any token, any time, without accounts or approval

The existence of liquid on-chain markets is what makes DeFi work. Without pools, there's no price discovery, no collateral valuation, no functioning ecosystem.

The Tradeoff

Liquidity pools democratized market making. Anyone with capital can participate in an activity that used to require specialized firms and exchange relationships.

But "anyone can do it" doesn't mean "anyone should."

Impermanent loss is real. Fee income is variable. Position management (especially with concentrated liquidity) requires attention. The math that makes pools work also means your exposure constantly shifts as prices move.

If you understand the mechanics and risks, providing liquidity can be profitable. If you're depositing because APY numbers look high, you might be the exit liquidity for someone who understands the game better.

The formula is simple. The tradeoffs are not.

Comments

Loading comments...
All articles

Articles

crypto
D'audio: Powered by ShelbyCrypto-ReposThe Fundamental FlawMnemonic PhrasesUnbanked to Bankless
tech
DocpullClaude StarterKernel AccessBlue Screen of DeathSearch Engine Turbulence
finance
Digital GoldA Bird's Eye ViewEasy Money and Veblen GoodsDerivatives vs Spot
music
MusicIDE

Liquidity Pools

crypto

How a simple formula replaced Wall Street's market makers

3 min readJanuary 14, 2022
crypto

On traditional exchanges, market makers are specialized firms with millions in capital. They quote buy and sell prices, pocket the spread, and keep markets liquid. It's a profitable, competitive, capital-intensive business.

Uniswap replaced all of that with a formula: x · y = k

No order books. No market makers. No permission required. Just a smart contract holding two tokens and a math equation determining the price.

This wasn't supposed to work. It did. Liquidity pools now handle billions in daily volume.

Key Takeaways

  • Liquidity pools automate market making through smart contracts—anyone can deposit assets and earn trading fees.
  • The constant product formula (x · y = k) enables continuous trading without order books.
  • Impermanent loss is the key risk: when prices diverge, liquidity providers can end up worse off than simply holding.

The Formula That Changed Everything

Traditional exchanges match buyers and sellers through order books. Someone posts "I'll buy ETH at $2,000," someone else posts "I'll sell at $2,001," and the exchange matches them when prices meet.

This requires:

  • Market makers willing to quote prices
  • Enough liquidity to fill orders without massive slippage
  • Complex matching engines
  • Trust in the exchange operator

Liquidity pools skip all of this.

Instead, a smart contract holds reserves of two tokens—say, ETH and USDC. The price isn't set by orders. It's determined by the ratio of tokens in the pool.

x · y = k

  • x = quantity of token A
  • y = quantity of token B
  • k = constant (the product of x and y)

When you buy token A, you add token B to the pool and remove token A. This changes the ratio, which changes the price. The bigger your trade relative to pool size, the more you move the price (slippage).

The formula ensures:

  • There's always a price (no "market closed")
  • Larger trades cost more (natural slippage)
  • Arbitrageurs keep prices aligned with external markets
  • No one can manipulate the order book (there isn't one)

It's elegantly simple. It's also good enough that it bootstrapped trillion-dollar markets.

Providing Liquidity

Anyone can add tokens to a pool and become a liquidity provider (LP).

You deposit both tokens in the pool's current ratio—say, $1,000 of ETH and $1,000 of USDC. In return, you receive LP tokens representing your share of the pool.

When traders swap through the pool, they pay fees (typically 0.3%). These fees accumulate in the pool, increasing the value of LP positions.

When you want out, you burn your LP tokens and withdraw your share of both assets—plus accumulated fees.

It's passive market making. You provide capital, earn fees, and let the math handle pricing.

Impermanent Loss: The Catch

There's a reason professional market makers charge for their services. Providing liquidity has risks.

Impermanent loss is what happens when token prices change after you deposit.

Here's the intuition:

You deposit 1 ETH ($2,000) and 2,000 USDC into a pool. Your position is worth $4,000.

ETH doubles to $4,000. If you had just held, you'd have:

  • 1 ETH = $4,000
  • 2,000 USDC = $2,000
  • Total: $6,000

But in the pool, arbitrageurs have been rebalancing. The constant product formula means your position now looks something like:

  • 0.707 ETH = $2,828
  • 2,828 USDC = $2,828
  • Total: $5,656

You made money ($5,656 > $4,000), but less than if you'd simply held ($5,656 < $6,000). The $344 difference is impermanent loss.

It's "impermanent" because if ETH returns to $2,000, your loss disappears. It becomes permanent when you withdraw at diverged prices.

The fees you earn can offset this—but in volatile markets, impermanent loss often exceeds fee income. This is why liquidity provision isn't free money.

Innovations

The basic x · y = k formula was just the beginning.

InnovationWhat It DoesWhy It Matters
Concentrated LiquidityLPs provide liquidity within specific price ranges100x+ capital efficiency in tight ranges
Multi-Token PoolsPools with 3-8 tokens instead of pairsReduced impermanent loss, diverse exposure
Dynamic FeesFees adjust based on volatilityBetter compensation during risky periods
Stablecoin CurvesOptimized formulas for pegged assetsNear-zero slippage for stable-to-stable swaps

Uniswap v3's concentrated liquidity was particularly significant—it let LPs compete with professional market makers on capital efficiency, but required active position management.

What This Enables

Liquidity pools are infrastructure. They make other things possible:

  • Token launches: New projects can create instant markets without exchange listings
  • Arbitrage: Price differences across pools create profit opportunities that keep markets efficient
  • Composability: Other protocols can build on pool liquidity (lending, derivatives, aggregators)
  • Permissionless trading: Anyone can swap any token, any time, without accounts or approval

The existence of liquid on-chain markets is what makes DeFi work. Without pools, there's no price discovery, no collateral valuation, no functioning ecosystem.

The Tradeoff

Liquidity pools democratized market making. Anyone with capital can participate in an activity that used to require specialized firms and exchange relationships.

But "anyone can do it" doesn't mean "anyone should."

Impermanent loss is real. Fee income is variable. Position management (especially with concentrated liquidity) requires attention. The math that makes pools work also means your exposure constantly shifts as prices move.

If you understand the mechanics and risks, providing liquidity can be profitable. If you're depositing because APY numbers look high, you might be the exit liquidity for someone who understands the game better.

The formula is simple. The tradeoffs are not.

Comments

Loading comments...

Category

crypto

Published

January 14, 2022

Reading Time

3 min read

Tags

crypto

All Tags (17)

crypto(18)
web(3)
computing(2)
decentralized-streaming
shelby
aptos
web3
python
documentation
ai-training
web-scraping
bitcoin
gold
inflation
theory
ai
trading

Contents

Key Takeaways
The Formula That Changed Everything
Providing Liquidity
Impermanent Loss: The Catch
Innovations
What This Enables
The Tradeoff