Skip to main content

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.

How Does a Constant Sum Market Maker ($x+y=k$) Differ from a Constant Product AMM?
What Are the Advantages and Disadvantages of Using a Constant Sum Formula versus a Constant Product Formula in an AMM?
What Is the Difference between Expected Price, Executed Price, and Market Price in a Trade?
What Is the Mathematical Formula Used to Calculate Slippage as a Percentage?