Slippage
Slippage tolerance protects you from receiving significantly less than expected due to price movements during transaction execution.Overview
When bridging tokens, the actual amount received may differ from the quoted amount due to:- Market price fluctuations
- Liquidity depth changes
- Transaction delays
Slippage Constraints
The SDK enforces strict slippage boundaries:Preset Values
Common slippage values for quick selection:Setting Slippage
In Constructor (Default)
Set a default slippage for all quotes:The constructor uses decimal format (0.005 = 0.5%) for backward compatibility, while quote parameters use percentage format (0.5 = 0.5%).
Per-Request Override
Override slippage for individual quotes:Quote Response Fields
The quote includes slippage-related information:Example Output
For a 100 USDC bridge with 0.5% slippage:Slippage Selection Guide
- Stablecoins
- Standard
- Volatile
For stable pairs (USDC/USDT):Stablecoin bridges typically experience minimal price movement.
Building a Slippage Selector
Error Handling
The SDK throwsInvalidSlippageError for out-of-range values:
Slippage and Price Impact
Slippage tolerance is different from price impact:Best Practices
- Start with 0.5% - The default works for most transactions
- Use presets - 0.1%, 0.5%, 1.0% cover common scenarios
- Increase for large trades - Larger trades may need higher slippage
- Consider market conditions - Volatile markets need higher tolerance
- Warn on high values - Alert users when slippage exceeds 1%
React Example
Next Steps
Quotes
Generate quotes with slippage
Execution
Execute transactions
