Funding Rate

Funding Rates

Because Perpetuals have no expiration date, final settlement, or delivery, funding rate payments are the incentive mechanism to bring Vortex’s mark price closer to the oracle price.

For instance, a trader with a short position in a market whose mark price > oracle price will receive a payoff proportional to their position size.

Funding is collected hourly based on the ratio between longs and shorts, using a daily funding period. It is calculated using the difference between an hourly time-weighted average price (TWAP) of mark price and an hourly TWAP of the oracle price normalized over 24 hours.

Funding Formula and Example

t:=an ever increasing hour index, e.g. the number of hours after the luanch of MatrixiTwap(t):=index TWAP at the end of hour tmTwap(t):=mark TWAP at the end of hour tfundingRate(t):=mTwap(t)iTwap(t)60×60cumFundingRate(t):=cumulative funding rate from time 0 to time tamm.cumFundingRate(0)=0amm.cumFundingRate(t)=tmTwap(t)iTwap(t)60×60fundingPaymentuser:=position.baseAsset×(amm.cumFundingRateposition.lastCumFunding) // note this is for single market, we need to sum all funding payment for a user against all market indexExampleAlice:=base asset: 37.5 (in UST), quote asset: 300 UST at hour t0\begin{aligned} t & := \text{an ever increasing hour index, e.g. the number of hours after the luanch of Matrix} \\ iTwap(t) &:= \text{index TWAP at the end of hour }t \\ mTwap(t) &:= \text{mark TWAP at the end of hour }t \\ fundingRate(t) & := \frac{mTwap(t) - iTwap(t)}{60\times 60}\\ cumFundingRate(t) &:= \text{cumulative funding rate from time 0 to time t}\\ amm.cumFundingRate(0) & = 0\\ amm.cumFundingRate(t) & = \sum_t\frac{mTwap(t) - iTwap(t)}{60\times 60}\\ fundingPayment_{user} & := position.baseAsset \times (amm.cumFundingRate - position.lastCumFunding)\ //\ \text{note this is for single market, we need to sum all funding payment for a user against all market index} \\\\\\ \bold{Example}\\ Alice &:= \text{base asset: 37.5 (in UST), quote asset: 300 UST at hour } t_0 \end{aligned}

Suppose now the TWAP mark price and index price are $1.6/$1.6, $1.62/$1.6 and $1.64/$1.61 at t0, t1 and t2 respectively, Alice’s payment in t1 and t2 will be the following:

fundingRatet0:=0fundingRatet1:=0.023600+0=0.000005555555556fundingRatet2:=0.033600+0.000005555555556+0=0.00001388888889fundingPaymentt1:=0.000005555555556×37.5fundingPaymentt2:=0.00001388888889×37.5\begin{aligned} fundingRate_{t0} & := 0\\ fundingRate_{t1} & := \frac{0.02}{3600} + 0 = 0.000005555555556\\ fundingRate_{t2} & := \frac{0.03}{3600} + 0.000005555555556 + 0 = 0.00001388888889\\ fundingPayment_{t1} &:= 0.000005555555556 \times 37.5\\ fundingPayment_{t2} &:= 0.00001388888889 \times 37.5\\ \end{aligned}

Last updated