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, it is very possible that 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.
The funding rate is a determining factor at which the deviation between mark and index prices converges.
$$ FundingRate = (MarkPriceTwap - IndexPriceTwap)/IndexPriceTwap $$
$$ FundingAmount = FundingRate*PositionSize $$
<aside> 🔴 The funding rate is bound to be kept between [-0.75% and 0.75%] at the protocol level.
</aside>
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 5mins as the Delta:
$G_{t} = G_{t-1} + (Mark - Index)/(288)$ where $\Delta_{n} = 5mins = 5*60$
Where, $\Delta_t$ = Time in seconds between $G_t$ and $G_{t-1}$