About Constant Product Formula

This is the formula for the constant product: X * Y = K. The quantity of one asset in the liquidity pool is represented by the variable X, and the quantity of the other asset is represented by the variable Y. The product of X and Y yields the constant K, which only varies in response to the addition or subtraction of funds. The formula raises the token's price to make up for decreased supply of a particular token as transactions take place. Conversely, when the amount of a single asset rises, the AMM will lower the price to make up for it.

Formula: X * Y = K

X= Quantity of Asset X

Y= Quantity Asset Y

K= Constant

Example:

If we have a pair of ETH and DAI in Pool. If ETH price is increase and someone withdraw the ETH token then ETH quntity will decrease in pool and Price is increase. opposite for DAI, the quntity will increase.