Trust hierarchy
Four tiers, from most to least trusted:- Onchain contracts: deposit contracts, the Registry, and the credential manager. The credential manager is the root of trust: it binds each operator’s operator key to an attested key (both required) and pins approved TEE code measurements. Its governance is timelocked: each kind of governed change waits a delay set per deployment, and the security council can approve it at the lower delay or veto it (see Credential Manager).
- Clearing engine: the authoritative ledger, replicated from a leader to followers across Intel TDX trust domains. Its coordination protocol, the Slot Machine, groups state changes into slots; at the checkpoint that ends a slot, a node quorum signs the withdrawal approvals queued during it. There is no fraud-proof window.
- Hot services: OMS, orderbooks, interest engine. These can only propose state changes. The clearing engine re-verifies user signatures, bounds-checks rates, and requires chain finality on chain events, so a compromised hot component cannot move funds or forge fills.
- External parties: user requests (signature-verified), settlers (registry-verified), RPC providers (majority agreement across multiple independent endpoints; no single provider is trusted).
Remote attestation
Internal connections are bound to remote attestation: a peer’s Intel TDX quote must attest to the TLS key it connects with. A valid certificate alone does not admit a peer. Remote attestation uses Intel DCAP, via dstack (a framework for running attested containers on TDX).Slot lifecycle
A state change passes through three stages:
If the clearing engine is unavailable, orderbooks keep matching and the OMS keeps risk-checking; fills wait unfinalized until a new leader validates them.
Operator constraints
Failure modes
Signing and replay protection
User signing
Orders and requests are signed with the account’s Ed25519 master key. Optional account multisig adds secp256k1 / P-256 / WebAuthn co-signers with weight-based thresholds per permission level; withdrawals and settlements can require a higher threshold than trading. Signatures are validated before any state change, with low-s normalization against malleability. See Account multisig for the configuration model, signer schemes, and permission levels.Protocol signing
Withdrawal and settlement approvals use a custom typed keccak256 scheme with secp256k1 ECDSA. A domain hash binds deposit contract address, chain, and schema version; a type tag identifies the approval schema; and fixed-width encoded fields are concatenated intokeccak256(bytes.concat(...)). This is not standard EIP-712: there is no \x19\x01 envelope and no EIP-712 struct hash. Deposit contracts verify signatures against registered keys.
Replay protection
Nonces are independent per user, per chain, and per action type; settlement nonces are additionally per sub-account. Orders carry timestamps with a 30-day maximum TTL, and the orderbook admits a create only while its timestamp lies at most 5 minutes behind and 5 seconds ahead of the orderbook’s clock; a client order ID stays unique per user and market while its order lives and for at least 8 minutes after it ends, so a create the orderbook admitted is outside that window by the time its ID is free again; cumulative fill tracking prevents overfills. Every approval carries avalid_until expiry.
Price integrity
Oracle prices are the median of Pyth, Hyperliquid, and Binance feeds, with outlier rejection and a minimum number of sources per asset; updates with source timestamps more than 5 seconds from local time are rejected. The mark price is an EMA of worst-fill trade prices, which resists single-print manipulation. A trade must pass IM at both oracle and mark price; liquidation requires the account to be below maintenance margin with each leg priced at whichever of oracle and mark favours the account. Stale prices trigger circuit breakers. The oracle feed-to-asset mapping can only be rotated by a council-signed operation.Current limitations
- Clearing-engine operators are currently a known, permissioned committee. Permissionless access exists for hot services: anyone can run their own attested OMS or orderbook via dstack, and the credential manager admits any correctly attested instance. A federated, permissionless set of clearing engines is on the roadmap.
- Security rests on TEE hardware plus node-quorum signing, a weaker guarantee than pure cryptography. Asynchronous ZK validity proofs and economic security (staking/slashing) are planned additions.
- Recovery from full-network failure requires the operator committee to supply its decryption shares to a fresh attested clearing engine.