docs / 06
Funding
Funding is how the mark price is tied to the index without an oracle-driven vAMM. When the mark is above the index, longs pay. When it is below, shorts pay.
Schedule
One settlement per 1 hour. Anyone can call settleFunding() once the hour has elapsed. The trade page shows a settle funding key when it is due.
If a settlement is late, it applies once when it is called. Missed hours are not back-filled. If the market is frozen at that moment, the settlement is skipped and the clock does not reset.
Formula
rate = (mark − index) ÷ index ÷ 24
Each settlement applies 1/24 of the gap between mark and index. A gap that persisted would be paid in full over a day.
The rate is added to a cumulative funding index. Each position stores the index at entry. The funding a position owes is:
long: (cumulative now − cumulative at entry) × notional
short: −(cumulative now − cumulative at entry) × notional
A positive number is paid. A negative number is received. Funding settles when the position closes or is liquidated.
Example
Mark 0.00105, index 0.00100. The gap is 5%. The rate is 5% ÷ 24 = 0.2083% for this hour.
- A long with 50 HYPE notional owes 0.104 HYPE.
- A short with 20 HYPE notional receives 0.042 HYPE.
Who pays whom
Longs and shorts pay each other through the funding index. The sides are rarely balanced, so the amounts do not match. The Pit is the counterparty of last resort: it receives what the paying side pays beyond what the receiving side collects, and pays the difference when the receiving side is larger.
This happens without separate transfers. Funding is part of each position's payout, and every payout settles against the Pit.
Every update to markets, parameters and $SCAP is posted on X.
follow updates on x