How Is Slippage Calculated in a Constant Product AMM?
Slippage is calculated as the difference between the price at the beginning of the trade and the effective price at which the trade is executed, expressed as a percentage. In the $x y = k$ formula, a large trade removes a significant amount of one asset and adds a small amount of the other, causing a steep change in the $x/y$ ratio.
The larger the trade relative to the pool size, the greater the change in the ratio and thus the higher the slippage.