• Reading the docs…
Start trading

Security

What an observer sees

An observer holding the whole chain sees the Pool’s boundary and its net flow: tokens entering and leaving, one swap per pair with a routed Residual, and one Commit per Crossing. This page lists what each Crossing lands on chain, what each transaction reveals, and how far an observer gets in linking an Exit back to a deposit.

What lands, per Crossing#

A Crossing goes on chain only when it has something to settle, as often as every Δ=4\Delta = 4 slots (about 0.8 s), and with nothing to settle a heartbeat lands 750 slots after the last Commit (The batch). A Crossing’s transactions land in the order below. Deposits and Exit releases land at any time: the next Crossing credits a deposit, and an Exit piece first shows in the Commit that lists it, once its release slot has come (An Exit’s trail).

Transaction Sent by What it reveals
deposit the trader’s wallet source token account and its owner, asset, amount, slot and vault shard; a note sealed to the enclave naming the Ledger account to credit
post_intent, when an Intent goes on chain instead of to intake a relayer’s fee payer a padded ciphertext sealed to the enclave
open_crossing a relayer, carrying the enclave’s signature the Crossing index, the opening enclave key, and, for each Pyth price account it reads (Pyth’s sponsored account for one feed), the price, confidence, exponent, publish time and whether the program marked it valid; it reads the feeds the pairs of eligible Intents and the USD marks of valid deposits need, and none when the Crossing has neither
consolidate_vault, when vault shard 0 holds less of a mint than a route or the fees need a relayer, carrying the enclave’s signature the mint, the amount moved from vault shard 1 to shard 0, and what each shard measured; at most once per mint per Crossing
route_residual, one per pair with a routed Residual a relayer, carrying the enclave’s signed order; the Pool authority signs the swap the pair and direction, the amount spent from vault shard 0, the amount received into it, the Jupiter route and the signed minimum output
log_diff, in chunks the relayer named at open_crossing the Crossing’s ciphertext diff: rewritten positions with fresh balance leaves (ciphertexts, commitments, Council handles and owner tags) and 197-byte trader records; per-asset commitment deltas, aggregate openings, range and validity proofs; encrypted entries for owners’ histories; the deposit cuts; the Crossing’s crossed and routed notional in USD
commit any relayer, carrying the enclave’s Ed25519 signature the previous and new roots, the key epoch, the diff’s digest, the exits root and Exit count, the hashes of the mids, fills and credited deposits; per carried asset the Ledger total, the Exits and fees the Crossing adds, the deposit cuts, the commitment delta and its aggregate opening; the fee payment to the fee recipient, whose token accounts the same transaction creates where missing
release_exit anyone, usually Privium’s keeper destination, asset, amount, release slot, slot, and the Commit whose exits root listed it

The Commit’s figures are aggregates over every trader:

  • Ledger total per asset. It equals the vault balance less committed Exits awaiting release and uncredited deposits, which the vaults already show. Its aggregate opening reveals that total and nothing about how it divides.
  • Fees per quote asset. The fees a Commit pays in SOL or USDC are ϕ\phi times the Crossing’s traded notional against that asset, summed over every pair and every trader (Fees).
  • Rewrites. Each carried asset rewrites at least m0=64m_0 = 64 leaves: the changed ones among decoys drawn from the asset’s other live leaves, each moved to a fresh position with fresh randomness. Each Crossing that settles carries the assets it changed and one more in a fixed rotation over the admitted assets, so the carried set shows which assets the Crossing may have touched and never whose leaves changed. A heartbeat carries none. From a leaf’s first rewrite on, an observer’s best guess at its position is right with probability at most 1/m01/m_0.

Any Crossing but a heartbeat shows by its slot that something settled in it: a trade, cancel or Exit Intent, a deposit to credit or refund, an Exit piece, an expiry or a resting order the market reached. Which of these, and whose, stays inside its sealed diff. Measured transaction counts:

Crossing Transactions
Heartbeat 3: open_crossing with no prices, one log_diff chunk and a commit with no asset
Settling in one asset (a deposit, an Exit piece or a cancel) 7: open_crossing, 5 log_diff chunks and commit
Crossed and routed fills on SOL/USDC 14: open_crossing, a vault consolidation, the Residual route, 10 log_diff chunks and commit

A trader record holds an account’s private index, keys and nonce watermark and nothing of its orders, Exits or history, so no open order or scheduled Exit piece is in any diff.

Registration and Council transactions carry no trading data. During an Escape, each claim lands as a payout with its amount and destination, as an Exit release does.

What never appears#

  • A trader’s Intents. Pair, side, size, limit and expiry reach the enclave sealed, through intake or as relayer-posted ciphertext, never as a transaction from the trader’s wallet.
  • A balance. Each leaf is ciphertext under one committed root. Its owner reads it, and whoever the owner hands a Viewing key.
  • A fill. The crossed part settles inside the Pool, and a trader’s share of a routed swap is no transfer of its own. Both reach the trader only through their own decrypted Ledger entries.
  • A link from a fill to a wallet. Every Residual swap is signed by the Pool authority from vault shard 0. The Residual is computed from the Intents’ sizes, sides and limits with no account identity in it, so two accounts with the same deposit and Exit records look the same to an observer.
  • A position across tokens.

An Exit’s trail#

Each piece of an Exit stays off chain until its release slot. While it is scheduled, the enclave holds that slot in its private working state, off the Ledger diff, and shows it to the account’s owner alone, in the encrypted status; the piece’s amount stays inside the Ledger total, so no figure on chain moves for it. The first Crossing opened at or after the release slot makes the piece public, in three records:

Record What it shows
The Commit an exits root and an Exit count that include the piece, and its amount inside the asset’s Exits for that Crossing, summed with every other piece the Commit lists
The API’s public Exit record from that Commit on: the piece’s Crossing, index, origin, mint, recipient, amount and release slot
The release release_exit: the same fields, the transfer from the vault and the transaction’s slot

The release slot these records show is already past by then, at or before the Crossing’s opening slot, so a public record never tells when a scheduled piece will appear. None of them names the account. A piece still unpaid 60 Crossings later appears again in a later Commit’s exits root and Exit count, under the same origin and without entering that Commit’s Exits (Exit).

Linking a deposit to an Exit#

The boundary is where an observer can try to join two wallets: the one that deposited and the one an Exit pays.

The anonymity set. For an Exit at a given slot, the candidates are every honest account holding a live leaf at that slot, in any asset: an account that deposited SOL can exit in USDC after trading, and nothing public says it traded. Accounts the observer opened itself are known to it and are not counted. On average the set is the rate at which accounts open times how long they stay, so every account that keeps Privium as its trading account enlarges the set for everyone.

The measure. Privium measures protection by min-entropy, the measure for a tracker acting on its single best guess: at H∞\mathsf{H}_\infty bits, that guess is right with probability 2−H∞2^{-\mathsf{H}_\infty}. Shannon entropy, the average uncertainty, is never lower.

Amounts and timing. An Exit runs as denominated pieces, each an Exit of its own released after a delay the enclave samples for it alone, so the Exit’s exact total never appears as one transfer and no one but the account’s owner sees its schedule. Exit gives the denominations, the delay and the bound each one sets on a guess.

Ring exits. An Exit can pay a Helius Ring deposit, where assets and amounts stay encrypted from then on. The path then crosses two independent mixing stages, and linking its ends is no easier than the harder of the two.

For a denominated, delayed piece of class jj, the chance of naming its source deposit is at most

math
Pr⁡[link]  ≤  6λj μ+1m0\Pr[\text{link}] \;\le\; \frac{6}{\lambda_j\,\mu} + \frac{1}{m_0}

where the first term is the delay’s timing bound, with λj\lambda_j and μ\mu as The delay defines them, and the second the rewrite bound above, plus terms bounded by the security of the enclave and of the Intent and Ledger encryption (Chapter 8), and for a Ring exit no more than the Ring’s own linking probability. Every Exit is denominated and delayed, and the Exit form shows the split and the delay before confirming (Exits).

The live view#

/pool shows the chain’s view as it happens: every Crossing as a row with its index, slot and time, the pairs it touched, its crossed and routed notional, links to its Residual swaps and its Commit, and its root; the crossed share over time; and the assets each vault holds per mint. It also carries the fee flow (Fees and $PRV). Routed in full gives the share of all notional since launch that routed whole because its token has no price feed (Crossing), and lists those tokens by the AMM they routed through, each with its pool and notional. Anonymity set gives totals per UTC day: Depositors, counted from the chain, and Accounts active, Exits and Deposit to Exit, median, from totals the enclave signs over every account (GET /v1/pool). Every row links to its transactions on an explorer, so the page checks directly against the chain.