- Confidentiality and integrity. A TD’s memory and CPU state are sealed from everything outside it, and its code is measured from firmware up. User data — orders, balances, matches — and the keys that sign deposit contract approvals stay secret from the host, and the running code cannot be tampered with by the operator or the hypervisor.
- Remote attestation. A TD can prove to a remote party exactly what code it is running, anchored in the hardware manufacturer’s root of trust.
Why TEEs
Trading systems need low latency, private order flow, and reliable accounting. Pure onchain execution gives strong public verifiability but is too slow and expensive for every orderbook event. A normal centralized server is fast, but users must trust the operator. TEEs let Tplus put the hot path offchain while shrinking what the operator can do:Remote attestation
Confidentiality and integrity are only useful if a counterparty can verify them. Remote attestation gives a relying party the evidence it needs to check that it is talking to genuine TDX hardware running approved Tplus code:- The hardware manufacturer provisions an attestation key inside the chip, secured against software and physical extraction — this is the root of trust.
- The TD produces a TDX quote: a measurement of its firmware, configuration, and application code, signed with that attestation key.
- The relying party verifies the signature against the manufacturer-provisioned key, then checks the measurements against the approved Tplus code. A valid signature over approved measurements proves the data came from hardware-protected, untampered Tplus code.
Attested TLS
For a user, knowing what code answers is as important as confidentiality, so remote attestation is bound to the connection itself, as Attested TLS. Tplus binds each TDX quote to the TLS key used for the connection: the TDX quote commits to the connection’s public key, so a valid TLS certificate alone does not establish trust — that key must also appear in a verified TDX quote. A peer that cannot produce a TDX quote for an approved measurement is dropped before any confidential data is sent. Internal connections are mutually attested and verified during the handshake: when an orderbook connects to the clearing engine, each side proves its TLS key belongs to an approved TD before protocol messages flow. Attested TLS also secures user-facing entry points. A user still trusts their own client — browser, app, or Tplus client code — and Attested TLS extends that trust to the backend it talks to.Hot and cold services
Tplus separates offchain services into hot services and cold services. Hot services — the OMS, orderbooks, and interest engine. They accept requests, match orders, and propose state changes, with the oracle and blockchain clients feeding prices and chain events alongside them. A hot service can be fast and lightly replicated because it is not the final authority over funds. Cold services — the clearing engines. They hold the authoritative ledger for balances, positions, fills, withdrawals, settlements, and interest. A proposed state change is finalized when the leader clearing engine validates and applies it; the followers replicate it, and a node quorum signs the withdrawal approvals at each checkpoint. So an orderbook match is immediate but provisional: the clearing engine still re-checks user signatures, cumulative fills, margin, risk controls, oracle and mark prices, and chain finality before committing the fill. Of all these services, only the orderbook (hot) and the clearing engine (cold) hold durable state; the rest are stateless.Trustless replication with dstack
A single TD is a single point of failure: if its host goes down, the service goes with it. Tplus runs its components through dstack, a framework for deploying confidential VMs on TDX, so the protocol can operate redundant instances of each component and prove they run identical, approved code. This is what makes the redundancy trustless. Because every instance must present a valid quote for the approved measurement before peers or users accept it (see Attested TLS), a backup can be run by a different operator without trusting that operator — the remote attestation, not the host, is what peers trust. The same property is the path to permissionless operation: with no operator allowlist configured, any correctly attested instance is admitted, so new nodes can eventually be spun up without anyone’s permission. How a component is replicated depends on whether it holds state:- Stateless services — the oracle, interest engine, blockchain clients, and the OMS (which only mirrors clearing-engine state) — keep nothing durable. Redundancy is just running more attested instances and routing around a failed one; there is no state to recover, so a hot-swap is seamless.
- Stateful services carry their state across instances:
- The orderbook streams its action log, the ordered state changes, to backup instances running the same attested code, and keeps an encrypted local book snapshot. On restart it rebuilds from a backup or that book snapshot; if a node is lost entirely, a backup is promoted to primary.
- The clearing engine is replicated from its leader — followers re-apply every state change — and periodically writes encrypted checkpoints whose keys are split across the operator committee. Leader failover and full-outage restart are covered in Slots & checkpoints.
Quorum safety
The clearing engine does not rely on a single TEE. It combines remote attestation with node-quorum signing. A withdrawal approval is valid only with signatures from a node quorum: at each checkpoint every clearing engine, having applied the same state changes in the same order, signs the approvals queued during the slot. The deposit contract verifies that the signatures meet its withdrawal quorum before releasing funds. TEE integrity alone is enough for the latency-sensitive hot services: a compromised orderbook or OMS can stall or misorder proposals, but cannot move funds, because the clearing engine re-validates everything. The clearing engine is different — it approves onchain movements — so it layers node-quorum signing on top of TEE integrity. A single broken TD (for example, a leaked attestation key used to attest to a state the code never produced) cannot forge a withdrawal: it is short of the withdrawal quorum, and the deposit contracts reject anything below it. Rotation. As defense in depth, the protocol rotates which clearing-engine node may post checkpoints, the set of approved backups, and the hosts they run on. An attacker cannot easily learn which machine to target, and cannot count on prolonged physical access to any one box.Relationship to onchain contracts
The onchain contracts hold the funds.- Deposit contracts hold user funds.
- The credential manager registers operators, approved TEE measurements, and attested keys.
- Deposit contracts verify quorum signatures, nonces, expiries, and registered credentials before releasing assets.
What TEEs do not solve
TEEs are a pragmatic security layer, not a cryptographic proof that every computation was correct.
For the full hierarchy and failure modes, see the trust model.