> For the complete documentation index, see [llms.txt](https://help.dedust.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.dedust.io/en/liquidity/deposit/advanced/slippage.md).

# Slippage

During liquidity deposits and withdrawals, the exchange rate in a pool may slightly change ('slip'), due to other users trades. When it happens after you sign the transaction in your wallet app, but before the transaction is executed in the blockchain, here's where slippage comes in place.&#x20;

If the expected exchange rate shifts, in either direction, by more than your slippage tolerance, then your deposit or withdrawal transaction won't be executed. Your tokens will be returned to your wallet, in case of deposit, or will stay in the pool, in case of withrawal.

{% hint style="info" %}
Network fee for interaction with the blockchain is consumed anyway, even if deposit or withdrawal failed.
{% endhint %}

Default slippage value for both liquidity deposits and withdrawals is 1%. And they're tuned separately.

To make it clearer, let's compare the expected outcome of a deposit at different slippage levels.

<div><figure><img src="/files/6eTUnEYKmSznIYwgV7mj" alt=""><figcaption><p>1% Slippage</p></figcaption></figure> <figure><img src="/files/yiiA7ziz4FshN2xVdw5L" alt=""><figcaption><p>5% Slippage</p></figcaption></figure> <figure><img src="/files/AKjhDUprh788HoOjTlXr" alt=""><figcaption><p>10% Slippage</p></figcaption></figure> <figure><img src="/files/T2FtggVVgaQKoOU68kO4" alt=""><figcaption><p>0.1% Slippage</p></figcaption></figure></div>

<details>

<summary>Learn more</summary>

The expected exchange rate is equal for all four cases, with slippage from 0.1% to 10%. But if suddenly, during the execution, the rate changes — then "we agree" to proceed, only unless:

* the price change is within 1%, resulting in we'd get position equivalent at least $201.22
* the price change is within 5%, resulting in we'd get position equivalent at least $193.09
* the price change is within 10%, resulting in we'd get position equivalent at least $182.93
* the price change is within 1%, resulting in we'd get position equivalent at least $203.05

And in this case the unused amount of one token or another (depending on which direction price goes), initially taken from our wallet for the deposit, will be credited back to the wallet.

If the rate change (in this specific liquidity pool) exceeds the slippage defined by user, then whole deposit transaction will be reverted, and both tokens (in full) will be returned to wallet.

{% hint style="success" %}
So in short, the slippage tolerance defines when to proceed or not, if market conditions change. And which amount of user's assets should go to pool or back to his wallet in this case.&#x20;
{% endhint %}

</details>

Refer to [slippage in trade](/en/trade/advanced/slippage.md) to find out more about slippage.

{% hint style="warning" %}
Users are responsible for setting their slippage tolerance.

If you set it too high or too low, you accept the risks and potential consequences.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.dedust.io/en/liquidity/deposit/advanced/slippage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
