Funding is the mechanism that keeps perpetual markets balanced by incentivizing traders to take positions that reduce market skew and bring the price of perp contracts close to the underlying spot price. When there are more longs than shorts, longs pay shorts. When there are more shorts than longs, shorts pay longs.Documentation Index
Fetch the complete documentation index at: https://docs.gte.xyz/llms.txt
Use this file to discover all available pages before exploring further.
How Funding Works
GTE uses a sophisticated funding system that’s cadence-invariant - meaning the realized funding is independent of when settlements happen. This ensures fairness regardless of timing.The Premium Signal
Every minute, GTE samples the premium - the difference between the mark price and index price: This premium tells us how much the perpetual is trading above or below its fair value. The system maintains a rolling average (TWAP) of these premium samples (every 5-15s) over the last 60 minutes to smooth out noise.Funding Rate Calculation
At each funding interval, GTE calculates the funding rate using a two-step process: Step 0: PremiumP̄= Premium TWAP (rolling average)IR_int= Interest rate component (usually 0)K= Inner clamp (50 bps default)C= Outer cap (100 bps default)
Funding Accrual
The funding rate is converted to a per-second rate and continuously accrued:r_sec= Per-second funding rateI= Index pricedt= Time elapsed since last Funding settlementQFI= Quote Funding Index (cumulative)
Account Settlement
When your position changes or funding settles, the system calculates your funding payment:- Long positions (
Q > 0) pay whenF > 0 - Short positions (
Q < 0) pay whenF < 0
Dynamic Funding Intervals
GTE can shorten funding intervals during high volatility to respond faster to market conditions. This is called a RESET.RESET Triggers
The system may trigger a RESET when:- Premium divergence exceeds certain thresholds
- Market conditions change rapidly
- Risk management requires faster response
RESET Process
- Close the current interval early
- Re-seed the premium sampling if needed
- Start a new interval with fresh parameters
- Continue QFI accrual (no reset)
Funding Parameters
GTE uses these default parameters:| Parameter | Description | Default | Range |
|---|---|---|---|
N_minutes | Premium TWAP window | 60 minutes | 5-1440 minutes |
T_nominal | Nominal funding interval | 3600 seconds | 1800-86400 seconds |
T_min | Minimum interval after RESET | 300 seconds | 60-3600 seconds |
K | Inner clamp | 50 bps | 10-200 bps |
C | Outer cap | 100 bps | 50-500 bps |
Funding Examples
Example 1: Normal Market
- Index Price: $1000
- Mark Price: $1006 (60 bps premium)
- Premium TWAP: 60 bps
- Interest Rate: 0 bps
- Inner Clamp: 50 bps
- Outer Cap: 100 bps
Example 2: High Premium
- Index Price: $1000
- Mark Price: $1020 (200 bps premium)
- Premium TWAP: 200 bps
- Interest Rate: 0 bps
- Inner Clamp: 50 bps
- Outer Cap: 100 bps