Understanding Slippage

Due to the vAMM architecture a slippage parameter is necessary. The Perpetual Protocol states:

Trades settle somewhat slower than on centralized exchanges, especially during high volume - to mitigate this, we provide slippage controls, and all trading operations take place on xDai, which is significantly faster than the Ethereum base layer.

In other words, the slippage is the worst possible deviation from the order price that you accept for your order. Setting a slippage parameter serves as a method of protecting you against others front running your order, while allowing for small deviations in the price of the vAMM.

Say you set a limit sell order for 1 bitcoin at 100k with a 1% slippage parameter. In that case, you are willing to sell the position for 99k, but not less. If the order were to go through at a lower price, the transaction would revert, effectively stopping it from being executed. If you set your slippage to 0%, you will not accept any less than 100k.

Comparison with other DEXes

We want to make a clear distinction on the terms slippage and price impact and how they are used on other platforms:

  • Price impact: how far along the vAMM curve will your swap push the price. This is greater for trades of a larger size

  • Slippage: Whilst your transaction is waiting to be mined (ie in the mempool), how much deviation from the post-impact price will you accept.

On APEX, it is not possible to make this distinction as there can be a significant period of time between when an order is created and when the order is executed. It is therefore not possible to calculate the price impact in advance.

Last updated