Perpetual Funding System
Last updated
Last updated
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.
Over 24 hours, longs pay shorts based on the following formula:
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).
A negative funding rate means that shorts pay longs. Therefore your long position will be paid $24 per day as funding is negative.
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.