How a simple formula replaced Wall Street's market makers
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.
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:
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
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:
It's elegantly simple. It's also good enough that it bootstrapped trillion-dollar markets.
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.
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:
But in the pool, arbitrageurs have been rebalancing. The constant product formula means your position now looks something like:
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.
The basic x · y = k formula was just the beginning.
| Innovation | What It Does | Why It Matters |
|---|---|---|
| Concentrated Liquidity | LPs provide liquidity within specific price ranges | 100x+ capital efficiency in tight ranges |
| Multi-Token Pools | Pools with 3-8 tokens instead of pairs | Reduced impermanent loss, diverse exposure |
| Dynamic Fees | Fees adjust based on volatility | Better compensation during risky periods |
| Stablecoin Curves | Optimized formulas for pegged assets | Near-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.
Liquidity pools are infrastructure. They make other things possible:
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.
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.
How a simple formula replaced Wall Street's market makers
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.
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:
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
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:
It's elegantly simple. It's also good enough that it bootstrapped trillion-dollar markets.
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.
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:
But in the pool, arbitrageurs have been rebalancing. The constant product formula means your position now looks something like:
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.
The basic x · y = k formula was just the beginning.
| Innovation | What It Does | Why It Matters |
|---|---|---|
| Concentrated Liquidity | LPs provide liquidity within specific price ranges | 100x+ capital efficiency in tight ranges |
| Multi-Token Pools | Pools with 3-8 tokens instead of pairs | Reduced impermanent loss, diverse exposure |
| Dynamic Fees | Fees adjust based on volatility | Better compensation during risky periods |
| Stablecoin Curves | Optimized formulas for pegged assets | Near-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.
Liquidity pools are infrastructure. They make other things possible:
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.
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.