The Coprocessor is the attested enclave service that runs every Crossing. It is the only service that reads Intents and Ledger balances in plaintext, and the program checks each thing it produces before any token moves.
Inside the Trust Domain#
The Coprocessor runs as an Intel TDX Trust Domain (TD), a virtual machine whose memory the processor encrypts and keeps from the host, the hypervisor and the operator. The whole service is one binary inside the TD’s measured image. The operator’s machine supplies the network, the RPC connection and a volume that holds only ciphertext.
| Part | Holds | Does |
|---|---|---|
| Intake | the HPKE private key | Opens Intents and checks signature, nonce, expiry and funding |
| Engine | the plaintext Ledger | Nets, clears and settles each Crossing |
| Ledger | the Ledger data key | Re-encrypts touched leaves, proves them and computes the new root |
| Signer | the signing key | Signs Crossing opens, vault consolidations, Residual orders, Commits and Receipts |
| Relayer | a fee-payer key holding SOL only | Registers each epoch’s keys; builds, simulates, sends and confirms transactions |
| Feeds | the Jupiter API key | Reads Pyth’s sponsored price accounts, Jupiter’s live prices and Jupiter routes |
| Store | nothing secret | Writes sealed journals and checkpoints and public diff mirrors to the volume |
The fee-payer key and the Jupiter API key live in the TD’s memory and are never part of the image. The engine is a pure function of the previous root, the plaintext Ledger, the Intent batch, the mids, the recorded fills and the deposits. It reads no clock, iterates ordered maps only and works in integer base units, so any admitted enclave given the same inputs computes the same root. The in-memory Ledger advances only after a Commit confirms.
What it sees#
Inside the Trust Domain the Coprocessor reads every Intent and every balance a Crossing touches. It holds the Ledger data key , the AES-256-GCM key Ledger ciphertexts are written under, which the Council releases only to enclaves whose measurement the Registry admits. That confidentiality rests on TDX isolation, the reproducible build of the measured image, an honest threshold of the Council for the release of , and the security of HPKE and AES-256-GCM.
Nothing in plaintext leaves the TD. What it sends out is public or sealed: transactions, ciphertext diffs, replies as HPKE envelopes to their owner, journals and checkpoints sealed under , and a health record with its readiness, the public Crossing index and root. The signing and release keys stay in TD memory and are never written to the volume.
What every output must pass#
Every instruction that moves Pool tokens runs its own check before it does (What moves tokens), and the relayer’s key can only pay fees. Each input that reaches the TD from outside is bound to something the program checks:
| Input from outside | What the program checks |
|---|---|
| Deposit entries read over RPC | The Commit’s digest of the deposit queue’s chain hashes at the consumed positions |
| Pyth prices | open_crossing derives each Pyth price account itself, verifies it and stores the prices’ hash; the Commit repeats it |
| Jupiter route | The enclave signs the route hash and the minimum output; the program measures the fill |
| Residual fills | route_residual records them on chain; the Commit carries their hash |
| Ciphertext diff | log_diff builds its accumulator on chain; the Commit repeats it |
| Previous root and Crossing index | The Commit must name the stored root and the next index |
A Commit built on anything falsified outside the TD fails these checks. Jupiter’s live price, which the enclave holds each mid against before it crosses, decides only whether a pair trades: a false one can make a pair skip a Crossing, and the price it clears at stays the mid the program verified (Clearing at the mid). The program also accepts a Commit only under a key the Registry admitted and only when every asset is conserved (Commit), and it reverts any Residual swap outside its signed bound (Residual). Custody never depends on the enclave staying up: if Commits stop for more than slots, about 30 minutes, the Escape pays every owner from the last committed root with no enclave involved.
Its keys and the Registry#
Each key epoch, the Coprocessor generates its keys inside the Trust Domain: the signing key , the HPKE key pair that Intents, deposit notes and registrations are sealed to, and the key the Council re-encrypts the Ledger data key to. A TDX quote binds their public halves to the measured code, and the program admits them into the Registry for one epoch’s validity interval, only under a measurement in the Registry’s admitted set. That set grows only by a measurement the upgrade authority proposes and that waits on chain before it activates, and keys already admitted keep their epochs when one is added. The SDK reads from the Registry, and the program accepts a signature only under a key whose interval contains the current slot. Attestation and reproducible builds carries the key table, the quote checks, the epochs and rotation, how a measurement is added and how to rebuild it.
The Crossing lease#
open_crossing records the opening enclave key and a lease of 300 slots, two full blockhash lifetimes, well inside . While the lease runs, only that key may consolidate, route and commit Crossing . Once it has passed, or once the opener’s key is no longer admitted in the Registry, another admitted key can open the same Crossing again, which keeps the mids, the recorded fills and the diff accumulator already on chain.
Before it opens a Crossing, the Coprocessor seals that Crossing’s work, the Intents it accepted for and the open message, to its volume under , and it seals the prepared diff before the first log_diff, so every ciphertext byte is fixed before publication. An enclave that restarts, a fresh TD that the Council has given , or the same Coprocessor under its next epoch’s key reads that work back, opens again under its own key if the lease has passed or the opener differs, reuses the fills already on chain so no swap repeats, skips the diff chunks already logged and commits the same settlement.
Each transaction is resent with the same signed bytes every two seconds until it confirms or its blockhash expires, 150 blocks after it was fetched, and is then rebuilt with a fresh blockhash. The program takes a Commit only for the next index on the stored root, so a Commit lands once. A Crossing stage that fails is retried on the next cycle from the last committed Ledger.