Funding Calculation
Last updated
Was this helpful?
Last updated
Was this helpful?
Funding is a common feature of perpetual trading. It entails small, regular payments exchanged between traders with long and short positions. This mechanism helps keep the perpetual contract's price close to the asset's spot price.
A funding rate is calculated at regular intervals. The sign of the funding rate tells our system which side is “over-represented” or “under-represented”. When the rate is below zero, it means the contract is trading below the index price; shorts are effectively being subsidized to hold their position and must pay the funding fee to longs.
Funding serves as a balancing mechanism. When there is a large number of traders on either the long or short side, this imbalance can cause the contract price to deviate from the spot price. Funding realigns the contract price with the spot price by making it more costly to remain in the majority trade. This stabilizes the market by preventing significant price deviations.
Funding at Rails is a 3-step process as described below.
In financial trading, "premium" gauges the difference between long and short positions in a perpetual contract. It indicates the deviation of the perpetual contract's price from the spot index. Calculated every minute, the premium utilizes this formula:
Where is the entry price of your trade and is pulled from .
The funding rate is determined hourly, using the 1-hour average premium. This average is computed from 60 individual premiums, calculated each minute as outlined in Step 1.
To prevent excessively high or negative funding payments, the funding rate is capped between a maximum and minimum funding rate. All parameters are defined here:
Time Factor
1
This normalization factor adjusts the funding rate to match the time interval between funding payments (i.e. 1 hour), ensuring traders are charged or credited fairly for the actual period their positions are open.
Interest Rate Component
0.0000125
A fixed value added to the funding rate to reflect the cost of holding a leveraged position, similar to paying interest on borrowed capital.
Minimum Funding Rate
-0.04
This is the minimum funding rate value to prevent excessively negative funding rates.
Maximum Funding Rate
0.04
This upper bound is used to cap high funding rates.
Funding payments take place every hour. You can see when the next funding event will take place in the of the main trading page.
Open Positions: For active trades in the , the realized P&L column reflects funding payments for that trade.
: The funding row in the account summary contains the sum of all lifetime funding payments for each user.
Historical Payments: Individual funding payments for all historical trades can be found on the Portfolio page in the .