Skip to main content
Config stores all tunable protocol parameters. The owner can adjust margin factors, fee rates, tenor durations, and other settings without redeploying contracts. Certain parameter changes (tenor durations, fixing times, margin mode) require all positions to be closed first.

Contract Relationships

Read Functions

Margin Parameters

Pricing Parameters

Tenor Registry

Tenors are tracked as a dynamic registry of uint32 durations in seconds. There is no fixed enum — new maturities can be added post-deploy without contract upgrades.

Other Parameters

Admin Functions

All admin functions are restricted to the contract owner.

setMarginConfig

Updates margin factors and fee rates. Applied to all future positions (existing positions use snapshotted values). Validation:

setPricingConfig

Updates pricing spread parameters. Validation: baseSpreadBps <= 1000 (max 10%)

registerTenor

Adds a new tenor duration (in seconds) to the enabled set. Idempotent — re-registering an already-enabled tenor is a no-op (no event emitted). Validation: tenorSeconds > 0 or reverts InvalidParameter

disableTenor

Removes a tenor duration from the enabled set. New positions cannot be opened on disabled tenors; existing positions on those tenors remain valid until matured.

setPairFixingTime

Sets the daily fixing time for a currency pair. Validation:

setMarginMode

Switches between ISOLATED and CROSS margin modes. Requires all positions to be closed.

setPositionManager

One-shot wiring of the PositionManager address. Reverts if already set or if pm is not a contract address.

setMinPositionNotional

Sets the minimum position notional in collateral decimals (6 for USDC).

setOracleFee

Sets the oracle fee per price read in collateral decimals.

setOracleFeeReceiver

Sets the oracle fee recipient address.

setFeeDestinations

Sets fee distribution destinations. Shares must sum to exactly 10,000 bps (100%). Validation:

Events

Parameter Reference

Complete parameter listing with defaults.

Types Reference

MarginConfig, PricingConfig, MarginMode, FeeDestination struct definitions.

Fees

Fee calculation formulas and distribution.