Private donations
Shows: the mailbox · async message for strangers (9) · pseudonym (8)
Goal
A cause publishes one address that anyone can donate to, from a public or a private account. Nobody can see who runs the cause, what it holds, or when it spends. Donors who give from a private account hide who they are, and hide the amount too when they can seal the gift.
No new program is needed: only the native token and the mailbox. The reference CLI has no command to register the address or to pay it, so today the cause and its donors need a client built on the wallet library (What works with the reference wallet today).
Actors
| Actor | Placement | Authorized by |
|---|---|---|
| the donor’s balance | public or private | the donor |
| the cause’s balance | private | the cause’s keys |
The cause publishes a blinded address of its private account and registers it once, in a private transaction (a recovery binding, see Private accounts). Without the binding, a credit sent to the address in the clear fails with UnboundAsyncDestination and the donor is still charged; the reference wallet checks for the binding and refuses to build such a transfer.
Messages
Only the native token’s own:
Transfer { to, amount }, sent by the donor to their own balance actor;Credit(amount), sent as an async message by the donor’s balance actor to the cause’s address.
How it runs
- Donate. The donor sends
Transfer { to: cause_address, amount }; their balance actor debits and sendsCreditas an async message. The address is not a declared public actor, so the credit is stored. - Wait. The credit sits in the mailbox. The cause does not need to be online.
- Collect. The cause’s wallet finds the credit and collects it in a private transaction; its balance grows inside a new commitment.
A public donor sends a plain signed transfer, with no proof.
A library caller pays the address with NativeTokenTransfer::transfer_clear (lez/wallet/src/program_facades/native_token_transfer/mod.rs), which leaves it undeclared. wallet auth-transfer send --to Public/<address> does not work: it declares the address as a public account, which no key or seed admits, so the simulation reverts with declared public but not admitted and nothing is stored for the cause (with --allow-revert the transaction is included, reverts and still pays its fee).
Placements
| Donor | What an observer sees | Proofs |
|---|---|---|
| Public | the donor’s account, the amount, the cause’s address | none to donate, one to collect |
| Private | if sealed, a sealed message; if not, the amount and the cause’s address, from the donor’s blinded address; in both cases, the fee | one to donate, one to collect |
What leaks
- From a public donor: who gave, how much, and to which address. The total given to that address can be summed by anyone.
- From a private donor who seals: that some private transaction sent a sealed message, and its fee. Sealing needs the cause’s keys and factor; a private donor who has only the published address sends the credit in the clear, so the amount and the address show, under the donor’s blinded address.
- Never, to an observer: which account is behind the address, whether or when the credits were collected, and what the cause’s balance is. A donor who seals holds the cause’s keys, and so knows its account id.
Going further
- One address per campaign. A different blinded address for each campaign, all paying into the same account; observers cannot link the public totals. A private donor who seals the gift needs the cause’s keys and the factor, so they can tell that two campaigns are the same cause.
- One address per donor, for donors who want a private relationship.
- What does not work: automatic refunds, since a stored credit is never returned. If a campaign fails, the cause sends the money back itself.