How Is the Concept of “Slippage” Related to the AMM’s Mathematical Formula?
Slippage is the difference between the expected price of a trade and the executed price. In an AMM, the trade itself changes the ratio of assets in the liquidity pool, which is governed by the mathematical formula (e.g.
$x y=k$). A large trade significantly shifts the ratio, resulting in a new, worse price for the later part of the trade, which is the slippage.
The larger the trade relative to the pool size, the greater the price impact and thus the slippage.