# Trading Fees

## Origination Fees

GammaSwap charges an origination fee to borrowers when the position is initialized.\
\
The origination fee starts at 0 to 10bps of the total notional liquidity borrowed depending on the AMM. To calculate the notional liquidity borrowed, use the following formula:

```
total liquidity borrowed = (1 / 1 - LTV) * initial deposit
```

To calculate the origination fee, we simply multiply the total liquidity borrowed by the opening fee rate:

```
origination fee = total liquidity borrowed * opening fee rate
```

Let's say we opened a position with 95% LTV and deposited 10,000 USDC. The origination fee that would be charged is

$$f(x) = ((1 /1 - .95) \* 10000) \* 0.001$$

$$f(x) = 200000 \* 0.001$$

$$f(x) = 200$$, therefore the origination would be 200 USDC

{% hint style="info" %} <mark style="color:blue;">Please be aware that the origination fee in the GammaSwap dApp may differ from the one calculated here. Always confirm fees in the confirmation modal.</mark>
{% endhint %}

If you open a straddle position, there are no additional rebalancing fees.\
\
If you open a long position or short position, the total notional collateral is rebalanced towards one of the tokens by executing a swap transaction, so it will incur additional rebalancing fees from 0% to 0.08% depending on the CFMM. It is reflected in the trade position as price impact and can be controlled using the slippage parameter.

### Dynamic Origination Fees

After 80% utilization of the liquidity pool, the GammaSwap contract will start charging exponentially increasing fees to disincentivize over leveraging of the platform and prevent attacks to the protocol. When the pool is close to 100% utilization, origination fees approach 100% to prevent locking of the pool.

## Fee Distribution

1. Borrow Fees: 90% liquidity providers, 10% to DAO
2. Origination Fees: 60% liquidity providers, 40% to DAO


---

# 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.gammaswap.com/guides/tradeperpoptions/trading-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.
