Documentation

Funding

Funding is a continuous payment tied to the imbalance between longs and shorts. It charges whichever side is crowded, scales with how full and how skewed the market is, and settles into your PnL when you close — nudging the book back toward balance the whole time you hold.

What funding is

Every market carries some long open interest (OI) and some short OI. When the two are unequal the book is skewed, and Levant charges funding to correct it. Funding is directed against the crowded side and in favour of the underweight side: whichever side has the larger OI pays, for as long as it stays crowded. That makes the popular side progressively more expensive to hold and steadily pulls long and short OI back toward balance.

Funding on Levant is continuous. There are no discrete hourly or 8-hour windows — the rate is measured per second and accrues smoothly the entire time your position is open, at whatever the current rate happens to be. It is never charged tick by tick; it is settled once, into your PnL, when you close.

Note
The crowded side always pays; which side that is can flip as OI shifts. When longs and shorts are perfectly balanced the imbalance is zero, so the rate is exactly zero and nobody pays.

Which side pays

Whether you pay depends only on which side is crowded, not on whether you personally are long or short. The engine treats longs as the paying side whenever long OI is at least short OI, and shorts whenever short OI is larger — but at exact balance the imbalance is zero, so the amount is zero either way. If you are on the crowded side you carry a funding cost; if you are on the underweight side you carry none.

Market stateIf you are longIf you are short
Longs crowded (long OI > short OI)Pays fundingPays nothing
Shorts crowded (short OI > long OI)Pays nothingPays funding
Balanced (long OI = short OI)No funding (rate = 0)No funding (rate = 0)

One important detail about the current engine: funding is a one-directional cost. The crowded side pays; the underweight side simply pays nothing. There is no separate rebate credited to underweight positions — their advantage is the cost they avoid, not a payment they collect. In the accounting, funding is always a non-negative amount subtracted from a position's PnL at close, and never added to it.

How the rate is set

The per-hour funding rate is the product of three things: a base rate, market utilization, and market skew. Utilization and skew are both fractions between 0 and 1, so they only ever scale the base rate down. A final hard cap bounds the result no matter how the parameters are configured.

rate/hr = base × utilization × skew        (then clamped to the rate cap)

utilization = (longOI + shortOI) / oiCap          clamped to 1
skew        = |longOI − shortOI| / (longOI + shortOI)      0 … 1

base ≈ 0.01%/hr   ·   oiCap = 2,000,000 USDG   ·   cap ≈ 0.1%/hr
FactorWhat it isValue / range
Base rateReference rate, reached only when the book is fully one-sided and OI is at the cap≈ 0.01% / hr
UtilizationTotal open interest (long + short) divided by the OI cap, clamped to 10 – 1
SkewThe OI imbalance |long − short| as a fraction of total OI0 – 1
Rate capHard ceiling applied last, bounding the worst-case rate≈ 0.1% / hr
OI capThe utilization denominator, set per market2,000,000 USDG

Because utilization and skew are each at most 1, the base rate of about 0.01%/hr is effectively the ceiling the formula reaches — hit only in the extreme case of a fully one-sided book with OI at the cap. In normal conditions the rate is a fraction of that. The separate cap of about 0.1%/hr is a defensive safety ceiling: it bounds the rate regardless of how the base is configured, and with today's parameters it is never actually reached. All 20 Levant markets share this identical funding configuration.

How your funding is calculated

Each market keeps two running accumulators — one for longs, one for shorts — that ratchet up over time. On every interaction, the engine advances only the crowded side's accumulator by rate × elapsed seconds at the current OI. When you open a position, Levant snapshots your side's accumulator as your funding basis. Your accrued funding is your notional multiplied by how far your side's accumulator has moved since you opened.

funding = notional × (accumulator_now − accumulator_at_open)
notional = net margin × leverage        (net margin = collateral − open fee)

Example — $1,000 margin at 10x  →  $10,000 notional
  Worst case (utilization = 1, skew = 1, rate = 0.01%/hr):
      $10,000 × 0.0001   =  $1.00 / hr   (0.10% of margin / hr)
  Typical (utilization = 0.5, skew = 0.4, rate = 0.002%/hr):
      $10,000 × 0.00002  =  $0.20 / hr

Because only the crowded side's accumulator advances, you accrue funding only for the stretches of time your side was actually crowded. If your side is never the crowded one, its accumulator does not move, the difference is zero, and you pay nothing. Note that funding scales with notional, not margin, so leverage multiplies it directly: a 100x position accrues funding on 100 times its collateral.

When funding settles

Funding accrues continuously but is only realized when the position exits — a full close, a take-profit or stop-loss trigger, a partial close, or a liquidation all settle it. At close it is subtracted from your PnL alongside the close fee. It is applied after the 900%-of-margin max-profit cap, so a capped winner still pays its funding. While the position is open, accrued funding is also counted in your equity, which means it eats into your maintenance-margin buffer (10% of collateral) and pulls your real liquidation price toward entry the longer you hold on the crowded side.

On a partial close, funding settles proportionally on the slice you close. The remaining position keeps its original entry price and funding basis, so it keeps accruing funding on its reduced notional — still measured from when you first opened.

Warning
Funding is always a cost to the side that pays it, never a credit — it erodes profits and deepens losses the longer you sit on the crowded side. Since it is charged on notional, a high-leverage position feels it far more than the small hourly rate suggests. On any trade you plan to hold for days on the popular side, funding can outweigh the one-time open and close fees; price it in before you open.

Funding vs. the skew spread

Levant uses two distinct tools to keep the book balanced, and they work on different timescales. The skew spread is a one-time premium baked into your fill price at entry and exit: it makes it more expensive, right now, to add to the crowded side. Its skew term scales the OI imbalance by the OI cap (with a 100 bps coefficient at a fully skewed book). Funding is the ongoing counterpart: a carrying cost that charges the crowded side continuously for as long as it stays crowded, with a skew term that scales the imbalance by total OI. The spread discourages piling onto the crowded side in the first place; funding discourages staying piled on.

What it means for you

  • You are charged funding only while your side is the crowded one. Move to the underweight side, or wait for OI to rebalance, and your funding cost stops.
  • Being underweight is funding-free — you carry no funding while you help balance the book. There is no separate rebate paid to you; the benefit is the cost you avoid.
  • Funding is charged on notional, not margin, so leverage multiplies it: a 100x position accrues on 100× its collateral.
  • The rate rises as a market gets more skewed or more utilized and falls back as OI rebalances, and it can never exceed the rate cap.
  • Accrued funding is part of your live equity, so on the crowded side it moves your liquidation price closer to entry even when price is flat.

Levant runs on Robinhood Chain mainnet and is unaudited. Funding parameters are configured per market on the deployer key and can change, and testnet balances have no monetary value. Nothing here is investment advice; leverage can lose your entire margin.