Why is the toAmount lower than expected based on the slippage value?
Why is the toAmount lower than expected based on the slippage value?
toAmount is the estimated post-swap amount. toAmountMin is the quoted minimum output amount, reflecting applicable slippage and any known transfer-tax adjustments applied to the quote.A lower toAmount can result from price impact or market fluctuations.For fee-on-transfer tokens below the configured tax limit, LI.FI may already adjust both toAmount and toAmountMin for the known buy/sell tax in addition to slippage. Use the returned toAmountMin rather than recomputing it from the slippage parameter. The adjustment depends on the available tax data and does not cover dynamic or undetected taxes. Where tax screening applies, tokens with a detected buy or sell tax at or above the configured limit are rejected by that check — see Token support.To filter out routes with high price impact, use the maxPriceImpact parameter.What's the difference between slippage and price impact?
What's the difference between slippage and price impact?
- Slippage: Difference between
toAmountandtoAmountMin - Price impact: Difference between the original quote and
toAmount
How do slippage and toAmountMin work in routes with multiple steps?
How do slippage and toAmountMin work in routes with multiple steps?
0.005 on the API). Integrators with Smart Slippage enabled may receive a data-driven server-side default instead. Slippage is expressed as a decimal from 0 to 1, where 1 = 100%.For example, a route that includes swap + bridge + swap can result in 1.5% total slippage in that sense, but there are some exceptions:- Some exchanges, such as those on Solana, may suggest their own slippage if none is set.
- Some bridges, such as cBridge for small amounts, may enforce their own slippage to help ensure successful transaction execution. In those cases, we pass on that slippage.
1 or 100%, expressed as a decimal.We recommend not tracking the slippage set by the user directly, but instead tracking the toAmountMin from our quotes. This is the value we promise the user after slippage. If they receive less than this amount, something is likely off. We also track this on our side so we can investigate transactions that users report.Does increasing slippage protect against exchange rate changes?
Does increasing slippage protect against exchange rate changes?
What slippage tolerance should I use for stablecoins or major tokens?
What slippage tolerance should I use for stablecoins or major tokens?
What is the best slippage value for cross-chain swaps?
What is the best slippage value for cross-chain swaps?
- Execute the quote immediately
- For Solana same-chain swaps, omit the slippage parameter to let LI.FI auto-calculate
How does LI.FI calculate price impact, and is there a minimum amount for filtering?
How does LI.FI calculate price impact, and is there a minimum amount for filtering?
How can I avoid slippage errors?
How can I avoid slippage errors?
- Execute the quote immediately
- Refresh the quote if delayed
- Increase the allowed slippage in your API request
Do you guarantee what the user receives, and how does slippage work?
Do you guarantee what the user receives, and how does slippage work?
Is there a way to get a per-token slippage recommendation instead of a flat value?
Is there a way to get a per-token slippage recommendation instead of a flat value?
recommendedSlippage values on generated route steps. These values may differ because step enrichment can inspect actual intermediate tokens while the earlier default cannot.See Smart Slippage for the field’s states, how recommendations are derived, chain and token coverage, and how it interacts with the SDK and Widget slippage config. It’s an enterprise feature enabled per integrator.
