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). With Smart Slippage, integrators 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.To apply one slippage budget to the whole route instead of to each step, see the next question.Can I set one slippage budget for the whole route?
Can I set one slippage budget for the whole route?
slippageScope=route with your slippage, and the value becomes the budget for the whole route instead of the tolerance for each step. LI.FI returns one floor, toAmountMin = ceil(expected output × (1 − slippage)), and builds the transaction to deliver at least that amount. If it can’t, the transaction reverts, or the transfer is reported as not fulfilled on /v1/status.At slippage=0.01, on a swap followed by a bridge that prices its own output, each step can use up to 1% with per-step slippage, while the route as a whole uses at most 1% with route-wide slippage.It covers EVM routes with at most one swap, and refuses the rest instead of falling back to per-step slippage. See Route-wide Slippage for supported routes, the response fields and error handling.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. No enterprise enablement is required; recommendations depend on current data coverage.
