Crypto slippage protection
Overview
Slippage is the difference between the expected price of a trade and the actual price of execution. Slippage is relevant for market orders and prevails during periods of higher volatility. In such cases, the bid/ask spread changes before the order is filled leading to a different trade execution price than intended.
Functionality
You can enable slippage protection for crypto exchange orders to protect your client form unexpected losses during periods of higher volatility. The functionality allows to secure the source currency volume, while the target volume is adjusted in case of a leap in pricing. For example:
Slippage protection disabled
Initial order:Buy ETH 2@1362.5 for 2725 USD
Execution order after a price shift:Buy ETH 2@1365.2 for 2730.4 USD
The execution price is different from the expected price. The final sum charged from the client is increased for 5.4 USD.Slippage protection enabled
Initial order:Buy ETH 2@1362.5 for 2725 USD
Execution order after a price shift:Buy ETH 1.99604@1365.2 for 2725 USD
The execution price is the same with the expected price. The final sum charged from the client is not changed, though the volume of the target instrument is decreased.
Configuration
The functionality is enabled in the system configs when the following setting is set to True:
exchange_settings.configuration_providers.kraken.volume_in_quote