Price Impact and Slippage Tolerance
Last updated
Last updated
Users specifically newcomers are advised to "watch out" Price Impact (or Slippage) when you swap tokens.
Price Impact is essentially the expected price difference in % between the quoted price and the executed price.
You can check the Price Impact of your trade after you have entered the amount of your Input Token.
Both the size of your Trade Volume and the Liquidity Volume in the liquidity pool you are trading with can affect the Price Impact.
The larger the trade size (or the less the liquidity volume), the larger the Price Impact will be.
Slippage Tolerance is the MAX price impact a user is willing to tolerate when executing a trade. It can be set in the "Settings" when you hit the little button on the top-right corner of the "Swap interface".
You can pick default 0.1%, 0.5%, and 1% for your slippage tolerance, or you can customize it.
If you set the Slippage Tolerance too small, it is possible that your trade will be reverted.
Assume the following pool info:
BNB = 200
MODO = 10,000
Hence:
Quoted Price (MODO/BNB) = 50
Now, input 1 BNB for MODO
BNB in the pool = 200 + 1 = 201
Constant Product is 2,000,000 (it is constant)
To keep it simple, the trading fee is not considered in this example.
Hence:
MODO in the pool = Constant Product / BNB in the pool = 9950.25
Output MODO = 10,000 - 9950.25 = 49.75
Executed Price = Output MODO / Input BNB = 49.75
Price Slippage = the price difference between Quoted Price and Executed Price = 50 - 49.75 = 0.25
Price Impact = the price change in % = 0.5%
If you set the Slippage Tolerance below 0.5%, your trade would be most likely reverted.
Constant Product ( ) = 2,000,000