• Reading the docs…
Start trading

Security

Trust model

Each of Privium’s guarantees rests on a named part of the system: the Pool program’s checks, the integrity of the attested Coprocessor enclave, an honest threshold of the Council, or data anyone reads from Solana. This page states each guarantee, what it rests on, and where a reader checks it.

Guarantees and what they rest on#

Custody#

At every committed root, each token in a vault is a committed balance, a committed Exit awaiting release, or a deposit not yet credited. Tokens leave a vault only along the paths in How tokens leave a vault, each gated by a check the program runs.

Rests on: Solana executing the Pool program as deployed, and the program’s checks on every Commit and every release. How each vault divides among traders rests on the enclave’s arithmetic; the vault total is checked on chain whatever the enclave computes.

Check it: vault balances are public token accounts, and every Commit’s signed message carries the per-asset figures of the conservation identity.

Ledger confidentiality#

A balance or an Intent is readable inside an admitted enclave, by its owner, and by whoever the owner hands a Viewing key. An observer holding the whole chain, every ciphertext and the shares of up to t−1t - 1 Council members learns nothing about either beyond the public record that What an observer sees lists.

Rests on: the integrity and confidentiality of the enclave, admitted by an Intel TDX quote of a measurement anyone can rebuild from source and that was on chain before it could admit a key; HPKE for Intents and AES-256-GCM for Ledger leaves; fewer than tt Council members colluding.

Check it: Attestation and reproducible builds, and the measurement rebuilt from source in The enclave image.

Unlinkability#

Inside a Crossing, no Intent, fill or balance change can be attributed to an account beyond what deposits and Exits show. Linking an Exit to the deposit that funded it is bounded by the min-entropy of the Pool’s anonymity set over the interval between them, which denominations, exit delays and Ring exits raise.

Rests on: Ledger confidentiality, and the Pool’s activity over the interval.

Check it: the bounds in What an observer sees, against the live record on /pool.

Liveness and the Escape#

A Crossing runs whenever there is something to settle, as often as every Δ=4\Delta = 4 slots (about 0.8 s), and a heartbeat Commit lands 750 slots after the last Commit when there is not (The batch). Every Intent eligible at a Crossing’s cutoff is processed in it, and every Exit request enters an exits root at the first Commit after its delay. Once the current slot passes the last Commit’s slot plus W=9,000W = 9{,}000 slots, about 30 minutes, anyone can call trigger_escape, and every owner of a nonzero leaf under the last committed root takes that balance to an address of their choice.

Rests on: Solana’s liveness for Commit and Escape transactions, and, for the Escape to complete, tt Council members responding (5 of 9 on mainnet). What the Escape pays rests on the chain alone: the frozen root, the share and claim proofs the program verifies, and the authenticity of the last Commit. Each payout goes to the holder of the leaf’s escape key, for exactly the committed balance under the settlement rule on Escape, once, whatever any Council member posts.

Check it: the liveness panel on /trust (last Commit slot, the window, slots until an Escape could open, current state), and The Council for re-verifying an Escape’s shares.

Price fairness#

Every crossed fill on a pair executes at the mid that open_crossing verified from Pyth for that Crossing, and every fill respects its Intent’s limit. The routed part executes at no worse than the minimum output the enclave signed, which the program measures on the vault deltas. Crossed and routed quantity are allocated among Intents by the published rule of Chapter 7.

Rests on: the integrity of the enclave; the oracle within its filters (a pair crosses only while Pyth’s price is at most 75 seconds old, its confidence interval is within κ=25\kappa = 25 bps of the price, and the price is within κ\kappa of a live Jupiter price the host reads; a false reference can only make the pair skip a Crossing, never move the price it crosses at); the program’s check of each signed minimum.

Check it: a trader compares each decrypted crossed fill with the mid the Crossing stored on chain; anyone compares each Residual swap’s received amount with its signed minimum and the mid.

Owner auditability#

With the viewing root derived from their wallet, a trader decrypts each of their leaves from public data, checks its inclusion under every committed root, and rebuilds their whole history. They can hand that reach, or a narrower one, to a Viewing key holder, or issue a Receipt that anyone verifies against the Registry without learning a wallet.

Rests on: the ciphertext diffs every Commit publishes on Solana through log_diff, and the security of the enclave’s signing key.

Check it: /account decrypts leaves and checks each Merkle path against the on-chain root in the browser.

What the program checks on every Commit#

The enclave computes each step of the Ledger; the program decides whether the step lands. A Commit is accepted only if every check in What the program checks passes, the conservation identity included, which the program evaluates over its own vault and queue accounts. Otherwise the transaction reverts and the root stays where it was.

Two more checks run off chain, and anyone can run them from the log_diff data: every rewritten leaf’s range proof and the batch validity proof verify, and each published commitment delta equals the sum over the diff’s leaves. With both, the Council decryptions of an asset’s leaves sum to exactly TaT_a, so an Escape pays out exactly what the vaults hold for traders. Replaying every diff from genesis rebuilds each committed root, which is how any watcher, Privium’s indexer included, confirms the leaves it serves.

The Coprocessor’s operator runs the host, the network and the schedule, and its relayer key pays transaction fees only. Every input the host hands the enclave (deposits, prices, routes, fills, the diff) is bound to a value the program compares, in the Commit or in route_residual, so the host’s part is availability, which the Escape backs.

How tokens leave a vault#

Every vault is owned by the Pool authority, a program address with no private key. It signs only inside the instructions in What moves tokens, each behind the checks listed there.

Upgrade authority#

The Pool program is deployed under Solana’s upgradeable loader. Its upgrade authority is the vault of a Squads v4 governance multisig, whose execution enforces a time lock longer than WW plus the slots the Exit release crank needs. The ProgramData account names the authority, and the multisig account holds its members, its threshold and its timeLock in seconds. The authority signs two kinds of change:

  • Program upgrades. Every pending upgrade is visible on chain for longer than any trader needs to Exit, or to Escape, under the code they deposited with. Each upgrade buffer’s hash is reproducible from the tagged source, with a verification record anyone can recheck (The Pool program).
  • New enclave measurements. propose_measurement reads the authority from ProgramData each time and accepts only its signature. The proposal then waits 2W2W on chain before anyone can activate it, and activation adds the measurement without touching the keys already admitted or their epochs (How a measurement is added).

The Council is outside this authority: its members change only through rotate_council, which tt current members sign, under the same Council key (Rotation).

The admin and the admission authority#

The same multisig vault is the Pool’s admin, PoolConfig.admin, so every admin instruction passes the multisig’s approvals and time lock. The admin sets the fee rate, the fee recipient and the liveness window, approves each enclave platform and each renewal of one, admits assets and names the admission authority. set_admin, which only the current admin signs, hands the role to another key (The admin). No admin instruction moves tokens, writes a balance or a root, admits an enclave key, or changes the Council once it is installed.

The admission authority, PoolConfig.admission_authority, is a delegated key that signs create_shard and admit_asset and no other instruction: it can add a mint to the Pool, with that mint’s own vault shard and asset state, and change nothing else. The admin names it with set_admission_authority and can replace it at any time.

Key Can change Where a checker reads it
Upgrade authority, the multisig vault the program’s code; the admitted measurements, through a proposal that waits 2W2W the program’s ProgramData account, bytes 13..45
Admin, the same vault the fee rate, the fee recipient, the liveness window, the admin, the admission authority; platform admission and renewal; mint admission; the one-time installation of the Registry, the verifier and the Council PoolConfig.admin, bytes 8..40 of ["pool"]
Admission authority mint admission: each new mint’s vault shard 1 and asset state PoolConfig.admission_authority, bytes 144..176 of ["pool"]
tt current Council members the Council’s membership, under the same Council key CouncilConfig (The Council)

Each change one of these keys signs is a transaction that names its signer, so a reader lists every one from the program’s history and its ProgramData account (PoolConfig).