Price Impact & Slippage
To fully master AMMs, you must understand the holy trinity of Slippage, Price Impact, and Minimum Amount Received. Let's take a look at all three so Astrochads everywhere can ape safely.
Imagine you want to swap 100 $LUNA for $UST. Astroport’s "Confirm Swap" screen gives us an insight into the swap. Right now, we expect 4500 $UST in return, but a minimum of 4421 $UST. We also see a Price Impact of 0.002% and a Slippage Tolerance of 0.5%. Why is that?
AMMs like Astroport do not update their prices like a usual centralized exchange. Instead, a pool's prices move as the reserve ratio of the tokens in it changes based on the latest swaps. Arbitrageurs benefit from balancing the pool when the token prices in it diverge from global prices.
Your swaps have a direct impact on a liquidity pool. In simple terms: change the amounts of tokens in the pool. This effect is called Price Impact. The extent of your impact on the pool depends on two factors:
  • Order size (hello, whale
  • Pool type (pool formula)
You can envision your interaction with the pool like this: if you sell $LUNA, every subsequent LUNA will cost slightly less than the previous one. Thus, the bigger the trade, the more significant the effect will be on the price of LUNA (and UST).
But wait, what's slippage? Well, some say that when you perform the swap, the price of the token your sell "slips" in the pool. However, slippage is actually the difference between the quoted exchange rate & the actual exchange rate your swap executes at. Most commonly, the difference between the quoted and the execution rates are caused by other swaps being fulfilled between the time of your swap submission and the time your swap transaction is confirmed.

The size of your order compared to the pool size will have a specific price impact. The Astroport interface will do its best to predict the minimum amount of tokens you will receive for each swap. To make sure you receive an amount of tokens that are as close as possible to the quoted amount on the UI, you should adjust your Slippage Tolerance to a value you're comfortable with. Slippage Tolerance will ensure that your swap will only go through if the token prices in the pool have not shifted more than the tolerance (by the time your transaction goes through).
Export as PDF
Copy link