# Router Fees

BrainDex takes a fee equal to half of the difference between the amount out minimum after slippage and the actual amount received, with a maximum fee of 0.2% and a minimum fee of 0.05%.

#### Fee Calculation - amountOutMin after fees

Because the router fee depends on the difference between the passed `amountOutMin` parameter and the actual amount received, for the sake of this example we will assume that `amountOutMin` and amount received are equal. In practice, because the router fee is half of the difference floored at 0.05%, the amount received after router fees will never be lower than the following equation:

$$
Amt = x \* 0.9995
$$

Please see [BrainDexRouterV2.sol](https://github.com/BrainDexAggregator/BrainDex-Contracts/blob/master/contracts/BrainDexRouterV2.sol) for the precise implementation.


---

# 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://braindex.gitbook.io/braindex-documentation/protocol-information/router-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.
