ConvallaxRFQSettlement contract. The taker calls this function with the signed Order and makerSignature received from POST /quote-requests/:id/commit.
fill() is atomic mint-on-fill: it calls ConvallaxCore.mintFor(...) to pull collateral from the writer, mint fresh option tokens to the holder, and move the premium — all or nothing. Option tokens are minted on demand; there is no pre-minted inventory and no token transfer between parties.
Contract: ConvallaxRFQSettlement — 0x3E583BC44157c91F8c534372A3e91c371841107A
Function Signature
Parameters
Order
required
The EIP-712
Order struct signed by the market maker.bytes
required
EIP-712 signature from the maker over the
Order struct.Behavior
Internally,fill() calls ConvallaxCore.mintFor(seriesId, optionAmount, writer, holder), which pulls collateral from the writer, mints fresh option tokens to the holder, and records the writer for writer claims at settlement. The settlement contract moves the premium separately.
The fill is atomic — collateral, premium, and minting all execute in a single transaction or the entire call reverts. Collateral is locked only when the trade executes. The nonce is consumed to prevent replay.
Prerequisites
Settlement requires two USDC approvals — there are no ERC-1155 /setApprovalForAll approvals. Each party approves only the contract relevant to its role:
- Collateral approval — The party posting collateral (the writer) must
usdc.approve(coreAddress, collateral)soConvallaxCorecan pull it. - Premium approval — The party paying premium must
usdc.approve(settlementAddress, premium)soConvallaxRFQSettlementcan pull it. - Sufficient balances — Both parties must hold enough USDC for their respective obligations.
makerSelling = true): the maker approves Core (collateral) and the taker approves Settlement (premium). For a short fill (makerSelling = false): the taker approves Core (collateral) and the maker approves Settlement (premium).
The collateral amount equals the writer’s maximum loss:
Example
Nonce Cancellation
Makers can pre-emptively cancel a nonce to prevent a pending order from being filled:NonceAlreadyUsed if someone tries to fill it.
