OpenZeppelin / OpenZeppelin/compact-contracts
Add Confidential Note Fungible Token ConcurrentSupply extension
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
Updating _encSupply in-circuit pins the old ciphertext into every mint/burn transcript, so two concurrent mints reject each other (concurrency.md §8.1). Issuance throughput is then one op per block.
📝 Details
contracts/src/token/extensions/ConfidentialNoteFungibleTokenConcurrentSupply.compact
- Same confidential, attestable supply as PrivateSupply, but accounting goes through an
ElGamalDeltaInbox. - Hot path
_addMinted/_addBurnedonly APPENDS an encrypted delta keyed by the writer's own randomness — reads no ledger value, so it commutes with everything. - A separate permissionless fold absorbs the backlog into
_encSupply;attestSupplyproves the inbox empty in-circuit so the attested total cannot miss pending deltas. - Demonstrated by the
ConcurrentConfidentialNoteFungibleTokenpreset.
Landed in #679 (draft). Open decision: re-basing the Regulated preset onto it — its emission policy must credit the inbox inside emitOutput.
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.
Research direction
Start with contracts/src/token/extensions/ConfidentialNoteFungibleTokenConcurrentSupply.compact and compare its design with concurrency.md §8.1 and the ConcurrentConfidentialNoteFungibleToken preset. Review the draft work in #679, then resolve whether the Regulated preset should be re-based and how its emission policy relates to emitOutput; done means that decision and the extension behavior are settled.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain, cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100