# Funding rates

Periodic funding payments are the most common mechanism used by exchanges to do perpetual swaps. Funding payments act to converge the **mark price** (the price on Position Perpetual Trading Protocol) and the **index price** (the average price from major exchanges - Chainlink price).

Position Perpetual Trading Protocol calculates funding payments every hour.

Position Perpetual Trading Protocol follows [FTX's method](https://help.ftx.com/hc/en-us/articles/360027946571-Funding) to calculate the funding payments, which is as follows:

$$
fundingPayment = positionSize \* fundingRate
$$

The *fundingRate* in the formula above is calculated by, firstly, subtracting the *hourly time-weighted average price (TWAP) of the index price* from the *hourly TWAP of the mark price*, and secondly, dividing the result from the previous step by 24. (Note: FTX's formula results in funding denominated in *position size*, whereas our calculation expresses funding in *quote asset*, ie. USDC.)

$$
fundingRate = {TWAP\_{perpetual} - TWAP\_{index} \over 24}
$$

We use the price feed from **Chainlink** as the data source for the index price because it is currently the most battle-tested Oracle solution on the market. Other oracles will be added as needed.

If the *fundingRate* is positive, long position holders need to **pay** the funding payment while short position holders will **receive** the funding payment, and vice versa if the rate is negative.&#x20;

The funding payment happens at the **end of each hour** on Position Exchange's Perpetual Trading Protocol.

##


---

# 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.position.exchange/products/trading-protocol/position-exchange-protocol-and-vamm/funding-rates.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.
