> For the complete documentation index, see [llms.txt](https://docs.hello.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello.trade/about/trading/funding.md).

# Funding

### Overview

HelloTrade uses funding payments to anchor perpetual and leveraged contract prices to their underlying reference prices. Funding is exchanged directly between traders holding long and short positions, ensuring that contract prices remain aligned with the mark price over time. When market demand skews toward one side, funding incentivizes traders to rebalance positions, promoting healthy and efficient markets. HelloTrade does not collect funding payments; all transfers occur peer-to-peer.

### Technical Details

The **Funding Rate (F)** on HelloTrade is calculated using a combination of the **Average Premium Index (P)** and a baseline **Interest Rate (I).** The funding rate formula applies to an 8 hour funding rate. Funding is paid each hour at one eighth of the computed rate. The formula is:

* **Funding Rate (F)** = Average Premium Index (P) + clamp(Interest Rate (I) - Average Premium Index (P), 0.05%, -0.05%)

Where:

* **Premium Index (P)** reflects the deviation between impacted market prices and the index price.
* **Interest Rate (I)** represents the cost component embedded in leveraged trading. This value is set at 0.01%.
* The **clamp** function bounds the interest rate adjustment to ±0.05% to prevent excessive funding volatility.

The **Premium Index** is defined as:

* Premium Index (P) = Impacted Price Difference / Index Price

The **Impacted Price Difference** is calculated as:

* **Impacted Price Difference** = (Max(0, Impact Bid Price - Index Price) - Max(0, Index Price - Impact Ask Price))
* **Impact Bid Price** and **Impact Ask Price** are the average execution prices required to trade a fixed impact notional on each side of the order book.
* Impact notional sizes are dynamically determined based on **average daily volume (ADV)**, **average top-of-book notional**, and **average market depth**, ensuring funding reflects real liquidity conditions.

The Premium Index is **sampled every second** and averaged across the funding interval to compute the **Average Premium Index** used in the funding rate calculation. The final funding rate is capped at ±1% per hour.

During market closures, the index tracks the orderbook via a 1-hour EMA. The premium index is additionally scaled down during closures to further reduce funding rate sensitivity during low-liquidity periods.

### Numerical Example

Assume the following values during a funding interval:

* Index Price = 100
* Impact Bid Price = 100.20
* Impact Ask Price = 99.90
* Interest Rate (I) = 0.03%

First, compute the Impacted Price Difference:

max(0, 100.20−100) − max(0, 100−99.90) = 0.20 − 0.10 = 0.10

Then calculate the Premium Index:

P = 0.10 / 100 = 0.10%

Now compute the funding adjustment:

I - P = 0.03% - 0.10% = -0.07%

After applying the clamp:

clamp(−0.07%, 0.05%, −0.05%) = −0.05%

Finally, calculate the Funding Rate:

**F = 0.10% − 0.05% = 0.05%**
