Dynamic Funding Rate

Concept

The dynamic funding rate (DFR) is a mechanism of the Futureswap system that aims to keep the long and short open volumes balanced. Futureswap relies on the volume of open longs and open shorts to be relatively balanced for the majority of the time. There will be deviations where the pools are very imbalanced due to large trades or spikes in volatility but this will impact the funding rate which in turn incentivizes more volume on the less popular side.

Example

If the DFR was at +0.01% that means that every 8 hours the longs would be paying the shorts 0.01%. If the DFR was at -0.23% that means that every 8 hours the shorts would be paying the longs 0.23%.

Time of Charge

The DFR is a percentage fee of the entire position size. Although it is based on an 8 hour period the fee is actually charged per the following contracts interaction: openLong openShort closeTrade. For every interaction the contract calculates how many seconds passed since the last DFR was charged and calculates how much should be charged for the time used between the two and transitions value appropriately.