Research baseline
This page is a summary of the research baseline in the root file README.md. It gives the starting mathematics, the proposed perpetual model, and the sampling study that is still necessary.
Research, not a final specification
No sampling study and no mechanism validation are complete. The continuous model below is a research reference. It is not an exact price formula for the capped, discrete contract in this build. For the implemented rules, see Funding and the fixed charge.
Standard variance swap
Let P_i be the reference price at observation time t_i. The log return is:
r_i = ln(P_i / P_(i-1))For an observation period of T years, the annualized realized variance is:
RV = (1 / T) * sum(r_i * r_i)A standard variance swap pays the long:
payment = N * (RV - K)K is the agreed annualized variance strike. N is the USDC payment for each unit of annualized variance. A negative payment means that the long pays the short.
This definition uses squared returns without subtraction of the sample mean. For MON and ETH, use a calendar-year convention of 365 days. Do not copy the 252 trading days that equities use.
A volatility swap pays on the square root of RV. The square root changes the economics. A volatility contract needs its own pricing and its own notional conventions.
Measurement and pricing
Realized variance measures past price variation. It does not give a fair price for future exposure. Contracts calculate and enforce the payoff. Buyers and sellers set prices through orders. A fully on-chain exchange does not need contracts that predict future volatility.
Two contract designs
| Design | Charge and trading mechanism |
|---|---|
| Funding-only exposure | A protocol rule or an external source sets the charge. There is no separate traded mark. |
| Traded variance perpetual | Orders set a variance quote. The position earns mark profit and loss and also periodic variance payments. |
This project uses the traded-perpetual design. No suitable external forward-variance source for MON is known to the project.
Proposed traded variance perpetual
For a constant position across complete observation intervals, the candidate total profit and loss before fees is:
P&L = q * H * (k_b - k_a) + q * sum(r_i * r_i - k_(i-1) * dt_i)| Symbol | Meaning |
|---|---|
q | Exposure in USDC for each unit of accumulated variance |
k_a, k_b | Entry and exit execution quotes in annualized variance units |
k_(i-1) | The validated market mark, fixed for the next funding interval |
H | The price scale in years. It sets the effective funding horizon. |
dt_i | The interval length in years |
The first term is trading profit and loss. The second term is the net variance payment to the long. The short receives the opposite total.
In the contract, one contract has q * H = 100, and H is 7 days. Thus q = 100 * 365 / 7, which is the factor in the funding formula.
What the mark represents
Under a simplified continuous-time model with zero interest and continuous margin settlement, the mark is an exponentially weighted expectation of future variance:
k_t = (1 / H) * E[ integral from t to infinity of exp(-(s - t) / H) * v_s ds ]v_s is the conditional expected rate of variance under the pricing measure. A smaller H gives more weight to near-term variance. The mark is not necessarily the instantaneous variance, and it is not a fixed 30-day average. The selection of H is an economic decision. It is separate from the observation interval.
This is a derivation for the proposed model. It is not a claim of exact replication or of a unique market price.
How this differs from a power perpetual
This product is not the same as Squeeth. A power perpetual has a payoff tied to a power of the underlying price. This contract trades a variance quote and pays a realized-variance stream.
Simulation contract terms
The Python simulation and the contract use a capped, discrete variance perpetual. At a valid observation:
c_i = min(r_i * r_i, c_max)
u_i = (m / H) * (c_i - charge_(i-1) * dt_i)
payment = funding position * u_i| Term | Test value |
|---|---|
Multiplier m | 100 |
Price scale H | 7 days |
Cap c_max | 0.0025, a log return of 0.05, about +5.13% or -4.88% |
| Initial and maintenance funding buffers | 3 and 1 observations |
| Mark depth | 2 contracts for each side, two or more owners, spread at most 20% of the midpoint |
A cap, a delayed funding activation, and a missing observation all change the exposure. This is not an uncapped variance hedge.
All values are experiment inputs. They are not approved launch parameters.
Why the sampling frequency matters
A simple model for an observed log price is the true log price plus observation noise. With independent noise of variance n2, the expected sum of squared observed returns is the true sum plus 2 * n * n2 for n observations. Thus, for a fixed period, the noise contribution grows with the number of observations.
High-frequency data are not unsuitable in principle. Estimators that account for noise can use them. Slow sampling also misses movements inside intervals.
There is no universal correct sampling interval for MON and ETH. After selection, the estimator and the schedule define the traded payoff.
| Operation | Basis for its frequency |
|---|---|
| Trading and order cancellation | User demand and execution capacity |
| Reference-price updates | Source availability and quality |
| Variance observations | Statistical accuracy and manipulation resistance |
| Funding and cash settlement | Contract economics and operating costs |
| Margin checks | Position risk and reliable valuation data |
Block speed must not select the sampling interval. Sampling at each block is not, by itself, a product advantage.
Sampling research plan
Run the study separately for MON and ETH.
- Collect timestamped oracle observations and independent exchange quotes across calm and stressed periods. Record update gaps, spreads, and source quality.
- Compare intervals of 1, 5, 15, 30, 60, and 300 seconds where the source data permit. Do not make finer observations through interpolation.
- Make volatility signature plots: estimated variance against the sampling interval.
- Compare simple squared returns, subsampling, and noise-aware estimates. Do this again with shifted observation times.
- Measure payment differences, source disagreement, oracle costs, manipulation costs, and recovery after missing data.
- Reserve data for validation. Select the source, the estimator, and the interval from the evidence, then test them on the reserved data.
The data acquisition for this study is not complete. The repository has no historical estimates and no replay results.
Open economic issues
The economic review in simulation/MODEL_REVIEW.md lists four open launch issues:
- Omitted observations can change payments.
- Source publication and receipt have different cut-off times.
- A closed book position keeps a funding claim with a separate value.
- Liquidation can take longer than the maintenance buffer.
The simulation has an observation gate for the second issue, and matching continues during a mark freeze. The other three issues stay open. The mark still cannot recover after a large jump in the simulation.
Research files
| File | Content |
|---|---|
README.md | The full research baseline with all formulas |
simulation/exchange_simulation.ipynb | Order-book simulation with makers, takers, funding, margin, and an LP hedge |
simulation/variance_perp.ipynb | Introduction to oracle updates and sampling experiments |
simulation/historical_sampling.ipynb | Historical sampling and replay. Its saved output has no historical estimates. |
simulation/MODEL_REVIEW.md | Economic model review |
simulation/demo_lp_hedge.py | The Python LP hedge scenario |
Run the Python demo with:
uv run --project simulation python simulation/demo_lp_hedge.py