# Funding

### **Funding Rates**

&#x20;Bluefin computes the funding rate following the following formula:

$$
\text{Funding Rate} = \bigg(\frac{\text{TWA}(P\_{\text{market}})}{\text{TWA}(P\_{\text{index}})}-1\bigg)/24,
$$

where TWA is the time-weighted average, the [index](/bluefin/bluefin-perps-exchange/trading/oracle-and-index-price.md) price is the aggregated price of the base asset in the spot market, and the market price is a median of the last trade price, the best bid and best ask,

$$
P\_{\text{market}} = mean(\text{Best Bid, Best Ask}).
$$

The prices are snapshotted every minute. At the end of each hour, the rate is calculated as an average (TWA) of the 60 values calculated over the course of the last hour. The funding rate has an absolute value hourly cap of 0.1%.

### **Funding Payments**

Funding Payments are accumulated at every hour's end and settled at the time of every account action, i.e., when trading, managing margin, or changing leverage. For each hour, funding payments are proportional to the position's notional value using the oracle price and the hourly funding rate.

$$
\text{Hourly Funding Payment} = \text{Position Notional Value} \times \text{Funding Rate}\
$$

If the Funding Rate is positive, long position holders pay short position holders, and vice versa if the Rate is negative. The mechanism incentivizes the convergence of mid-market price towards the index price.&#x20;


---

# 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://learn.bluefin.io/bluefin/bluefin-perps-exchange/trading/funding.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.
