RFQ Lifecycle
High-Level Timeline
┌─────────────────┬─────────────────┬─────────────────┐
│ OFFER PERIOD │ REVEAL PERIOD │ SETTLEMENT │
│ │ │ │
│ MMs submit │ MMs reveal │ Option created │
│ encrypted │ actual offer │ or transferred │
│ offers │ amounts │ │
└─────────────────┴─────────────────┴─────────────────┘
offerEndTimestamp + REVEAL_WINDOWUser Flow Diagram
┌─────────────────────────────────────────────────────────────────┐
│ 1. USER CREATES RFQ │
│ - Select: underlying, strike(s), expiry, type │
│ - Choose direction: BUY (long) or SELL (short) │
│ - Set offer deadline (e.g., 60 minutes) │
│ - Optionally set reserve price (max/min acceptable) │
│ - Generate ECDH keypair for encrypted offers │
│ │
│ For BUY: Deposit reserve price (max you'll pay) │
│ For SELL: Approve collateral tokens │
└────────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 2. MARKET MAKERS RESPOND (during offer period) │
│ - MM sees RFQ event on-chain │
│ - MM calculates price from exchange data │
│ - MM creates EIP-712 signed offer │
│ - MM encrypts offer with ECDH (only requester can decrypt) │
│ - MM submits signature on-chain (amount NOT revealed) │
└────────────────────────┬────────────────────────────────────────┘
│
┌──────────────┴──────────────┐
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────────────────────┐
│ EARLY SETTLEMENT │ │ 3. REVEAL PHASE │
│ (Optional) │ │ - After offer period ends │
│ │ │ - MMs reveal actual amounts │
│ User decrypts offer │ │ - Best offer wins │
│ and calls │ │ - Losers get refunds │
│ settleQuotationEarly│ │ │
└─────────┬───────────┘ └─────────────────┬───────────────────┘
│ │
└──────────────┬───────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 4. SETTLEMENT │
│ │
│ For NEW options: │
│ - Clone option implementation (EIP-1167 proxy) │
│ - Set buyer and seller addresses │
│ - Transfer collateral to option contract │
│ - Transfer premium to seller (minus fees) │
│ │
│ For EXISTING options: │
│ - Transfer position ownership │
│ - Handle collateral/premium exchange │
│ │
│ Fees: 0.06% of notional, capped at 12.5% of premium │
└────────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ 5. OPTION EXPIRY │
│ │
│ - Oracle provides settlement price │
│ - Option contract calculates payout │
│ - If ITM: Buyer receives payout from collateral │
│ - If OTM: Seller gets full collateral back │
└─────────────────────────────────────────────────────────────────┘Phase 1: User Creates RFQ
What You Provide
Parameter
Description
Example
Example: Create a Vanilla PUT RFQ
Critical: collateralAmount is ALWAYS 0
For BUY Positions (isLong: true)
For SELL Positions (isLong: false)
Phase 2: Market Makers Respond
How MMs Process an RFQ
Offer Calculation
What Is Stored On-Chain
MM-Side SDK Calls
Phase 3: Reveal Phase
Settlement Paths: Early vs Normal
Early Settlement
Normal Settlement
Why Is Normal Settlement Permissionless?
Settlement Paths Comparison
Early Settlement
Normal Settlement
Phase 4: Settlement — New Option Creation
Existing Option Transfer
Fee Structure
Collateral Handling
Key Principle: SELLER Always Provides Collateral
RFQ Type
Who Is Seller
Who Provides Collateral
Where Collateral Lives
Collateral Lifecycle
Stage
Action
Where Funds Are
Payout Distribution at Expiry
Scenario
Buyer Receives
Seller Receives
Fund Flow Diagram
Collateral Amount by Option Type
Option Type
Collateral Formula
Example
Sealed-Bid Auction Mechanism
Why Sealed Bids?
ECDH Encryption Flow
Sequence of Events
Summary Table
Step
Actor
Action
Result
Timing Constraints
Action
When
See Also
Last updated

