OpenZeppelin / OpenZeppelin/compact-contracts
Add Confidential Note Fungible Token PrivateSupply extension
Open
@0xisk is already working on this.
Since Sep 7, 2026.
0-high
effort: 3-M
enhancement
feat:token
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
"What is the total supply?" has to be answerable without a public counter — a disclosed total leaks every mint and burn as a public delta, which is exactly the leak the note model exists to close.
📝 Details
contracts/src/token/extensions/ConfidentialNoteFungibleTokenPrivateSupply.compact
_encSupplyholds outstanding supply as an exponential-ElGamal ciphertext under_supplyKey;_addMinted/_addBurnedupdate it HOMOMORPHICALLY in the same transaction as the token op, so nobody decrypts to account.attestSupplypublishes a proof-backed public total when a deployment wants one, without making the running total public.- Supply-key self-rotation re-encrypts
_encSupplyunder the new key in-proof. - Uses
crypto/ElGamal; imports no token module.
Landed in #679 (draft).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.