Previous posts in this series have covered what makes perpetual contracts converge to their underlying indices, how to measure prices to avoid unwanted side effects, the role of the interest rate component, and removing the effect of the expected funding rates. Now it’s time to put this all together into a formula that outputs the funding rate.
First there are a few more details to consider.
To CLAMP or not to CLAMP and by How Much
Most exchanges set a tight range where the funding rate is always equal to the interest rate component. The reason is that transaction costs mean incentives are only viable when the divergence between markets exceeds a certain amount. It also offers a degree of robustness to the funding framework by keeping the premium zero for small divergences and only incentivising convergence if there is a clear need to do so.
Adding the CLAMP term keeps the funding rate constant when the market price is close to the index price + interest rate component.
Allowing for a small range where the funding rate does not change can stabilise prices near convergence. It can aid the user experience by removing funding rate volatility when prices are close to in line.
So How Much
Too much and user experience can be inhibited as prices do not follow closely enough. This also has implications for liquidations and risk.
Too little and this might as well be excluded as it will not make much difference.
If a CLMAP term is used then the range where the funding rate is kept constant should be a function of taker fees on the exchange. Since BitMex introduced perpetuals in 2016, exchanges have just followed its implementation, CLAMPing funding rates 5bps each way. In a world where taker fees are being reduced, this could be too wide.
Our recommendation is to CLAMP the width of the taker fees in a high volume fee tier. This starts incentivising corrective trades slightly sooner for more active and sophisticated traders. Liquid, well calibrated markets where perp prices typically track their underlying indices closely will benefit from many periods of predictable funding at the interest rate component.
The Funding Rate Period
The Length of Time Between Funding Payments
As mentioned in the previous post on basis, if accrued funding is correctly accounted for in the index price then the only difference the funding period makes is to shift unrealised P&L to realised P&L. Generally the more frequent the better for risk and convergence.
This makes the funding period more of a user experience and administrative consideration. Anything between 0 and 8 hours is appropriate. Longer than this and it is very important to account for basis correctly.
The Frequency of Sampling
The more frequently funding rates are sampled the better from a risk perspective. Frequent sampling gives a truer representation of the average divergence between markets and is less susceptible to sampling bias. This also allows corrective trades to feed back into the expected funding rate quicker, preventing oscillations.
The Funding Rate Formula
Funding Rate (F) = Premium Index (P) + clamp(Interest Rate (I) – Premium Index (P), 0.05%, -0.05%)
Where:
Interest Rate (I) = (Interest Rate Quote Index – Interest Rate Base Index) / Funding Interval
Premium Index (P) = (Max(0, Impact Bid Price – Mark Price) – Max(0, Mark Price – Impact Ask Price)) / Index Price + Basis
Should the CLAMP term be excluded then the funding rate formula reduces to:
Funding Rate (F) = Premium Index (P) + Interest Rate (I)
Bounding the Funding Rate
Most exchanges cap the absolute size of the funding rate. We’ve previously researched this phenomenon for dYdX leading to a proposal to widen this band from 75bps to 400bps. Bounds should be based on the amount of leverage permitted on the exchange to avoid the possibility of immediately liquidating maximally leveraged positions.
Our framework sets the bound such that maximally leveraged positions have 4 hours at the maximum funding rate before liquidation. This gives the funding rate sufficient room to incentivise convergence while protecting the user experience of all traders.
How this looks on an Exchange Interface
The screenshot below is taken from the dYdX ETH-USD market. The red value on the left is the current market price. Next to it is the current index price showing that the markets are currently exactly in line.
The 1h Funding shows that in the current funding period the expected funding rate is 0.000956% (1h rate). This is the average funding rate sampled thus far over the funding rate period.
On the far right we see that the funding period ends in 50 minutes 43 seconds.
Traders should use this information to inform decisions surrounding the funding rate. In the example screenshot above we can see that the expected funding rate is slightly below the 0.001% interest rate component on dYdX so on average in this funding period the market price has been slightly below the index price. Longs will still pay shorts funding, but a relatively small amount.
Glossary
We thought it would be useful at this stage to include a glossary of terms for reference.
Interest Rate Quote Index: Daily money market interest rate for borrowing the quote asset.
Interest Rate Base Index: Daily money market interest rate for borrowing the base asset.
Clamp function: clamp(value1, value2, value3) outputs the mid value of the three inputs.
Funding Interval: The number of times a day funding rates occurs.
Impact Bid/Ask Price: Average execution price for a sell/buy for the Impact Notional amount.
Impact Mid Price: Mid of the impact bid and ask prices.
Impact Notional: Dollar value used to calculate the impact bid/ask. This sets how deep in the orderbook to measure the price.
Index Price: Price of the underlying index.
Mark Price: The index price adjusted for natural basis.
Basis: Correction of the futures price for expected funding. This corrects for normal divergence, expected to unwind at the next funding round.
Initial Margin Fraction: the smallest fraction of free collateral value to position value in a market to add new positions.
Maintenance Margin Fraction: the smallest fraction of free collateral value to position value in a market before liquidation.