Skip to main content

How Is Slippage Calculated in an Automated Market Maker (AMM) Environment?

In an Automated Market Maker (AMM) environment, slippage is calculated based on the change in the token price determined by the AMM's constant product formula (e.g. $x y = k$) after the trade is executed.

A large trade removes a significant amount of one asset and adds another, which changes the ratio and thus the price. Slippage is the difference between the price at the time the order was submitted and the actual execution price.

What Is the Formula for Calculating the Leverage Ratio on a Derivatives Trade?
How Is the Price of a Trade Determined in a Dark Pool Environment?
What Mechanism in Automated Market Makers (AMMs) Is Exploited by Sandwich Attacks?
How Do Automated Market Makers (AMMs) Create the Vulnerability for Sandwich Attacks?