Estimating Price Impact in Decentralized Exchanges
To properly evaluate price impact on a decentralized exchange (DEX), we’ll continue our analysis assuming zero trading fees. Consider a liquidity pool with:
Consider a liquidity pool containing:
- x₁: quantity of Token X
- y₁: quantity of Token Y
Price Dynamics Framework
Initial Price of Token Y:
When swapping x2 of Token X for y2 of Token Y, the received amount is:
Final Price Calculation:
Price Slippage Derivation
The percentage price slippage is determined by:
Liquidity Ratio (LR) Concept
Introducing the Liquidity Ratio:
We can express slippage purely in terms of LR:

Key Insights:
- Slippage depends solely on Token X liquidity parameters
- Quadratic relationship between LR and slippage
- Quadratic relationship between LR and slippage
Reverse Calculation: LR from Target Slippage
The quadratic equation can be solved to estimate the target LR based on the target DEX Price Slippage.
Practical Application
Example Pool:
- QD(DAI)e1 = 100,000 DAI
- QD(eGHST)e1 = 10,000 eGHST
For 5% slippage:
or 2.649%
Optimal Trade Size:
This framework enables traders to precisely calculate expected price impacts and optimize their trade sizes in decentralized liquidity pools.