hybrid-perps-spec

Funding Rate Settlement Scenarios

Funding rate settles every 8 hours (UTC 00:00 / 08:00 / 16:00).


SC-FS-001: INTERNAL Position Funding — Long Pays Short

Preconditions:

Calculation:

Funding Payment = 0.1 × 100,000 × 0.0001 = $1.00

Expected Results:


SC-FS-002: HYPERLIQUID Position Funding — Short Receives Funding

Preconditions:

Calculation:

Funding Receipt = 5 × 4,000 × 0.00005 = $1.00 (short receives)

Expected Results:


SC-FS-003: Negative Funding Rate — Short Pays Long

Preconditions:

Calculation:

Long receives = 0.1 × 100,000 × 0.00005 = $0.50

Expected Results:


SC-FS-004: Mid-Period Open — Funding Settlement Behavior

Preconditions:

Expected Results:


SC-FS-005: Funding Reconciliation — Platform vs HL Drift Detection

Preconditions:

Steps:

  1. HL completes funding settlement; platform HL account changes by +$500
  2. Platform mirrors funding for each user’s HYPERLIQUID position using HL’s published rate
  3. Platform mirrored total = $498
  4. Drift detected = $2 (0.4%)

Expected Results: