Funding Payments

Implementation details of funding payments on Hook

Hook Protocol calculates the funding rate for each listed perpetual futures market using a time-weighted average price (TWAP) approach over the funding period. The funding rate is designed to incentivize traders to take positions that align with the underlying spot market, thus reducing the risk of the perpetual futures contract diverging significantly from the spot price.

Funding Rate Calculation

The funding rate for a given hour is calculated as the average of minute-level samples. The formula for each minute-level sample is:

Funding Rate = (Mark Price - Index Price) / (Index Price * 48) + Base Rate

Where:

  • Mark Price: The fair value price used to calculate unrealized profit and loss for perpetual futures positions. The mark price is a price-impact mid-market price.

  • Index Price: The spot price of the underlying asset, derived from the market's oracle.

  • Base Rate: A minimum funding rate of 0.0125% (0.000125), currently constant across all markets.

Funding Rate Application

If the funding rate is positive, short traders pay the funding rate to long traders. Conversely, if the funding rate is negative, long traders pay the funding rate to short traders.

By incentivizing traders to take positions that align with the underlying spot market, the funding rate mechanism helps to keep the perpetual futures contract prices in line with spot prices, reducing the risk of significant divergence.

On-chain Settlement

All user funds and positions on Hook Protocol remain on-chain at all times, within the protocol's smart contracts. A keeper triggers the funding payment within each market on the funding interval.

Computing the size of your funding payments

On Odyssey, funding payments are automatically paid (or received) from your margin account every hour. The current funding rate and position size compute the magnitude of the payment.

Funding payment = Funding Rate * Perp Mark Price * Position Size * -1

For example, if the Mark Price of a MILADY-PERP is 2 ETH, the funding rate is 0.00200%, and you are short 3 MILADY-PERP, you can calculate funding as follows:

0.002 / 100 * ( 2 eth * -3 ) * -1 = 0.00012 ETH

This funding rate results in a ~107% annualized earnings for shorting the MILADY-PERP

Last updated