> For the complete documentation index, see [llms.txt](https://docs.houstonswap.io/houstonswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.houstonswap.io/houstonswap/advanced-topics/formula.md).

# Formula

### Dynamic Fee

<figure><img src="/files/YgCEIU0uRQuRRhCh8DyC" alt=""><figcaption><p>Step Function of Sigmoids</p></figcaption></figure>

<figure><img src="/files/5jJ5PP7brpW5ehckPlVG" alt=""><figcaption><p>Major Formula</p></figcaption></figure>

Where:<br>

<figure><img src="/files/a26MAMwBWTbVEREzsaux" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/a6q1rJJFgkjONUY79VHm" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/XLXZcAU58t5GLrPNO5H0" alt=""><figcaption></figcaption></figure>

The sum of 3 components has similar effect as Triple Tier Fee model.

![](/files/gSTFyLELHa3SAT16hnRi): adjust the max. cap for each absolute fee tier

![](/files/jNw194Ojrc9jKiSDi8z6): shift the fee tier adjustment threshold - the larger beta , the greater the volatility allowed for fee tier change

![](/files/YbEt2c6lKI0UQJXRfibK): adjust the slope of fee changes when it comes across 2 absolute fee tier

Note:

* ![](/files/glXOrX9gRPX2n3yWehbt)is capped by 1
* `Gammas must be > 0`


---

# 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.houstonswap.io/houstonswap/advanced-topics/formula.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.
