> For the complete documentation index, see [llms.txt](https://docs.hashstack.finance/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hashstack.finance/developers/slippage-control.md).

# Slippage Control

Slippage is the gap between a trade's expected or requested price and the price at which the trade was executed. It usually happens in markets with high volatility or low liquidity.

**Factors to consider:**

* **Liquidity**: Pools must have enough liquidity to handle the expected trading volume. Pools with higher volume and longer/deep order books tend to have low slippage.
* **Slippage tolerance**: Users with higher tolerance can be willing to trade in pools with low liquidity, but those with low tolerance would prefer a more elevated liquidity pool.
* **Token pairs**: Tokens that are in demand tend to have higher liquidity → lower slippage
* **Price Volatility:** If the token in the pool is highly volatile then it leads to a higher chance of slippage which ends up being a poor user experience.

**Controlling Slippage Threshold:**

Under a practical slippage tolerance, the contract checks the execution price during the trade and breaks/stops the trade in cases where the execution price has deviated beyond the tolerable slippage set. →\[0.5, 3]%

Note: Due to low TVL at the initial phase higher slippage cases are bound to occur thus blocking a trade ultimately results in a dissatisfied user experience which is a trade-off to this approach. Thus, until the TVL of that asset grows to healthy liquidity, larger slippage is authorized as of this version.


---

# 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://docs.hashstack.finance/developers/slippage-control.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.
