# Funding Rate

Rules of deduction:

* We will deduct funding rate every 6 hrs
* One rate will be calculated for those 6 hrs by averaging smaller intervals
* Anyone with a position open during the deduction snapshot will be charged the fee
* Users will pay their share as per notional value of their position at the time of funding amount deduction
* It will be realized PNL deducted / added to user’s assets

Formula:

```jsx
funding_amount_per_user_per_position = direction * ob_price(t) * qty * funding_rate
ob_price(t) = (best_bid(t) + best_ask(t))/2
funding_rate = premium_rate + interest_rate
interest_rate = 0.01% (fixed across all markets)
```

Premium rate for the interval is calculated by calculating minute-wise values and doing a TWAP over the total minutes in the window

```jsx
premium_rate_minute = (Max(0, impact_bid_price - spot_price) - Max(0, spot_price - impact_ask_price)) / spot_price
impact_bid_price = execution price of SELL market order, 5000 USDC notional value
impact_ask_price = market BUY order
premium_rate = SUM(premium_rate_minute)/(60*8)
```


---

# 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.kriya.finance/kriya-perpetuals/perpetual-architecture/funding-rate.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.
