To use Custom Slippage Tolerance, set the
slippageBps
parameter to a
non-negative integer (u16) when calling the DFlow Swap API’s Get
Quote or Get Intent
Quote. The value is specified in basis
points (1 bp = 0.01%) and defines the maximum allowed slippage for the swap.How Custom Slippage Works
When using custom slippage, the trader explicitly sets the maximum allowed deviation from the quoted price. The swap will only execute if the final execution price is within this range.Choosing a very low slippage value may cause swaps to fail during periods of
high market volatility.
Sequence of Events
- The trader sets a custom slippage tolerance.
- The swap is submitted via the API or UI.
- DFlow validates that the execution price does not exceed the specified tolerance.
- If the execution price is within tolerance, the swap executes; otherwise, it fails safely.
Frequently Asked Questions
What is Custom Slippage Tolerance?
What is Custom Slippage Tolerance?
Custom Slippage Tolerance allows traders to manually define the maximum acceptable price deviation for a swap.
How do I choose a slippage value?
How do I choose a slippage value?
Consider market volatility, trade size, and liquidity depth. Higher values
increase execution probability, lower values reduce potential price impact.
What happens if the swap exceeds my tolerance?
What happens if the swap exceeds my tolerance?
The swap fails safely without executing, protecting you from an unfavorable
price.
Can I use custom slippage with auto slippage?
Can I use custom slippage with auto slippage?
No — you must choose one method per swap. Auto slippage is fully managed by DFlow, while custom slippage is fully controlled by the trader.