Home/Crypto & Blockchain/DeFi & Yield Farming/AMM Constant Product Price Impact

Formula & Calculator

AMM Constant Product Price Impact

Estimates how much a trade will move the price in a constant-product automated market maker (like Uniswap) pool, based on trade size relative to pool depth.

CryptoDeFiAMM

Price Impact Calculator AMM Constant Product

PI = (Δy / y) × 100  ·  x·y = k
PI = price impact (%)  ·  x = reserve X  ·  y = reserve Y  ·  Δx = trade amount X
⟹ Solve PI, Δx, x
tokens
tokens
tokens
%
Please fix the errors above.
Solve for:
Presets:
Price Impact
x: y: Δx: Δy:
✓ Copied!
Price Impact Gauge
Low (< 1%) Moderate (1–10%) High (> 10%)
PI = (Δy / y) × 100  ·  Δy = y · Δx / (x + Δx)  ·  Constant product x·y = k

Interpretation

Price Impact (%) = (Δy / y) × 100, where x×y=k. The change in price caused by a trade on an AMM. Used to assess slippage.

Price Impact (%) = (Δy / y) * 100, where x*y=k
AMM Constant Product Price Impact

Variables

SymbolQuantityUnit
Price ImpactEstimated price impact%
ΔyChange in output token reserve
yOutput token reserve before trade

What it means

In AMMs (like Uniswap), trades change the reserves, affecting the price. Price impact is the percentage change in price caused by a trade. A larger trade has more impact. This is used to estimate slippage and to decide optimal trade sizes. Understanding price impact is essential for traders to minimise costs and for LPs to understand their risk.

Worked example

AMM Constant Product Price Impact – Two Detailed Examples

Real‑World
Scenario: A pool has 1,000,000 units of token Y. A trader swaps an amount that removes 10,000 units of token Y from the pool. Price impact = (10,000 / 1,000,000) × 100 = 1.0%. This means the trade moves the price by about 1%. The trader uses this to estimate slippage before executing.
ParameterValue
Pool Reserve (token Y)1,000,000
Trade Output Amount10,000
1Price Impact = (10000 / 1000000) × 100 = 1.0%
Result 1.0% ✓ Moderate impact
Scenario: In a smaller pool with 50,000 reserve, a trade removes 5,000 units, causing impact = (5000/50000)×100 = 10%. This high impact means the trader will get a worse price. They may split the trade or use a different pool. Price impact is a key consideration in AMMs.
ParameterValue
Reserve50,000
Output5,000
1Impact = (5000 / 50000) × 100 = 10%
Result 10% ✓ High impact
Insight: In AMMs, price impact is the change in price caused by a trade. Larger trades relative to pool liquidity cause greater impact. Traders should consider this when executing large orders.

Common mistakes

  • AMM constant product: x*y = k, where x and y are token reserves.
  • Δy: The change in token y reserve after a swap.
  • Price impact: The percentage change in price due to the trade.
  • Larger trades: Cause higher price impact.

Applications

AMM constant product price impact measures the percentage price change caused by a trade in a liquidity pool, based on the constant product formula (x*y=k). This is used to estimate slippage before executing a trade. Traders use it to assess the cost of larger trades and to choose pools with sufficient liquidity. Understanding price impact is critical for efficient trading on DEXs.

  • Estimating slippage for trades on AMMs
  • Choosing optimal pools for minimal price impact
  • Managing trade size relative to pool liquidity
  • Evaluating the efficiency of a trading route
  • Educational understanding of AMM mechanics

Frequently Asked Questions

Q01How do I estimate the price impact of a trade on a constant-product AMM (like Uniswap) based on trade size relative to the pool depth?
A01

Price Impact = (Δy / y) × 100, where Δy is the amount of output token taken from the pool, and y is the pool's reserve of that token. For example, removing 10,000 from a 1,000,000 token reserve gives a 1% price impact.

Q02Why does price impact increase with trade size?
A02

The constant product formula (x*y=k) means that as you take more of one token, the price moves to maintain the product. Larger trades consume a larger proportion of the pool, causing higher slippage.

Q03What is the difference between price impact and slippage?
A03

Price impact is the change in the spot price caused by your trade. Slippage is the difference between the expected price and the actual execution price, which includes price impact plus any other market movements.

Q04How can I reduce price impact on a trade?
A04

Use a pool with deeper liquidity (higher reserves), split your trade into smaller parts, or use a DEX aggregator that routes through multiple pools to minimise impact.

Q05Is price impact the same for buy and sell orders?
A05

Yes, it is symmetric. Buying a token increases its price (positive impact), selling decreases it (negative impact). The magnitude depends on the trade size relative to reserves.

Q06How does price impact affect the profitability of an arbitrage trade?
A06

Price impact reduces the profit margin, especially for large trades. Arbitrageurs must factor in price impact to determine if an opportunity is still profitable after execution.

Q07Can I calculate price impact for a multi-token swap?
A07

For a multi-hop swap, you need to calculate the impact at each step. The total impact is the product (or sum) of each step's impact, depending on the route.

Q08Does price impact differ between volatile and stable pools?
A08

Stable pools (e.g., stablecoins) have low price impact because reserves are large relative to normal trade sizes. Volatile pools have higher impact due to lower liquidity.