# What is Funding Rate?

The Funding Rate is a recurring payment given to traders going long or short, determined by the gap between the perpetual contract's market price ([Last price](/trading/last-price-mark-price-and-oracles.md)) and the spot price ([Mark Price](/trading/last-price-mark-price-and-oracles.md)). When the market trends upwards, the Funding Rate is positive, and long traders pay a fee to those going short. On the flip side, in a downward market, the Funding Rate is negative, and short traders pay the fee to those going long.

NEXDEX doesn’t levy any fees for these fund transfers between traders. The funding fees on NEXDEX are assessed every hour. Traders will only be part of this fee swap if they have open trades at the designated fee times. Traders who do not have an open position will not pay or receive any funding.

**You can see the ongoing funding rate and when the next payout is due above the chart on desktop:**

<figure><img src="/files/XCZSqRDlH6UH39cYbXiF" alt=""><figcaption></figcaption></figure>

**Or at the bottom of the mobile trading terminal under the Statistics tab:**

<figure><img src="/files/RPZb6VLWtanO5hZoBQ3s" alt=""><figcaption></figcaption></figure>

## Calculation

`Funding Payment = Position Size * Hourly Funding Rate (HFR)`

`Position Size = Position Quantity * MarkPrice`

`HFR = Cap((TWAP((SyntheticVWAPExecutionPrice - MarkPrice)/MarkPrice) + DailyInterestRate) * 1/24)`

`SyntheticVWAPExecutionPrice = (Price_A*Volume_A +Price_B*Volume_B +Price_C*Volume_C)/(Volume_A + Volume_B + Volume_C)`

* `A` is the market buy batch execution
* `B` is the market sell batch execution
* `C` is the limit matching batch execution

Funding payments are applied to the whole market by modifying the `CumulativeFunding` value. Each position stores the current `CumulativeFunding` as `CumulativeFundingEntry`. Subsequent funding payments are only applied upon position changes and can be calculated as:

**FundingPayment**

* For Longs: `FundingPayment ← PositionQuantity * (CumulativeFunding - CumulativeFundingEntry)`
* For Shorts: `FundingPayment ← PositionQuantity * (CumulativeFundingEntry - CumulativeFunding)`
* `Margin' ← Margin + FundingPayment`
* `CumulativeFundingEntry' ← CumulativeFunding`

{% hint style="info" %}
To delve deeper into the NEXDEX Chain documentation, we recommend visiting the [developer links section](/extra/sourses-for-developers.md).
{% endhint %}


---

# 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://help.nexdex.pro/trading/what-is-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.
