Skip to content

Funding and the fixed charge ​

A long receives realized variance and pays a time-based variance charge. A short has the opposite payment. The contract nets the two legs at each accepted observation. Trading fees and profit from changes in the book mark are separate.

Source: contracts/src/Market.sol, especially _observe, _project, and _sync.

New to the product? Read How variance perpetuals work first.

Formula ​

Use these quantities in ordinary decimal units:

SymbolMeaning
NPositive number of contracts subject to funding
mContract multiplier: 100 USDC
KAnnualized variance mark saved at the prior observation
ΔtElapsed source time in seconds
HHorizon: 604800 seconds, or 7 days
YYear: 31536000 seconds, or 365 days
rLog return of the oracle price P over the interval
cSquared-return cap: 0.0025

The log return of one interval is:

r=ln⁡PnewPprevious

The fixed charge paid by the long is:

fixed charge=NmKΔtH

The realized-variance leg received by the long is:

realized leg=NmYHmin(r2, c)

The net funding payment to the long is:

net payment=Nm(YHmin(r2, c)−KΔtH)

A positive result credits the long and debits the short. A negative result debits the long and credits the short. Both upward and downward price moves contribute positive squared returns. With no price move, only the fixed charge remains.

These formulas explain the arithmetic before integer rounding. Solidity uses 18-decimal fixed-point values and integer divisions at intermediate steps.

Why the mark is a variance forecast ​

Assume that the oracle price has a constant annual volatility σ and no jumps. Then the expected squared log return of one interval is:

E[r2]≈σ2ΔtY

Put this value into the realized leg, without the cap:

E[realized leg]=NmYH⋅σ2ΔtY=Nmσ2ΔtH

This is the fixed charge with K=σ2. Thus the expected net payment is zero when the mark is equal to the annual variance of the price:

E[net payment]=NmΔtH(σ2−K)

A long gains on average when the realized variance is above the mark. A short gains when it is below. A mark of 1.573 is equal to an annual volatility of 1.573≈1.254, or about 125%.

For one interval, the long gains when the move is larger than the break-even return:

|r|>KΔtY

For K=1.573 and Δt=60 seconds, the break-even return is about 0.0017, which is a move of 0.17%.

This calculation is an explanation, not a contract rule. The cap, the jumps of a real price, and missed observations change the result.

Meaning of fixed ​

K stays fixed for the interval being settled. It is not fixed for the life of a position. After the observation, the current book mark becomes the next interval's charge. If no new valid mark can be formed, the stored mark remains in use.

K is variance, not volatility. For example, K = 1.57 is not a 1.57% interest rate or a 157% volatility quote. This charge is also not an exchange trading fee.

Example ​

Assume 41 funded contracts, K = 1.57, and no price move:

Elapsed timeLong pays, USDC
60 seconds0.64
1 hour38.32
1 day919.57

The one-day value is a projection with an unchanged charge and continuous valid observations. The contract does not accept a single one-day funding gap.

For a log return of -0.04 over 60 seconds:

realized leg=41×100×3657×0.0016=342.057143fixed charge=41×100×1.57×60604800=0.638591net payment to long=341.418552 USDC

This example excludes trading fees and changes in mark value. The deployment scripts start MON at a mark of 1.573 and ETH at 0.36, so the charge of a live market differs from this example.

The cap

The realized leg uses min(r2, 0.0025). A log return above 0.05 in one observation receives the payment of 0.05, because 0.0025=0.05. That is a move of about +5.13% or -4.88%, from e0.05−1 and e−0.05−1.

Delayed funding activation ​

The book position and the funding position are separate. A fill changes the book position. At the next accepted observation, the previous funding position receives the interval payment; the current book position then becomes the funding position.

For example:

  1. An account has no position and buys 41 contracts between observations.
  2. The next observation settles the prior zero funding position and activates 41.
  3. The following observation settles funding on 41 contracts, if no later change affects the applicable checkpoint.

A close does not erase the prior funding obligation. The account keeps the funding position and its margin requirement until the next accepted observation. Thus the first shock immediately after a new fill can produce no funding payment for that new position. Establish the funding position before a hedge demonstration.

A new position gets funding from the second observation after the fill

The first observation after the fill only activates the funding position. The Hedging demo starts its test pool at that first observation, so that the LP loss and the hedge funding cover the same observations.

Index and cash ​

Each observation adds a signed per-contract payment to fundingIndex. Accounts store a funding checkpoint. Account reads project the payment without a write; account access stores it in cash and cumulative funding. Observations do not loop over every account.

The contract has no separate settlement clock. The Python reference uses pending cash in some paths. Compare total equity, not just one intermediate cash field.

Missing observations ​

The gap limit of a market is three observation intervals. It is 180 seconds for a 60-second market and 900 seconds for a 300-second market.

A permitted gap up to that limit uses one capped endpoint return and the fixed charge for the actual elapsed time. It does not reconstruct the missing path. A longer gap or a prior oracle halt skips both funding legs and rebases. The mark then stays frozen until the book gives a valid mark again. Recovery can therefore remove a payment that a continuous price path would have produced.

Do not treat a recovered test path as evidence of continuous real-market hedging. See Oracle and observations for the acceptance rules.

Deployed on Monad testnet.