Diffusal

Options Creation

How option series are created and validated in the Diffusal protocol

This document explains how option series are created and managed by admin wallets in the Diffusal protocol.


Design Principles

The options creation system follows these core principles:

PrincipleDescription
Admin-Controlled CreationSeries are created by admin wallets using canonical strikes from the strike ladder
Deterministic IDsSeries ID is a hash of (pairId, strike, expiry, isCall)
Minimum ExpirySeries must expire at least 1 hour in the future
Permissionless TradingAnyone can trade once a series exists

Series Identification

Each option series is uniquely identified by a deterministic hash:

seriesId=keccak256(pairId,strike,expiry,isCall)\text{seriesId} = \text{keccak256}(\text{pairId}, \text{strike}, \text{expiry}, \text{isCall})
ComponentDescription
pairIdTrading pair identifier (e.g., ETH-USDT)
strikeStrike price in WAD (1e18 = $1.00)
expiryUnix timestamp of expiration
isCalltrue for call, false for put

Series Lifecycle

1. Creation (Admin-Controlled)

Series are created by admin wallets via createSeries(). Only canonical strikes from the strike ladder algorithm are registered. Operator contracts (OrderBook, RFQ) use getSeries() to look up existing series during trades. For the full details on how expiry surfaces and strike ladders are generated, see Series Creation.

Typical flows:

  • Series registration: Admin wallets create series with canonical strikes ahead of trading demand, or in response to market conditions.
  • RFQ flow: Position creation happens when filling an RFQ against an existing series. The market maker signs a quote, and upon fill, the system creates a short for the market maker (with +premiumBalance) and a long for the buyer (with -premiumBalance).
  • Limit order flow: Active market makers can place limit orders on the order book for existing series.

2. Trading Phase

During the trading phase (block.timestamp < expiry):

  • Orders can be placed and filled
  • Positions can be opened and closed
  • Mark price uses Black-Scholes for margin calculations
  • premiumBalance updated for both parties (no premium transfer at trade time)

Validation Rules

Series Creation Validation

When an admin creates a new series via createSeries(), the following validations occur:

ValidationRule
ID Matchkeccak256(pairId, strike, expiry, isCall) == seriesId
Valid PairpairId must be registered in the Oracle
Minimum Expiryexpiry >= block.timestamp + 1 hour
Positive Strikestrike > 0

Trade Validation

Before any trade executes:

ValidationRule
Series ExistsSeries must be registered
Not Expiredblock.timestamp < expiry
Not SettledSeries must not be marked as settled

Integration with Order Book

Order Structure

Orders reference series by their deterministic ID. An order contains the maker address, seriesId, isBuy flag, price, size, nonce, and order expiry (not option expiry).

When filling an order for a new series, the taker also provides series parameters: pairId, strike, optionExpiry, and isCall.

Fill Order Flow

When filling an order:

  1. Look Up Series - SeriesRegistry validates the series exists and is tradeable via getSeries()
  2. Check Trading Allowed - Verify series is not expired and not settled
  3. Execute Fill - Normal order book fill logic proceeds

Security Considerations

Parameter Validation

  • All series parameters are validated on first interaction
  • Invalid parameters cause transaction revert
  • Hash verification ensures parameters match seriesId

Minimum Expiry Enforcement

The 1-hour minimum expiry requirement ensures:

  • Sufficient time for TWAP price accumulation before settlement
  • Protection against last-minute series creation attacks
  • Adequate trading window for price discovery

Summary

AspectDescription
CreationAdmin-only via createSeries() with canonical strikes
ValidationAutomatic parameter validation on creation
ID GenerationDeterministic hash of (pairId, strike, expiry, isCall)
Minimum ExpiryAt least 1 hour from creation time
TradingPermissionless once a series exists

Protocol Documentation

Contract Documentation

On this page