# Funding Payments

### The Significance&#x20;

The SNV index price is calculated on the floor prices of the compositions and is essentially independent of our perpetual market. The SNV Mark Price, on the other hand, is discovered by the participants' trading activity.

During trading, the participants may deviate the Mark Price of the SNV away from the Index Price (which is taken as the underlying).

To de-incentivize the deviation of the Mark Price away from the Index Price, Funding Payment is introduced, which flows from long position holders to short position holders if the Mark Price deviates higher and vice versa.

### Funding Rate

The funding rate is a determining factor at which the deviation between mark and index prices converges.

$$FundingRate = (MarkPriceTwap - IndexPriceTwap)/IndexPriceTwap$$

$$Funding Amount = Funding Rate \* PositionSize$$

{% hint style="info" %}
The funding rate is bound to be kept between \[-0.75% and 0.75%] at the protocol level.
{% endhint %}

### Global Index(G)

Instead of sending out funding payments every hour, we are accumulating the funding of each user and settling whenever he/she interacts with the contracts.

We are maintaining a global Accumulator defined by the following:

$$G\_t = G\_{t-1} + (\Delta\_t)  (Mark - Index) / 86400$$

Say, with 5 mins as the Delta,

$$G\_t = G\_{t-1} + (Mark - Index)/288 \quad where(\Delta\_n) = 5 mins=5\*60$$

{% hint style="info" %}
Where $$\Delta\_t$$ = Time in seconds between $$G\_t$$ and $$G\_{t-1}$$
{% endhint %}

Thus,

$$G\_i=(\sum\_i Mark\_i\*\Delta\_i-\sum\_iIndex\_i\*\Delta\_i)/86400$$

We also maintain a relative accumulator for each account with a position opened.

Whenever a user interacts with the account, funding to be paid is:

$$Funding = (G\_i - I\_i) \* Position$$

Where $$I\_i$$ is the Cached Index maintained for each participant, this is reset as $$Gi$$every time after the funding is settled.
