Slippage is the difference between the quoted price and
the final execution price. On Solana, prices can move between quote and execution
because transactions are processed in blocks and liquidity shifts rapidly. A
higher tolerance increases execution probability; a lower tolerance tightens
price protection.
- Auto slippage: DFlow chooses the tolerance dynamically.
- Custom slippage: You set the tolerance explicitly.
Auto Slippage Tolerance
With auto slippage, DFlow determines the optimal slippage based on market conditions so trades have a high probability of success while maintaining price protection. To use auto slippage, setslippageBps=auto on either of the following API routes:
Auto slippage is calculated server-side by the DFlow Aggregator and updates
continuously based on current onchain conditions.
Custom Slippage Tolerance
Custom slippage gives traders direct control over the maximum price deviation they are willing to accept. To use custom slippage, setslippageBps to a non-negative integer (u16) on either of the following API routes:
The value is in basis points (1 bp = 0.01%).
Setting slippage too low can cause trades to fail during high volatility or
when liquidity is thin.
Sequence of Events
- You set slippage tolerance (auto or custom).
- You request an order or intent quote.
- DFlow validates the execution price against your tolerance.
- If the tolerance is met, the trade executes; otherwise it fails safely.