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

# Funding

Funding is an hourly exchange of value between traders with long positions and traders with short positions. It keeps the [Mark Price](/trading/mark-price.md) close to the [Index Price](/trading/index-price.md).

* Positive funding rate: longs pay shorts.
* Negative funding rate: shorts pay longs.

When the Mark Price is above the Index Price, funding is positive. This makes long exposure more expensive and short exposure more attractive.

When the Mark Price is below the Index Price, funding is negative. This makes short exposure more expensive and long exposure more attractive.

### Funding rate

The funding rate determines how much value is exchanged every hour.

#### 1. Calculate the premium

`Premium = (Mark Price - Index Price) / Index Price`

Where:

* `Mark Price` is the Everstrike Mark Price of the contract.
* `Index Price` is the Everstrike Index Price of the contract.
* `Premium` is the relative gap between the two, expressed as a decimal. For example, `0.01 = 1%`.

#### 2. Cap the premium with the dampener

`Base Funding Rate = Min(dampener, Max(-dampener, Premium))`

This caps the base funding rate to the interval `[-dampener, +dampener]`.

The dampener varies by product:

* Perpetual futures: `0.03` = `3%`
* Perpetual options: `1.00` = `100%`

These values can change.

#### 3. Scale the base rate to the hourly funding interval

`Funding Rate = Base Funding Rate * (Funding Interval / Funding Period)`

On Everstrike:

* `Funding Period = 10 hours`
* `Funding Interval = 1 hour`

This means each hourly funding exchange applies one tenth of the capped 10-hour base rate.

#### 4. Calculate the funding payment

`Funding Payment = Funding Rate * Position Size (USD)`

`Position Size (USD)` refers to the position notional in USD.

For directional positions:

`Funding (Long) = -Funding Rate * Position Size (USD)`

`Funding (Short) = Funding Rate * Position Size (USD)`

### Example

Suppose a perpetual future has:

* `Mark Price = 101`
* `Index Price = 100`
* `Position Size = 10,000 USD`
* `dampener = 0.03`

First calculate the premium:

`Premium = (101 - 100) / 100 = 0.01 = 1%`

Then cap the premium with the dampener:

`Base Funding Rate = Min(0.03, Max(-0.03, 0.01)) = 0.01`

Then scale it to the hourly interval:

`Funding Rate = 0.01 * (1 / 10) = 0.001 = 0.1%`

Finally, calculate the payment:

`Funding Payment = 0.001 * 10,000 = 10 USD`

Because the funding rate is positive:

* The long pays `10 USD`.
* The short receives `10 USD`.

{% hint style="info" %}
For perpetual futures, the hourly funding rate is capped at `0.3%` because the base rate is capped at `3%` and the funding interval is one tenth of the funding period.
{% endhint %}

### Operational details

Everstrike exchanges funding during the first five seconds of each hour. During this window, Everstrike snapshots open positions and debits or credits each trader's margin balance.

Trading is disabled during the first ten seconds of each hour.
