What Happens to the ‘K’ Value in the Constant Product Formula When a Trade Occurs?
In the constant product formula (x y = k), the 'k' value represents the pool's total value invariant. When a trade occurs, the 'k' value increases by the amount of the trading fee, which is added to the pool's reserves.
This increase in 'k' benefits the liquidity providers. The core principle of the formula is that the product of the reserves, excluding the fee, must remain constant for the calculation of the trade price.