Long XBTUSD Perpetual Contract Example
The following examples do not consider Premium, which is explained above.
XBTUSD Contract Details
Contract Value = 1 USD
Margin Currency = Bitcoin or XBT
Underlying Index = XBT BitMEX Index
Funding Quote Rate = USD Lending Rate in the BitMEX Index
Funding Base Rate = XBT Lending Rate in the BitMEX Index
Funding Timestamp = 04:00 UTC, 12:00 UTC, and 20:00 UTC
Day 1, 10:00 UTC
A trader goes long 15,000 XBTUSD contracts at a price of 750 USD.
XBT Entry Value = 15,000 Contracts * 1 USD * 1/750 = 20 XBT
Day 1, 12:00 UTC
The trader held the position over the Funding Timestamp at 12:00 UTC and exchanges the Funding Amount. The amount he pays is determined as follows:
The XBTUSD spot price is currently 750 USD.
Funding Quote Rate = 1.00% per day
Funding Base Rate = 0.25% per day
Funding Rate = (1.00% - 0.25%) / 3 = 0.25%
Funding Amount = Mark Value * Funding Rate = 20 XBT * 0.25% = 0.05 XBT
The Funding Amount is positive, therefore since he is long the trader pays and his counterparty who is short receives 0.05 XBT.
Day 1, 18:00 UTC
The XBTUSD contract rose in price to 800 USD. The trader closes out his position by selling 15,000 XBTUSD contracts. He does this before the next Funding Timestamp at 20:00 UTC and will not need to pay the Funding Amount at that time.
The trader made 1.25 XBT profit from the increase in the value of XBTUSD:
PNL = 15,000 * 1 USD * (1/750 - 1/800) = 1.25 XBT
The trader exchanged 0.05 XBT in funding, hence the trader’s total profit is 1.2 XBT (1.25 XBT - 0.05 XBT).
Funding Rate Examples
Recall the formulas for calculating the Funding Rate:
Interest Rate (I) = (Funding Quote Rate - Funding Base Rate) / Funding Interval
Premium Index (P) = (Max(0, Impact Bid Price - Mark Price) - Max(0, Mark Price - Impact Ask Price)) / Spot Price + Fair Basis used in Mark Price
Funding Rate (F) = Premium Index (P) + clamp(Interest Rate (I) - Premium Index (P), 0.05%, -0.05%)
Below is an example of how the Funding Rate (F) varies with varying Interest Rate (I) and Premium Index (P) figures.
Interest Rate (I) | Premium Index (P) | Funding Rate (F) |
---|---|---|
0.03% | 0.00% | 0.03% |
0.03% | 0.06% | 0.03% |
0.03% | 0.15% | 0.10% |
0.03% | -0.05% | 0.00% |
0.03% | -0.10% | -0.05% |
0.10% | 0.06% | 0.10% |
0.10% | 0.15% | 0.10% |
0.10% | -0.05% | 0.00% |
0.10% | -0.10% | -0.05% |
0.20% | 0.10% | 0.15% |
0.30% | 0.10% | 0.15% |
0.45% | 0.10% | 0.15% |