π‘ Important: In Uniswap V1, the first liquidity providers (LPs) must deposit both tokens in a ratio that reflects the current market price. This sets the initial exchange rate.
Letβs say:
But to create a useful liquidity pool, they must agree on a fair market price.
Letβs assume the external market price is:
1 ETH = $2,000 β So 1 ETH = 2,000 DAI
To match this, they decide to deposit:
β They deposit equal dollar value, not equal quantity.
ETH Reserve (x) = 10
DAI Reserve (y) = 20,000
Constant (k) = x * y = 10 * 20,000 = 200,000
Price = y / x = 20,000 / 10 = 2,000 DAI per ETH
Arif and Zaheer receive LP tokens representing their share (100% initially).
π‘ Trader Ali says: βI want to swap 1 ETH for DAI.β
The pool uses the formula: