Math reference
Every formula used across the protocol docs, collected in one place.
Call payoff
payout per option = (S − K) / S [underlying tokens]
S = settlement or exercise price, K = strike.
Always strictly less than 1 token at any finite S, which is
why locking exactly 1 token per option always covers the position.
Worked: S = 200, K = 160 → (200 − 160) / 200 = 0.2 tokens per option.
Put payoff
payout per option = min(K, max(0, K − S)) [quote currency]
K = strike value in quote currency, S =
settlement or exercise price scaled to quote decimals. Capped at exactly
K even if S falls to zero — the reason locking
K per option always covers the position.
Conservation invariant
totalSupply(series) == sold − redeemed − exercised − boughtToClose
Must hold for every series, at every step, under any sequence of the four operations.
Assignment index
writer's assigned amount =
writer's total written × (currentIndex − writer's lastCheckedIndex)
currentIndex increases by the per-option payoff amount every
time an exercise occurs against the series. Each writer's share is
proportional to how much of the series they wrote, computed without
iterating over other writers.
Settlement price selection
settlement round = the earliest oracle round R such that:
R.updatedAt >= expiry, AND
(round before R).updatedAt < expiry
Deterministic regardless of who calls settlement or when.
Rounding conventions
Payout calculations: floor (round down) Collateral deduction calculations: ceil (round up)
This pairing always favors the protocol's solvency over precision — any resulting dust remains locked in the contract rather than being a shortfall anyone has to absorb.
Protocol fees
premium fee = premiumPaid × PREMIUM_FEE_BPS / 10000 [to treasury] writer receives = premiumPaid − premium fee settlement fee = payout × SETTLEMENT_FEE_BPS / 10000 [to treasury] holder receives = payout − settlement fee
payout is the full formula result from the call/put payoff
above — computed and released from the writer's collateral unchanged. The
fee only splits where that already-departing amount goes; it never changes
how much leaves the writer's position.