Skip to main content
All protocol parameters are stored onchain in the Config, RiskManager, OracleModule, and ModeController contracts. Default values match the M2 Sepolia deployment. See the tech spec Section 2 for derivation rationale.

Margin Parameters

Onchain: stored in Config’s MarginConfig struct. Setter: Config.setMarginConfig().
ParameterKeyDefaultRangeUnitRole
Initial Margin FactorimFactorBps200 (2%)1 — 10,000bpsowner
Maintenance Margin FactormmFactorBps100 (1%)1 — 10,000bpsowner
Trading FeetradingFeeBps5 (0.05%)0 — 10,000bpsowner
Liquidation PenaltyliquidationPenaltyBps30 (0.3%)0 — 10,000bpsowner
Constraint: imFactorBps must be strictly greater than mmFactorBps. This guarantees a liquidation buffer between the margin posted at open and the threshold that triggers liquidation. Existing positions use snapshotted values from the time of opening. Parameter changes apply only to future positions.

Pricing Parameters

Onchain: stored in Config’s PricingConfig struct. Setter: Config.setPricingConfig().
ParameterKeyDefaultRangeUnitRole
Base SpreadbaseSpreadBps5 (0.05%)0 — 1,000bpsowner
Premium/Discount AdjustmentpremiumDiscountAdjBps5 (0.05%)0 — 10,000bpsowner
The base spread applies to all forward prices. The premium/discount adjustment shifts the spread based on pool net exposure direction. See Oracle Pricing for the forward price formula.

Position Parameters

Onchain: stored in Config. Setter: Config.setMinPositionNotional().
ParameterKeyDefaultRangeUnitRole
Minimum Position NotionalminPositionNotional100,000,000 (100 USDC)1 — 1,000,000,000,000USDC raw (6 decimals)owner

Tenor Parameters

Onchain: stored in Config’s TimeConfig struct. Setter: Config.setTimeConfig().
ParameterKeyDefaultRangeUnitRoleRestrictions
1-Day DurationtenorSecondsOneDay86,400 (24h)1 — 31,536,000secondsownerNo open positions
1-Week DurationtenorSecondsOneWeek604,800 (7d)1 — 31,536,000secondsownerNo open positions
1-Month DurationtenorSecondsOneMonth2,592,000 (30d)1 — 31,536,000secondsownerNo open positions
Test DurationtenorSecondsTest60 (1min)1 — 31,536,000secondsownerNo open positions
Tenor duration changes require all positions to be closed (openPositionCount == 0), because changing a tenor’s duration would invalidate the fixing timestamps of existing positions. Individual tenors are enabled/disabled via Config.setTenorEnabled().

Oracle Parameters

Onchain: stored across Config and OracleModule.
ParameterKeyDefaultRangeUnitRole
Oracle FeeoracleFee100,000 (0.10 USDC)0 — 10,000,000USDC rawowner
Max Spot Oracle AgemaxOracleAge301 — 3,600secondsowner
Max Forward Price AgemaxForwardAge601 — 3,600secondsoracle_admin
Spot Fixing WindowspotFixingWindowSeconds1201 — 3,600secondsowner
The oracle fee is a flat per-read charge deducted from trader collateral. Max age thresholds cause OracleStale reverts when exceeded.

Oracle Safeguard Parameters

Onchain: stored in OracleModule. Setter: OracleModule.setOracleSafeguardConfig().
ParameterKeyDefaultRangeUnitRole
Min Forward Update SpacingminForwardUpdateSpacing100 — 3,600secondsoracle_admin
Max Oracle Move Per UpdatemaxOracleMovePerUpdateBps200 (2%)1 — 10,000bpsoracle_admin
Max Deviation vs PriormaxDeviationVsPriorBps50 (0.5%)1 — 10,000bpsoracle_admin
Max Deviation vs Last ClosemaxDeviationVsLastCloseBps150 (1.5%)1 — 10,000bpsoracle_admin
These safeguards reject publisher updates that are too frequent, too large, or deviate too far from reference prices. See Oracle Safeguards for detailed mechanics.

Risk Parameters

Onchain: stored in RiskManager’s RiskConfig struct. Setter: RiskManager.setConfig().
ParameterKeyDefaultRangeUnitRole
Net Exposure Cap FactornetExposureCapFactorBps10,000 (100%)1 — 10,000bpsrisk_admin
Stress MovestressMoveBps200 (2%)1 — 10,000bpsrisk_admin
Per-Position Cap FactorperPositionCapFactorBps500 (5%)1 — 10,000bpsrisk_admin
Per-Account Cap FactorperAccountCapFactorBps500 (5%)1 — 10,000bpsrisk_admin
Max Gross Notional Delta/WindowmaxGrossNotionalDeltaPerWindow0 (disabled)0 — 1e15USDC rawrisk_admin
Max Net Exposure Delta/WindowmaxNetExposureDeltaPerWindow0 (disabled)0 — 1e15USDC rawrisk_admin
Rate Window DurationrateWindowSeconds3,600 (1h)1 — 86,400secondsrisk_admin
With defaults, maxNetExposure = poolEquity * 10000 / 200 = poolEquity * 50. A pool with 1M USDC equity allows 50M net exposure. Per-position and per-account caps are 5% of that (2.5M each). Rate-of-change limits are disabled by default (value = 0). When enabled, they throttle how quickly gross notional or net exposure can change within the rolling window. See Pool Exposure Caps for formulas.

Pool Parameters

Onchain: stored in PoolVault and Config.
ParameterKeyDefaultRangeUnitRole
Max Notional UtilizationmaxUtilizationBps8,000 (80%)0 — 10,000bpsowner
Treasury Fee SharetreasuryShareBps3,000 (30%)0 — 10,000bpsowner
Utilization cap restricts LP withdrawals when grossNotional / totalAssets would exceed the cap. Setting to 0 disables the check. See Pool Utilization for details. Treasury share determines the fee split: 30% to treasury, 70% to the pool. The split is configured via Config.setFeeDestinations() using FeeDestination structs whose shareBps values must sum to exactly 10,000.

Fixing Parameters

Onchain: stored in Config per pair. Setter: Config.setPairFixingTime().
ParameterKeyDefaultRangeUnitRoleRestrictions
Fixing Hour (UTC)fixingHourUtc16 (4 PM)0 — 23hourownerNo open positions for pair
Fixing Minute (UTC)fixingMinuteUtc00 — 59minuteownerNo open positions for pair
Fixing Second (UTC)fixingSecondUtc00 — 59secondownerNo open positions for pair
The fixing time determines when settlement prices are recorded. EUR/USD defaults to 16:00 UTC, aligned with the ECB reference rate publication time.

Mode Parameters

Onchain: stored in ModeController’s DegradedConfig struct. Setter: ModeController.setDegradedConfig().
ParameterKeyDefaultRangeUnitRole
Degraded ThresholddegradedThresholdBps500 (5%)1 — 10,000bpsadmin
Degraded DurationdegradedDurationSeconds3,600 (1h)1 — 86,400secondsadmin
When oracle deviation exceeds the degraded threshold, the protocol enters DEGRADED mode (new positions blocked). If the oracle does not recover within the degraded duration, the protocol auto-escalates to PAUSED. See Mode Escalation for the full state machine.

Roles Summary

RoleParameters Controlled
ownerMargin, pricing, tenors, position minimums, oracle fee, pool utilization, fee destinations, fixing times
oracle_adminForward age, update spacing, move limits, deviation limits
risk_adminExposure caps, position/account caps, rate-of-change limits
adminDegraded mode thresholds and duration

Config Contract

Config contract API reference.

Risk Manager

Risk cap validation logic.

Margin Model

IM/MM factor mechanics and liquidation thresholds.