Liquidity Pool Math

At the heart of every AMM is a simple equation: x · y = k. When someone swaps token X for token Y, the product of reserves must stay constant (ignoring fees). This creates a price curve that automatically adjusts to supply and demand. Understanding this math is key to evaluating LP positions.

📐 Constant Product Curve (x · y = k)

k (constant)
20,000,000
Spot Price
$2,000
Effective Price
$1,905
Price Impact
-4.76%
Output (USDC)
9,524

🏊 Pool Share & Fee Calculator

Pool Share
0.10%
Daily Fees
$1.50
Monthly Fees
$45
Fee APR
5.48%

📚 How x·y=k Creates Prices

PRICE DISCOVERY
The spot price at any point = Y/X. As X decreases (someone buys ETH), the price of ETH rises along the curve.
SLIPPAGE
Larger swaps move further along the curve, getting worse prices. The difference between spot and effective price is slippage.
ARBITRAGE
If the AMM price diverges from the market, arbitrageurs swap until it realigns — keeping the pool price accurate.