Introduction
This series explains how funding rates keep perpetual prices in line with the indices they track. The focus is on explaining all aspects in quite a bit of detail to help the community understand how it all fits together and the tradeoffs.
The intention is to add the DYDX community collective knowledge base of one of the most important technical aspects of perpetual futures. Going forward we expect iterative improvements to funding rate to keep prices more in line and funding rates more predictable.
Each post in the series tackles a topic in a lot more detail than typical documentation. Our views on optimising each aspect going forward is also included.
For a non-technical overview please see this primer.
We’ll add each post over the next week or two as it is released here:
Convergence of Perpetual Futures
Topics Covered
Convergence of Perpetual Futures
The series will start with an in depth examination of the forces that keep perpetual futures prices in line with their underlying indices. We answer the question of how and why the funding rate keeps perp prices close to their index prices.
The funding rate does not only introduce potential arbitrage. The funding rate guarantees that the return of the underlying index will be replicated by the perp over some period. This piece analyses the impact of funding rates on regular traders, market makers and arbitrageurs.
Examples how regular traders, market makers and arbitrageurs are all incentivised to converge markets help show how funding rates introduce a new aspect of active trading to perps.
Measuring Prices to Avoid Manipulation and Bias
Oracles are a well known and exploited attack vector in many DeFi protocols. Perps need to track the market price on their own exchange and an external oracle to calculate the funding rate. Manipulating these rates could allow a malicious actor to financially benefit through funding rates.
This piece details best practices for measuring prices on the perp exchange and the external index price. Tradeoffs such as stability and manipulation resistance vs liveliness in different contexts is discussed.
How manipulation of prices should be mitigated is also discussed. It also covers calibration of these techniques in a way not covered since BitMex first implemented perps.
The Interest Rate Component
This piece will focus deeply on all the micro factors affecting the long-term natural rate for a perp. The level where traders will neither feel incentivised to be long nor short.
Exchanges today typically set one level for the interest rate component across all markets. We argue that this causes biases in the distribution of realised funding rates which idiosyncratic approach could help mitigate. This would have the benefit of less biases and smaller magnitudes in the funding rate premium, promoting healthier markets.
Many factors play a role in a no-arbitrage level for the equilibrium interest rate component. These include yield on the underlying token, availability of liquidity to take opposing long and short positions in the token externally and more.
Removing Bias and Oscillation of Prices due to Intra Period Differences
This piece covers price adjustments to the index price that incentivise convergence and accurate marking.
Funding rates are only paid out every one to eight hours. The rate used at the end of each funding period is the averaged observed rate. Previously sampled funding rates imply an accrued funding payment during a funding period. Not accounting for this can incentivise convergence to a price level not equal to the index price.
Prices used for margin and liquidations should undergo a slightly different adjustment to accurately price the true value of positions.
Adjustments to rates, commonly called basis adjustments, correct for this. This piece discusses the how, why, and the implications of doing so or not.
Turning the Inputs into a Funding Rate
This piece extends the typical reference guide found on exchange help pages. All terminology and the overall formula are explained. The usual attention to detail is given to the following topics.
CLAMP: Why a function normally used in computer graphics is part of many funding rate implementations.
The impact of the funding rate period.
The formula, some examples and a sensitivity analysis to see all the inputs come together.
How all the inputs translate into rates and prices on trading front ends. This helps traders optimise their portfolios for funding rates.
A glossary of all the terminology is included for reference.
Comparison of Current Implementations
Overview of the current implementations of BitMex, Binance, Deribit, ByBit, KuCoin and dYdX. The comparison to non-orderbook exchanges is also discussed.
Interpretation of what this means for convergence and different stakeholders on these exchanges.
Mathematics of Funding Rate Arbitrage
A formalisation of the objective function faced by arbitrageurs. The cases where arbitrage is happening against a spot instrument, the same perp on a different exchange and a fixed maturity future are all covered individually.
Conclusion
Anyone interested in this emerging derivative class can benefit from this deep dive into the technicalities of perpetual funding rates. Best practices in every aspect are made clear as well as the potential biases and profit opportunities when they are not followed.
The analysis focuses on perpetual futures, as the most liquid derivative currently. Everything discussed can be generalised to the entire family of perpetual derivatives.
The entire family of perpetual derivatives: perpetual futures, everlasting options, power perpetuals and more can be defined by their underlying index, payoff function and funding rate. Funding rate optimisation will be an important field for derivatives exchanges as