Status Flow
Step-by-Step Flow
Indicative quote (optional)
The frontend requests a model-based indicative price to display bid/ask spreads before the user commits to a trade.Returns fair value, bid, ask, and spread — no signature required.
User signs EIP-712 RFQ
When the user submits a trade, the frontend constructs an EIP-712 typed data envelope and asks the user’s wallet to sign it. This signature proves intent but does not move any funds.The signed RFQ is submitted to the relay:The relay verifies the signature matches the declared wallet.
Market makers quote
The relay broadcasts the RFQ to all connected market makers via WebSocket and to the internal pricing engine simultaneously.Market makers have a configurable window (default 800ms) to submit quotes. Each quote includes a price, size, and side:
Winner selection
The relay selects the best valid quote:
Validation rules:
| Taker action | Winner |
|---|---|
| Buying options | Lowest price wins |
| Selling options | Highest price wins |
rfq_idmust match the original request- Side must be opposite to the taker’s side (taker buys → maker sells)
- Size must be ≥ 50% of the requested size
- Price must be in
(0, 1)and within no-arbitrage bounds
Execute — MM signs on-chain order
The taker accepts the winning quote by calling the execute endpoint:The relay:
- Resolves the
seriesIdfor the option - Ensures the market maker has sufficient option token inventory (auto-minting via
ConvallaxCore.mint()if needed) - Ensures ERC-1155 and USDC approvals are set for
ConvallaxRFQSettlement - Signs an EIP-712
Orderstruct with the market maker’s private key
Taker calls fill() on-chain
The taker submits the signed order to
ConvallaxRFQSettlement.fill():- Taker buying: USDC transfers from taker to maker, option tokens transfer from maker to taker
- Taker selling: Option tokens transfer from taker to maker, USDC transfers from maker to taker
On-Chain Order (EIP-712)
TheOrder struct signed by the market maker for on-chain settlement:
| Field | Value |
|---|---|
name | ConvallaxRFQSettlement |
version | 1 |
chainId | 80002 (Polygon Amoy) |
verifyingContract | 0xC6Eb814Cc01189e20B2DB2D2a22Ed2DcAC404992 |
Three Signature Domains
Convallax uses three distinct EIP-712 domains for different purposes:| Domain | Purpose | Who signs |
|---|---|---|
Convallax RFQ | Off-chain trade intent | Taker wallet |
ConvallaxRFQSettlement | On-chain fill order | Market maker |
ConvallaxCore | Settlement attestation | Resolution signer |
Premium Calculation
premiumAmount= 0.12 × 10 × 1,000,000 = 1,200,000 raw (1.20 USDC)optionAmount= 10 × 1,000,000 = 10,000,000 raw
