Funding Rates
To ensure perpetuals converge to their respective underlying, funding is exchanged between long and short positions. For example, if the perp is trading at a premium to the underlying, then longs will pay shorts funding. This encourages further shorts and decreases the differential between perp and spot.
Derive perpetuals are settled continuously. Specifically, whenever a user adjusts their position (say, via a trade or withdrawal) their unrealized funding and profit and loss is settled to the current perpetual price (not the spot price). Further, traders can have the settle function called on their account by other users (including themself!).
The instantaneous funding rate is calculated as follows.
First, we determine the impact ask price (IAP) and impact bid price (IBP). These are defined as the average execution price for a market sell (buy) of the impact notional amount (4000) respectively. We use these values to calculate the perpetual premium:
Where:
Finally, we calculate the funding rate per hour as:
Where:
The funding paid from longs to shorts is then calculated as follows:
Where:
The perpetual funding rates are capped at
In other words, the maximum rate longs can pay shorts will be 0.057% of the spot price per hour. Similarly, the maximum rate shorts can pay longs will be 0.057% per hour (represented as -0.057%).
Updated about 1 month ago