Execution service
execution-service is an internal service that submits fills on chain. It runs on a private network and takes matched orders only from the matcher, so you never call it.
It validates each matched pair before submitting anything on chain.
Execution contracts
execution-contracts contains the Matching and action-verification contracts used by the backend.
These contracts are responsible for:
- verifying signed user actions
- constraining which modules can execute those actions
- forwarding matched transfers into the account system
Risk core
risk-core is the account and margin layer underneath the orderbook.
Important concepts:
SubAccountsstores{asset, subId, balance}state per account- managers validate final account state and can handle settlement and liquidation
- assets define transfer semantics and settlement hooks
CashAssetis the main cash accounting railFutureAssettracks each dated future series: its mark, fill band and settlement price- the
MarginEnginemargins futures positions and collateral in one account, settles variation margin and liquidates
Why this split exists
This architecture keeps concerns separate:markets-servicehandles order intake and market dataexecution-servicehandles verified transaction submissionexecution-contractshandles onchain match executionrisk-corehandles solvency, settlement, and liquidation

