> For the complete documentation index, see [llms.txt](https://dipcoin-doc.gitbook.io/dipcoin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dipcoin-doc.gitbook.io/dipcoin/perpetual-trading/funding.md).

# Funding

### Overview

Funding is the mechanism that keeps the price of perpetual futures contracts aligned with the underlying asset. It is a recurring payment exchanged directly between traders holding long and short positions, with no fees retained by the platform.

The funding rate reflects the relative difference between the contract price and the reference mark price of the asset.

* When the contract trades above the mark price, the funding rate is positive and long positions pay shorts.
* When the contract trades below the mark price, the funding rate is negative and shorts pay longs.

Funding is settled on a fixed schedule—balances of contract holders are adjusted at each interval, either credited or debited depending on the rate. This process occurs hourly, ensuring that price discrepancies are corrected in near real time and keeping perpetual markets closely tied to spot prices.

### Funding Rate

`Funding Rate(F) = Premium Index(P) + clamp(Interest Rate - Premium Index(P), -0.0005, 0.0005)`

`Funding Payment = Position Qty * Mark Price * Funding Rate(F)`

`Premium Index(P)= Impact Price Difference/Mark Price/8`

`Impact Price Difference = Max (0, Depth Weighted Bid- Mark Price) - Max (0, Mark Price- Depth Weighted Ask)`&#x20;

* *Position Qty = size of the trader’s open position*
* *Interest Rate = predetermined interest component*
* *Depth Weighted Bid / Ask = depth-weighted order book prices*

#### Additional Notes:

* The funding rate is applied hourly, and the trader’s balance is adjusted according to the calculated rate.
* To limit extreme fluctuations, the funding rate is capped in absolute terms at 0.1% per hour.

<br>
