Perpetual Funding System

Unlike dated futures, perps donโ€™t have an expiry. In place of that, users are charged a funding rate based on their position and the orderbook on Zeta.

How does Zeta calculate funding rates?

Over 24 hours, longs pay shorts based on the following formula:

fundingRate=impactMidpointoracleโˆ’1fundingRate = \frac{impactMidpoint}{oracle} - 1
payment=fundingRateโˆ—oracleโˆ—positionSizepayment = fundingRate * oracle*positionSize

impactMidpointimpactMidpoint is the midpoint of the orderbook given $1000 worth of quotes on both the bid and ask side.

For example, letโ€™s say you are long 100 lots of SOL-PERP and hold it for 24 hours. Over that time, the orderbook midpoint is $11.76 and the SOL oracle price is $12 (in reality these will fluctuate).

fundingRate=11.7612โˆ’1=โˆ’2%ย perย dayfundingRate = \frac{11.76}{12} - 1 = -2\%\ per\ day
payment=โˆ’2%โˆ—12โˆ—100=$24payment = -2\% * 12 * 100 = \$24

A negative funding rate means that shorts pay longs. Therefore your long position will be paid $24 per day as funding is negative.

How is funding paid on Zeta?

Funding rates on Zeta are calculated on Zeta approximately every 10 seconds.

Rather than applying funding on a set timer, we apply it to your balance on any balance-sensitive operation (placeOrder, withdraw, liquidate, etc.), as well as every couple of minutes using our cranks.

At any point you can apply any unpaid funding to your account with our SDK's utils.applyPerpFunding() function.

Last updated