Docs7Privacy model

Section 7

Privacy model

Doei hides how much. It does not hide who. If you need the second, this is the wrong tool.

7.1The statement

Doei settles on Helius Privacy Rings, which gives an SPL token shielded balances. In the default ring, the amount of a transfer and the balance of an account are confidential. The sender's address and the recipient's address are public. Deposits into a private balance and withdrawals out of it are public transfers and show their amounts.

Doei adds nothing to that guarantee and takes nothing away. It is a wallet and a wire format on top.

7.2What the chain records

FactPublic explorerPayeeOwner, viewing key
That a payment happened, and whenvisiblevisiblevisible
Payer addressvisiblevisiblevisible
Payee addressvisiblevisiblevisible
Payment amounthiddenits own incomingreadable
Protocol fee amounthiddenhiddenreadable
Private balancehiddenhiddenreadable
Deposit amountvisiblevisiblevisible
Withdrawal amount and destinationvisiblevisiblevisible
What the payment was fornot on-chainthe request it servedwallet receipts, off-chain

The protocol fee is a second output in the same transfer. Its amount is sealed like the first, and its recipient, the fee collector, is visible. Anyone can therefore see that a transfer is a Doei payment.

7.3Who learns what

PartyLearns
Anyone with an explorerThat the agent paid the payee, and when. Deposit and withdrawal amounts. No payment amounts, no balances.
The payeeThe amount it received and the payer's address. Not the payer's balance, and not its other payments' amounts.
The fee collectorThe fee on each payment and who paid it. From the fee and the rate, an estimate of the payment.
A viewing-key holderEvery amount in and out of that one wallet, and its balance. Cannot spend.
The RPC and indexer operatorsWhich addresses your wallet asks about, and your IP address, as with any Solana RPC.
The prover operatorThe inputs of each spend it proves, which include the amount. See the note below.

7.4What an observer still works out

Hidden amounts do not make a payment trail uninformative. An observer can still:

  • List every address the agent pays, and count payments to each.
  • See the timing of every payment and match it to activity elsewhere.
  • Bound total spending. A wallet that deposited 25 and withdrew 10 spent at most 15 in between.
  • Combine a public price list with a payee address. If a provider charges one flat price per call and the agent paid it forty times, the total is not hard to guess.

What they lose is the exact figure per payment, the split of a budget across suppliers with variable prices, and the balance left. For an agent buying from metered or negotiated suppliers, that is the part competitors want.

Two habits help. Fund the private balance in round amounts on a schedule unrelated to tasks, so deposits say little. And leave change in the balance instead of withdrawing after each job.

7.5Viewing key

The owner reads the agent's spending with a viewing key: a bundle exported from the agent's rail that can decrypt the wallet's transfers and cannot sign. Hand it to an accountant, an auditor or a dashboard.

examples/owner.ts, viewing-key
// On the agent's machine: export the read-only bundle.
const bundle = rail.exportViewingKey();

// Anywhere else: read every payment. This object cannot sign.
const viewer = await createRingsViewer(endpoints, bundle);
const entries = await viewer.entries();
  • The bundle is a secret. Whoever holds it reads every amount of that wallet, past and future.
  • It cannot be revoked. To cut off a reader, move the balance to a new wallet and stop using the old one.
  • It covers one wallet. It says nothing about the payees' other income.

7.6Off-chain traces

The chain is one of several places a payment leaves a trace.

  • The HTTP request. The provider sees the URL, the query and the IP address, like any API. The 402 challenge states the price in clear text to whoever asks.
  • Receipts. The wallet stores amounts, payees and memos in plain JSON wherever you point its receipt store. Protect that file as you would the viewing key.
  • The model. Tool results enter the model's context. If the agent calls doei_receipts, the amounts are in a prompt, and in your model provider's logs.

7.7Words we use

We say confidential, private balance and hidden amounts. We do not say anonymous or untraceable, because neither is true here: every payment publicly links two addresses. If a page of ours ever implies otherwise, it is a bug in the page. More on how the SDK behaves is under Status.