OpenPerps

Docs  /  How it actually works

Architecture overview

Nine components, with deliberately narrow responsibilities. The boundaries matter more than the internals: they are what stops settlement cash and user margin ever touching.

Components

ComponentResponsibility
Market RegistryUnique market identity, token source references, committed risk policy, activation and lifecycle
Price Oracle RouterPool discovery, observation aggregation, deviation checks, quoted-asset conversion, pause and settlement snapshots
Risk EngineDirectional OI, account margin, leverage tiers, payout caps, stress and oracle-cost constraints
Position EngineSynthetic long/short entries, exits and liquidations; explicit fee and haircut computation
Collateral LedgerDeposits and withdrawals, open-margin isolation, no phantom balances
Global SettlementSettlement cash, side bucket, FIFO debt queue, harvest and the revenue waterfall
Rewards ControllerDeferred, capped settled-loss rewards, kept separate from settlement cash
SDK + AppOpenLaunch embed, standalone market pages, mobile-first wallet flow
Indexer & DashboardPublic solvency, claims, market states and position feed with reorg resilience

The boundaries that matter

Operational guarantees

Public reconciliation

Contracts expose aggregate and per-market open interest, queue, margin and fees so that solvency can be reconstructed by a third party from chain state. The dashboard is a convenience, not the source of truth.

Last updated: 2026-10-28