> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Slippage

> A slippage tolerance set per token from market data, in place of a single flat value applied to every trade.

Smart Slippage sets a slippage tolerance per token, informed by that token's market behavior, in place of a single flat value applied to every trade.

## The problem

One flat slippage value can't fit every token. Set it tight and volatile tokens revert, so the user pays gas for a failed swap. Set it loose and stable tokens give away value that a tighter bound would have kept. A single number can't be right for both.

|                 | Flat slippage                                | Smart Slippage                       |
| --------------- | -------------------------------------------- | ------------------------------------ |
| Volatile tokens | Reverts when the value is too tight          | Widened to the level the token needs |
| Stable tokens   | Gives away value when the value is too loose | Tightened to protect price           |
| Basis           | One number for every trade                   | Per-token, from market data          |

## How LI.FI solves it

LI.FI resolves a recommended slippage for the tokens a route touches and either applies it as the server-side default for the quote, or surfaces it to you as an advisory value so your client can decide.

When a route crosses more than one token, LI.FI takes the highest recommended slippage among those tokens, so the most volatile token in the path doesn't cause a revert. A slippage value you pass yourself is always respected and takes precedence over the recommendation.

## What you see as an integrator

When Smart Slippage is enabled for your integrator key, each step in the route response carries a `recommendedSlippage` field. Read it per step and apply it in your client, or let LI.FI apply it as the default when you don't set your own.

The field has three states, and the distinction matters:

* **A number.** A recommendation resolved for that step, expressed as a decimal fraction. For example, `0.005` means 0.5 percent.
* **`null`.** The feature is active for your integrator, but no recommendation resolved for that step. This lets you tell "no data for this token" apart from "feature not enabled."
* **Field absent.** The feature isn't enabled for your integrator, so no recommendation was produced.

An enabled step in the route response includes the field:

```json theme={"system"}
{
  "steps": [
    {
      "type": "swap",
      "recommendedSlippage": 0.005
    }
  ]
}
```

<Note>
  Your own slippage always wins. If you pass a slippage value on the request, LI.FI uses it and doesn't override it with a recommendation.
</Note>

## Scope

* Enabled per integrator. When it's off, the `recommendedSlippage` field is absent and quote behavior is unchanged.
* Applies to both same-chain and cross-chain routes.
* Recommendations reflect current market data. Where LI.FI has no current data for a token, the value resolves to `null` for that step rather than falling back to a guess.

## Availability

Smart Slippage is an enterprise feature, enabled per integrator.

<Card title="Contact the LI.FI team to enable" icon="envelope" href="https://li.fi/contact-us/">
  Tell us which tokens and chains you route most. We confirm coverage and enable Smart Slippage for your integrator key.
</Card>
