# Dynamic Fees

The Dynamic Fees Plugin allows Rooster to automatically adjust swap fees in real time based on market conditions such as volatility, trading volume, and available liquidity. Instead of relying on a fixed commission rate, fees are optimized dynamically to strike the right balance between competitiveness, liquidity provider (LP) incentives, and protocol revenue.This plugin leverages advanced mathematical models and oracle data to ensure accurate, efficient, and responsive fee adjustments.

**Key Features**

* **Adaptive Fee Calculation:** Transaction fees are recalculated dynamically for every swap, reflecting the most recent market conditions.
* **Parameter Tracking:** Fees respond to changes in volatility, trading volume, and liquidity depth, enabling smarter and more efficient pricing.
* **Customizable Configurations:** Rooster governance or pool operators can configure fee boundaries (minimum/maximum), sensitivity to volatility, and other parameters to fit asset-specific behavior.
* **Real-Time Adjustments:** The plugin updates fees on-chain after each swap, ensuring users always interact under current market conditions.
* **Gas Efficiency:** The plugin is separated from the immutable core AMM logic, which minimizes disruption to pools and reduces operational overhead.

**Benefits**

* **DEX Competitiveness:** Adaptive fees make Rooster more attractive to traders by offering fairer pricing across asset types, from stable RWAs to volatile tokens.
* **Revenue Optimization:** Fees can increase during volatile periods to boost protocol and LP returns, while lowering during calm markets to attract higher trading activity.
* **LP Profit Maximization:** Dynamic fees allow LPs to earn more during high-risk, high-volatility events, while keeping pools active and liquid during quieter conditions.
* **Architectural Flexibility:** Because Dynamic Fees run as a plugin, Rooster can upgrade, disable, or replace this logic without requiring liquidity migration or redeployment of pools.


---

# Agent Instructions: 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://docs.rooster.trade/protocol/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.
