Custom Slippage Tolerance gives traders full control over the maximum price deviation they are willing to accept. This allows users to tailor risk and execution behavior to their specific needs.
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

  1. The trader sets a custom slippage tolerance.
  2. The swap is submitted via the API or UI.
  3. DFlow validates that the execution price does not exceed the specified tolerance.
  4. If the execution price is within tolerance, the swap executes; otherwise, it fails safely.

Frequently Asked Questions

Custom Slippage Tolerance allows traders to manually define the maximum acceptable price deviation for a swap.
Consider market volatility, trade size, and liquidity depth. Higher values increase execution probability, lower values reduce potential price impact.
The swap fails safely without executing, protecting you from an unfavorable price.
No — you must choose one method per swap. Auto slippage is fully managed by DFlow, while custom slippage is fully controlled by the trader.

Get Started with the Swap API Today