Skip to Content
VPerpAPI

Funding & Margin

Hourly peer-to-peer funding rate formula, mainnet rate caps, cross/isolated margin rules, and liquidation waterfall.

Funding Cadence
Every 1 Hour
Sampled every 5s (720/hr)
Mainnet Rate Cap
±0.5% / hr
50 bps genesis · 400 bps max
Liquidation Model
4-Stage Waterfall
Book → Backstop → ADL → Final

Hourly Funding Rates

Perpetual markets settle peer-to-peer funding on the hour (interval_ms = 3,600,000), with zero protocol rake. When the rate is positive, longs pay shorts; when negative, shorts pay longs.

Formula & Sampling

  1. Every 5 seconds (720 samples per hour), VCore computes the impact bid/ask prices at impact_notional and derives the instantaneous premium relative to the oracle index price.
  2. At settlement, the time-weighted average premium PP is clamped and scaled:
r8h=P+clamp⁡(base_interest−P, −clamp, +clamp)r_{\text{8h}} = P + \operatorname{clamp}(\text{base\_interest} - P,\ -\text{clamp},\ +\text{clamp}) rhour=clamp⁡ ⁣(multiplier×r8h8, −rate_cap, +rate_cap)r_{\text{hour}} = \operatorname{clamp}\!\left(\text{multiplier} \times \frac{r_{\text{8h}}}{8},\ -\text{rate\_cap},\ +\text{rate\_cap}\right)
  1. Each position settles against its mark-valued notional: Payment=PositionSize×MarkPrice×rhour\text{Payment} = \text{PositionSize} \times \text{MarkPrice} \times r_{\text{hour}}.

Parameters & Governance Bounds

ParameterDefault / Mainnet ValueGovernance Bounds
Settlement Interval (interval_ms)1 hour (3,600,000 ms)1 min – 8 hours
Sampling CadenceEvery 5 seconds (720 samples/hour)Fixed in consensus
Impact Notional (impact_notional)20,000 USDC (BTC/ETH); 6,000 USDC defaultPer-market configurable
Base Interest (base_interest)0.01% / 8h (0.00125% / h)-1% ..= +1% / 8h
Premium Clamp (clamp)±0.05% / 8h0 ..= 1% / 8h
Rate Multiplier (multiplier)1.0×0 ..= 10×
Hourly Rate Cap (rate_cap_bps)Mainnet genesis majors 50 bps (±0.5% / h); protocol default/max 400 bps (±4% / h)<= 400 bps / h
Solvency RoundingPayers round up (ceil); receivers round down (floor)Fixed in consensus
  • Query Endpoints: Use POST /info with predictedFundings (live estimate), fundingHistory (market history, up to 500 rows/call), or userFunding (account settlements, up to 2,000 rows/call).

Cross & Isolated Margin

  • Cross Margin: All cross positions on the same DEX share a unified collateral pool (perp_usdc + unrealized PnL across cross markets).
  • Isolated Margin: Each isolated position holds dedicated margin collateral; losses never spill over into cross equity or other isolated positions.
  • Mode & Leverage Changes (updateLeverage):
    • Switching between cross and isolated requires zero open position, zero resting orders, and zero active triggers in that market.
    • Lowering leverage validates live cross free margin (or isolated position equity) against the new initial margin requirement.
  • Tiered Maintenance Margin: Large positions follow continuous tiered margin tables (POST /info marginTable) so maintenance margin scales smoothly without cliff jumps.

Four-Stage Liquidation Waterfall

When an account's equity falls below its maintenance margin (MM), VCore executes a deterministic four-stage waterfall:

  1. Orderbook Liquidation: Cancels open orders in the distressed domain and submits IOC market-band liquidation orders against the live CLOB.
  2. Backstop Takeover: If equity drops below the backstop threshold (2/3 MM) or orderbook depth is insufficient, the MMV Liquidator (native dex = 0 only) or a third-party DEX backstop absorbs the position and remaining collateral.
  3. Safe-Harbor ADL (Auto-Deleveraging): If backstop equity is exhausted or underwater, profitable opposing positions are deleveraged deterministically in order of leverage-weighted PnL rank.
  4. Domain Final Settlement: As a last resort on an insolvent third-party DEX (dex >= 1), positions settle cleanly within that isolated DEX's collateral pool without affecting native dex = 0 or spot USDC.

On this page