Zero-Sum Pool Model
The ERC-4626 vault is the sole counterparty to every trade. There is no order book, no peer matching, and no AMM curve. When a trader opens a position, the pool takes the opposite side. When a trader profits, the pool pays. When a trader loses, the pool collects. Why this design:- Instant execution — any trader can open a position at any time as long as pool capacity and risk limits allow. No waiting for a matching counterparty.
- Simplified liquidity — LPs deposit USDC into a single vault and passively provide liquidity to all positions. No active market-making required.
- Deterministic pricing — entry prices come from the oracle (with risk adjustments), not from bid/ask negotiation. Every trader opening the same tenor at the same moment gets the same price.
- LPs bear directional risk. If most traders are long and the market moves in their favor, the pool loses. This is the fundamental risk that LPs accept in exchange for fee income.
- The pool can become capacity-constrained. Exposure caps and utilization limits prevent the pool from taking on more risk than it can absorb.
Isolated Margin
Each position has independent collateral. A trader can hold multiple positions simultaneously, and each one has its own locked margin, entry price, and maturity. Liquidation of one position does not affect others held by the same account. How it works:- When a position is opened, the required initial margin is locked from the trader’s MarginAccounts balance
- Unrealized PnL is computed per-position against the position’s own entry price
- If a position’s equity falls below maintenance margin, only that position is liquidated
- Maximum loss per position is capped at locked margin — any loss beyond that is bad debt absorbed by the pool
| Aspect | Isolated Margin | Cross Margin |
|---|---|---|
| Liquidation scope | Single position | Entire portfolio |
| Risk calculation | Per-position | Portfolio-level with correlations |
| Bad debt risk | Bounded per position | Can cascade across positions |
| Implementation | Straightforward | Requires portfolio margining engine |
| Capital efficiency | Lower | Higher |
Immutable Contracts
All contracts are deployed as immutable bytecode — no proxy patterns, no upgradeability, nodelegatecall-based logic swaps. The code that executes today is the code that was deployed.
What’s fixed (logic):
- Position lifecycle state machine (open, increase, reduce, close, settle, liquidate)
- PnL calculation formulas
- Fee computation logic
- Settlement and liquidation execution paths
- Oracle validation checks
- Margin accounting
- Fee rates (opening, closing, liquidation, termination)
- Margin requirements (initial, maintenance)
- Risk caps (exposure, utilization, position/account limits)
- Oracle thresholds (staleness, deviation, move limits)
- Pricing adjustments (spread, premium/discount)
Permissionless Settlement
Anyone can settle matured positions or liquidate underwater ones. The SettlementEngine imposes no restrictions on the caller — the smart contracts validate all preconditions (maturity reached, fixing price recorded, equity below maintenance margin) regardless of who submits the transaction. In practice:- The keeper service automates settlement and liquidation, monitoring onchain state and submitting transactions when conditions are met
- In M2, the keeper is operated by the protocol team — there is no decentralized keeper network or incentive mechanism yet
- If the keeper goes down, anyone can call the same functions directly. Protocol correctness does not depend on keeper liveness for safety, only for timeliness
Oracle-Driven Pricing
Prices are not discovered through trading activity. Instead, the protocol relies on two external price sources:- Spot prices from the Pyth Network — the current EUR/USD exchange rate, aggregated from institutional publishers
- Forward prices computed off-chain by the authorized publisher using interest rate parity and submitted onchain via the OracleModule
PUBLISHER_ROLE onchain and can only publish price rounds, not modify any other protocol state.
Single Collateral
USDC is the sole collateral and settlement currency. All PnL, fees, and margin are denominated in USDC. The pool holds only USDC — no multi-asset complexity. Why USDC-only:- Eliminates cross-collateral pricing risk (no need to value collateral against position denomination)
- Simplifies accounting — one unit of account throughout the system
- Matches the non-deliverable nature of the product (cash settlement in a stable unit)
- Reduces smart contract surface area (no collateral swaps, no liquidation auctions, no haircut calculations)
How It Differs from Alternatives
| Order Book Exchange | AMM-based Perps | Open Nile Protocol | |
|---|---|---|---|
| Counterparty | Another trader | LP pool via AMM curve | Shared USDC vault (ERC-4626) |
| Liquidity source | Market makers posting quotes | LPs providing to AMM pools | Passive USDC deposits into vault |
| Price discovery | Bid/ask spread from orders | Funding rate + AMM curve | Oracle-driven forward pricing |
| LP role | Active market making | Provide to AMM curve, earn fees, bear IL | Passive deposit, earn fees, bear directional risk |
| Product type | Spot, futures, options | Perpetual contracts (no expiry) | Fixed-maturity forwards (1D, 1W, 1M) |
| Settlement | Continuous or expiry-based | Continuous (funding payments) | Fixed maturity at 4 PM UTC fixing price |
| Margin model | Cross or portfolio margin | Cross margin typical | Isolated margin (cross in M3) |
| Pricing mechanism | Order flow | Funding rate arbitrage | Interest rate parity |
Next Steps
Oracle & Forward Pricing
How spot and forward prices are sourced and validated.
Position Lifecycle
The full journey of a forward position from open to settlement.
Margin Model
How isolated margin and leverage work in practice.