A confidential account still has to be shown to the people who need to see it: an accountant closing a tax year, a fund administrator, a follower checking a caller’s record. Privium gives the trader two instruments for this. Viewing keys open the trader’s own Ledger entries to a chosen reader, scoped by asset, by period or down to a single entry. Receipts go the other way: instead of opening the data, the trader asks the Coprocessor for a signed statement about it (realized PnL over a period, volume, a return above a threshold), which anyone can verify against the chain and which names no wallet. This chapter defines both, with the key hierarchy, the PnL rules and the properties each provides, and the controls institutions attach to their accounts, including auditor keys in the form Helius Rings introduced [1].
Two ways to disclose
Disclosure on a public chain is all or nothing: a wallet’s history is either published in full or kept in a wallet nobody knows about. Rings changed the default for balances. “Only the user can decrypt their balances with a viewing key,” and the user can share ongoing read access or a transaction-specific viewing key that opens one transaction without the rest of the history [1]. Token-2022 confidential transfers reached the same place from the issuer’s side: a mint may carry a global auditor ElGamal key, and when it does, every transfer instruction carries an additional encryption of the amount under that key [2].
Privium carries both ideas into the trading account and adds a third that only an attested coprocessor makes possible. The three instruments differ in what the reader learns.
| Instrument | Reader learns | Reader needs | Trust the reader extends |
|---|---|---|---|
| Viewing key | the plaintext of the Ledger entries the key covers | the key and the Crossing diffs on Solana | none |
| Auditor key | every entry of an account, for as long as the account’s policy names the auditor | the auditor’s own secret key and the Crossing diffs | none |
| Receipt | one statement computed over the trader’s entries, and nothing else | the Receipt, the Registry, the Ledger root history | the integrity of the enclave whose key signed it |
A viewing key discloses data; a Receipt discloses a fact about data. A tax accountant wants the first. A follower wants the second, and is better served by it: a Receipt for, say, “realized PnL of USDC over Crossings to ” lets the follower check the number without learning which tokens were traded, when, or from which deposit address.
The viewing key hierarchy
Where the owner component lives
Chapter 4 defines the Ledger leaf. For this chapter one property of it matters: every leaf of trader carries an owner component, the leaf’s plaintext encrypted under with the leaf key , which only and the Coprocessor can derive. The Council handle in the same leaf serves the Escape (Chapter 6) and is never used for disclosure. Alongside balance leaves, the Coprocessor writes one entry record per event that touches (a deposit credit, a fill, a fee, an Exit debit), encrypted under the entry keys below and carried in the Crossing diff that the Commit seals through its data availability digest (Chapter 4, Definition 4.4). Viewing keys are keys to these owner components.
Deriving the root
A trader’s viewing root is derived from the wallet that opened the account, so it can be rebuilt on any device without a backup:
where is the account message of Chapter 10, the one wallet signature from which the SDK also derives the authority key and the escape key under other labels. Ed25519 signatures are deterministic (RFC 8032 derives the nonce from the key and the message [3]), so the same wallet always yields the same , and the domain-separated message cannot be replayed as a transaction signature. The confidential-balances documentation derives encryption keys the same way, “deterministically derived from an owner signing key” and never reusing the signing key itself [2]. When the account is opened, the SDK encrypts to the Coprocessor’s attested HPKE key (Chapter 3, Chapter 5) and the enclave keeps it in the trader’s record (Chapter 4). The Coprocessor already reads every balance in plaintext inside the enclave to compute a Crossing, so holding adds nothing to what it can read; it lets the enclave encrypt each new entry to keys the trader can later hand out.
Asset keys and period trees
From the root, keys branch first by asset and then by time. Let be HMAC-SHA-256 used as a PRF. The asset key is
Time is divided into disclosure epochs of Crossings each, (parameter: one epoch per Crossing makes a period key exact to the Crossing; coarser epochs only shorten the tree). Under each asset key sits a binary tree of depth in the style of Goldreich, Goldwasser and Micali [4]: the root node is , and each node has children
The leaf reached by the -bit path equal to epoch number is the epoch key . With (parameter: epochs outlast any realistic run of Crossings at any batch interval Chapter 7 considers), the tree never fills.
The key that encrypts entry of trader in asset during epoch is
and the owner component of the entry is with associated data , so a ciphertext cannot be moved to another position and still decrypt. The entry itself is referenced the way Encifher references all encrypted state, by a 128-bit handle [5], and its ciphertext is published on Solana in the Crossing diff.
Scoping a disclosure
A disclosure is a set of nodes. To open asset for epochs , the trader sends the minimal set of tree nodes whose subtrees cover exactly that range. To open one entry, the trader sends alone, the per-transaction disclosure Rings offers [1]. To open everything, the trader sends .
| Scope | Key handed over | Size |
|---|---|---|
| Whole account, all time | 32 bytes | |
| One asset, all time | 32 bytes | |
| One asset, epochs | covering nodes of the period tree | at most nodes |
| One entry | 32 bytes |
Lemma 11.1 (Range cover). For any there is a set of at most tree nodes whose subtrees’ leaves are exactly .
Proof. Walk the paths from the root to and to . Below the node where they split, take every right sibling hanging off the path to , every left sibling hanging off the path to , and the two endpoints, merging any two chosen siblings into their parent. Each path contributes at most one node per level over at most levels, so ; every leaf strictly between and lies in exactly one chosen subtree, and each chosen subtree lies on the inner side of a boundary path.
The guarantee the trader cares about is that the covering set opens nothing outside the range.
Theorem 11.2 (Scoped disclosure). Let be the covering set for in asset . If is a secure PRF and is IND-CCA2 secure, then for any probabilistic polynomial-time reader given and every ciphertext in the store, the advantage of in distinguishing the owner components of any entry outside from encryptions of random entries of equal length is .
Proof sketch. No ancestor of a node outside the subtrees of is in , and no such ancestor is computable from , since only maps downward. Replace the tree hybrid by hybrid, top-down: in hybrid , every node at depth not in or below a node of is replaced by a uniform string. A distinguisher between and breaks the PRF at a node at depth whose key is already uniform in , so each step costs at most the PRF advantage, and there are steps per asset and one step for the asset layer. In the final hybrid every entry key outside the range is uniform and independent of ‘s view, and an encryption under a uniform unseen key is indistinguishable from an encryption of a random entry under IND-CCA2. The total advantage is at most for entries outside the range, which is negligible.
A disclosure is therefore bounded in time by construction. A reader holding the node set for last quarter keeps reading last quarter and nothing that comes after it, because future epochs sit under nodes the reader was never given.
Rotation
A trader who has handed out or an asset key closes future entries to that reader by rotating the root: the trader derives the next root from (11.1) with the label for a version counter , sends it to the enclave in a RotateViewing Intent, and from the next Crossing entries are encrypted under the new tree, with in their associated data. Entries already written stay readable to the old key’s holder; the next epoch begins under a key that holder never had.
Reading with a viewing key
The SDK’s reader takes a key bundle (the node set plus asset and root version, small enough for a QR code), fetches the covered entry ciphertexts from the Crossing diffs, derives each entry key from whichever bundle node is its ancestor, decrypts, and checks each diff against the accumulator that an accepted Commit sealed (Chapter 4). A reader who reconstructs a history is therefore reading entries the Solana program accepted, not files a server chose to return.
Receipts
What a Receipt states
A Receipt is a statement the Coprocessor computes over one trader’s Ledger entries for a span of Crossings, signs with , and returns to the trader. The trader chooses which fields it carries.
Definition 11.1 (Receipt). A Receipt is a tuple
where is the Receipt’s pseudonym, the span of Crossings it covers, the Ledger root committed at the end of the span, a list of claims, a public key the trader controls, the signing key, the EnclaveKey record that binds to an attested measurement (Chapter 5), and the slot at which the enclave signed. is a canonical, length-prefixed encoding.
A claim in is either an exact value or a predicate:
| Claim | Exact form | Predicate form |
|---|---|---|
| Realized PnL in | ||
| Return on capital | ||
| Traded notional in | ||
| Fills | ||
| Fees paid in | none | |
| Ending equity in | ||
| Assets traded | the set of | the count of |
Predicate claims are the reason a Receipt can say less than a viewing key ever could. For example, a trader applying to a fund can prove “time-weighted return of at least 30% over the last 2,000 Crossings” without disclosing the actual return, the capital behind it, or the instruments. The enclave evaluates the predicate on plaintext and signs only its truth; the threshold is the trader’s choice and appears in the Receipt.
The pseudonym and the holder key
A Receipt names no wallet. Its pseudonym is
where is a string the trader picks. Using the same label across Receipts makes them carry the same , which is what a public caller wants: a stable handle whose track record accumulates. Using a fresh label makes each Receipt stand alone, which is what a trader applying to two funds wants. The holder key is derived the same way, mapped to an Ed25519 scalar, so the trader can answer a verifier’s challenge by signing a nonce with and show that the Receipt is theirs to present, while a copied Receipt in someone else’s hands cannot answer.
Producing a Receipt
The trader submits a ReceiptRequest Intent, encrypted to the Coprocessor’s HPKE key like any other Intent, carrying the span, the claim selection, the label and a proof of account control (a signature by ‘s wallet over the request, verified inside the enclave and never published). The enclave recomputes the claims from the plaintext entries of between and using the rules in the next section, checks that is a root that has been accepted on chain, signs, and returns the Receipt through the same encrypted channel. No transaction is sent and nothing about the request reaches the chain.
use ed25519_dalek::{Signer, SigningKey};
pub const RECEIPT_DOMAIN: &[u8] = b"privium/receipt/v1";
#[derive(Clone, borsh::BorshSerialize)]
pub enum Claim {
RealizedPnl { exact: Option<i128>, at_least: Option<i128> }, // quote base units
TimeWeightedReturn { exact_bp: Option<i64>, at_least_bp: Option<i64> },
Volume { exact: Option<u128>, at_least: Option<u128> },
Fills { exact: Option<u32>, at_least: Option<u32> },
Fees { exact: u128 },
Equity { exact: Option<u128>, at_least: Option<u128> },
Assets { mints: Option<Vec<[u8; 32]>>, count: u16 },
}
#[derive(Clone, borsh::BorshSerialize)]
pub struct ReceiptBody {
pub ver: u8,
pub pool_id: [u8; 32],
pub psi: [u8; 32],
pub k0: u64,
pub k1: u64,
pub root_k1: [u8; 32],
pub claims: Vec<Claim>,
pub holder_pk: [u8; 32],
pub coproc_pk: [u8; 32],
pub att_ref: [u8; 32], // EnclaveKey record address (Chapter 5)
pub signed_slot: u64, // s_R
}
pub struct Receipt { pub body: ReceiptBody, pub sig: [u8; 64] }
pub fn sign_receipt(sk_c: &SigningKey, body: ReceiptBody) -> Receipt {
let enc = borsh::to_vec(&body).expect("canonical encoding");
let mut msg = Vec::with_capacity(RECEIPT_DOMAIN.len() + enc.len());
msg.extend_from_slice(RECEIPT_DOMAIN);
msg.extend_from_slice(&enc);
let sig = sk_c.sign(&msg).to_bytes();
Receipt { body, sig }
}
The domain prefix keeps a Receipt signature from ever verifying as a Commit signature, which the same produces over a different prefix (Chapter 5 and Chapter 9 give the Commit message). Borsh serialization is canonical for these types, so verifier and signer agree on the bytes without a second encoding layer.
Verifying a Receipt
Anyone can verify a Receipt with public data and no account of their own:
- Decode the body and recompute the signed message with the domain prefix.
- Read the
EnclaveKeyrecord named by from Solana and check that it records as an admitted Coprocessor key whose validity interval contains , and that is not earlier than the Commit of Crossing (registration by remote attestation is Chapter 5). - Verify under with Ed25519.
- Check that is the root accepted by the Commit of Crossing , from the Ledger root account’s history or the Commit transaction itself (Chapter 9).
- If the Receipt is being presented live, send a fresh nonce and check the presenter’s signature under .
The SDK wraps this as privium.receipts.verify(receipt), and a Receipt rendered as a link carries its encoded bytes in the fragment, so a verifier page checks it entirely in the browser.
Theorem 11.3 (Receipt soundness). Suppose Ed25519 is EUF-CMA secure, the enclave whose measurement is recorded in the Registry entry for runs the measured code with confined to it (enclave integrity, Chapter 5), and the Ledger roots accepted on chain satisfy the conservation and transition rules of Chapter 4. Then for any Receipt that passes verification, every claim in is true of the entries committed under for the trader whose viewing root yields , evaluated by the rules of the next section.
Proof sketch. Let output a verifying Receipt with a false claim. Inside the measured code, signs a message with the Receipt prefix only on the path that recomputes from the trader’s entries and checks , so by enclave integrity the enclave never signed this body. The Commit path signs under a different prefix, so no Commit signature is a valid Receipt signature on any body. Hence ‘s signature is a forgery on a message the signing oracle (the enclave, exposed through both paths) never signed, and breaks EUF-CMA with the same probability. Step 4 of verification ties the Receipt to a root the program accepted, so the entries the claims describe are the ones the program’s checks bound, not an alternative history. A Receipt rests on exactly what every Commit rests on.
Theorem 11.4 (Receipt unlinkability). Let and be Receipts issued with distinct labels, by the same trader or by two different traders. If is a secure PRF, a party holding both Receipts and all public chain data distinguishes “same trader” from “different traders” with advantage at most plus the advantage obtainable from the claims and spans themselves.
Proof sketch. Replace with a random function; the change is undetectable by PRF security because never leaves the trader and the enclave. In the hybrid, and are fresh uniform values for each distinct label, independent of . The remaining fields, , are functions of the span and of public chain state and do not depend on . What remains is the information in the claims, which the trader chose to disclose.
The claims are the trader’s own lever. Chapter 8 quantifies how exact amounts correlate with deposits and Exits; predicate claims, or exact claims rounded to a resolution the request names, add nothing to that correlation.
PnL rules
The arithmetic behind a Receipt is fixed in the measured code, so two traders with the same history receive the same numbers. The Coprocessor computes PnL in the quote asset , per Crossing, from the trader’s own entries.
Positions and cost basis
For trader and asset , let be the position in base units after Crossing (equal to ) and the average cost per unit in . A fill in Crossing of size at price (the clearing price for a crossed fill, the executed Residual price for a routed fill, Chapter 7) with side changes the position by . Write and . Spot accounts hold no negative positions, so and a sell satisfies .
A buy () raises the position and averages the cost:
A sell () realizes the difference between price and basis on the quantity sold and leaves the basis of the rest unchanged:
Every fill also pays the protocol fee in (Chapter 12), which realized PnL subtracts:
Average cost is the default (parameter: it is path independent within a Crossing and needs one number per asset). A request may select first-in-first-out instead, and the Receipt records the method.
Deposits, Exits and the mark
A deposit of asset brings no trade history with it. The enclave sets its basis at the oracle mid of the Crossing that credits it, , so PnL inside Privium is measured from the moment the asset entered. An Exit removes quantity at the current average cost and realizes nothing: moving tokens out is not a trade. Both rules keep PnL a function of trading decisions alone.
Unrealized PnL and equity at the end of a span use the oracle mid of Crossing :
The mid is the same price Chapter 7 clears at, from the same Pyth feed the Coprocessor ingests (Chapter 10), so a Receipt’s mark is the mark at which the trader could have crossed in that Crossing.
Return on capital
A raw PnL figure says little without the capital behind it, and capital changes with deposits and Exits. Receipts report the time-weighted return, which removes the effect of external flows. Let be the Crossings at which ‘s account had a deposit or Exit, together with the endpoints. For each sub-span, let be equity just before the flow at and equity just after the flow at . Then
Lemma 11.5 (Flow invariance). Suppose that on each sub-span the trader’s decisions earn a return on the equity the sub-span starts with, so that . Then , whatever the sizes of the deposits and Exits at .
Proof. Substitute the hypothesis into (11.10): each factor equals , and the flows enter only through , which cancels within its own factor.
The lemma is what makes return comparable across traders of different size: a trader who doubles the account halfway through a span and keeps trading the same way reports the same return as one who never added a token.
Fee and volume lines
Traded notional is over all fills in the span and fees paid are , crossed and routed fills alike. The crossed share of a trader’s volume is available as a further claim: the trader’s own crossing rate (Chapter 12).
Auditor keys and institutional accounts
The auditor key
A desk or a fund answers to someone who must see everything without asking the trader. Custom Rings meet this with “a separate auditor key” that grants read access to wallet balances inside the Ring under the policy the Ring configures [1], and Token-2022 meets it at the mint level with an auditor ElGamal key under which every confidential transfer carries an extra amount ciphertext [2]. Privium attaches the same role to an account.
An institutional account carries a policy record , a Ledger leaf of kind 3 (Chapter 4) anchored like any other leaf. Among its fields is an optional auditor public key , an X25519 key for HPKE. When is set, the Coprocessor writes, next to each owner component, an auditor component: the entry encrypted with HPKE to , with the same associated data. The auditor reads with its own secret key and needs nothing from the trader. Because the auditor component is a separate ciphertext, the auditor’s access is independent of the trader’s viewing keys: rotating does not close the auditor, and changing does.
Changing the policy is itself governed by the policy. names a set of policy signers and a threshold ; a SetPolicy Intent carries signatures over the new policy and the current policy’s hash, which the enclave checks before applying. A desk whose policy requires its compliance officer’s signature to change the auditor cannot have the auditor removed by a trader acting alone.
Proposition 11.6 (Auditor completeness). For an account whose policy has carried from Crossing onward, every entry of that account written at or after has an auditor component under , and the entry is published in the diff of its Crossing.
Proof sketch. The measured entry-writing path reads from the same plaintext state it updates and emits the auditor component in the same step as the owner component, and both enter the Crossing diff that the Commit seals. By enclave integrity no entry is written by another path, and by the transition rules of Chapter 4 no root is accepted whose leaves were not produced by that path.
Compliance hooks
Institutional policy goes beyond reading. The controls Custom Rings expose to institutions, allowlists and blocklists, freezes and additional required signatures enforced on Solana [1], are what a desk expects of its own account, and Privium’s policy record carries them as rules the enclave applies before it accepts an Intent:
| Hook | Field of | Applied at |
|---|---|---|
| Exit destinations | allowlist of addresses, or a screening attestation required per Exit | Exit Intent acceptance |
| Counter-signature | set of co-signers and threshold for Exits above a size | Exit Intent acceptance |
| Instrument set | allowlist of assets the account may trade | Intent acceptance in a Crossing |
| Position limits | maximum per asset, maximum notional per Crossing | Intent acceptance in a Crossing |
| Freeze | a flag the policy signers set, holding all Intents except SetPolicy |
every Intent |
| Auditor | every entry written |
Each rule is checked inside the enclave on the plaintext Intent, so a desk’s limits are enforced with the same guarantee as its balances, without its limits or its positions becoming public. A rejected Intent produces an entry of its own, visible to the auditor, so the audit trail includes what a policy stopped as well as what it allowed.
Screening sits at the account’s edges, the only points where it touches a public address: a deposit’s source and an Exit’s destination. Helius lists Range, Chainalysis and Elliptic among the providers supporting wallet screening for Rings [1]. A policy that requires screening names the provider’s attestation key, and the enclave accepts an Exit only with a signed screening result for its destination.
Exits through a Ring
An institution that wants the exit itself confidential routes it through a Ring (Chapter 8). A Custom Ring, confidential or anonymous, carries its own auditor key and policy [1], so the books stay continuous: the auditor reads the Privium account through , the Ring balance through the Ring’s auditor key, and matches them on the Ring destination the Exit entry records.
The sharing flow
Disclosure is something a trader does in a few seconds from the account screen. The two paths split at the first choice: open data or prove a fact.
From the SDK, both paths are one call:
const bundle = await privium.disclose({ asset: "SOL", crossings: [k0, k1] });
const receipt = await privium.receipt({
crossings: [k0, k1],
claims: { realizedPnl: { atLeast: 10_000n * 10n ** 6n }, fills: "exact" },
label: "public-calls",
});
disclose returns a bundle that opens exactly the stated scope; receipt returns a signed Receipt and its link. A trader who publishes calls under one label builds a record anyone can check Receipt by Receipt, under a pseudonym that never touches the deposit wallet.
References
- “Solana Privacy Rings”, Helius, 2026. https://www.helius.dev/blog/solana-privacy-rings
- “Confidential Balances: Overview”, Solana Program Library documentation, Anza. https://www.solana-program.com/docs/confidential-balances/overview
- S. Josefsson and I. Liusvaara, “Edwards-Curve Digital Signature Algorithm (EdDSA)”, RFC 8032, IETF, January 2017. https://www.rfc-editor.org/rfc/rfc8032
- O. Goldreich, S. Goldwasser and S. Micali, “How to Construct Random Functions”, Journal of the ACM 33(4), 1986. https://dl.acm.org/doi/10.1145/6490.6503
- N. Lokhande et al., “Encifher: A Trusted-Execution Coprocessor for Confidential Computation on Solana”, IACR ePrint 2026/1504, July 2026. https://eprint.iacr.org/2026/1504