> For the complete documentation index, see [llms.txt](https://hedgehog-protocol.gitbook.io/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hedgehog-protocol.gitbook.io/main/how-it-works/dynamic-fees.md).

# Dynamic Fees

> "What if the gas is too high, it will also drop in the next hour? Am I making free money then"? Or "gas is so cheap now, a huge minting event is upcoming - is this free money"?

Markets always have two different opinions. It's not as obvious it might seem. And **when it is truly obvious, dynamic fees come into play.** They are essentially Hedgehog Protocol's version of funding rates.

The dynamic fees ensure that collaterals are not exhausted in episodes of gas fee spikes or downturns, as well as they protect against a malicious attack. The fees effectively discourage redemptions during an under-collateralization spike and restrict potential heavy borrowing during events of high collateralization ratio.

That is, in events where there's a lot of demand for either the collateral or the BaseFee token—this might happen when the trade is obvious —market participants will induce the dynamic fees to reduce users' payoffs until the obvious trade is expensive enough to deter new users from either redeeming or borrowing during these events.


---

# 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:

```
GET https://hedgehog-protocol.gitbook.io/main/how-it-works/dynamic-fees.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
