🎯 INITIAL SETUP: ARIF & ZAHEER CREATED THE POOL

πŸ’‘ 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.

➀ Pool State After Deposit:

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).


πŸ”„ SCENARIO 1: TRADER ALI WANTS TO BUY DAI WITH ETH

πŸ’‘ Trader Ali says: β€œI want to swap 1 ETH for DAI.”

The pool uses the formula: