OpenZeppelin / OpenZeppelin/compact-contracts

Add Confidential Note Fungible Token ConcurrentSupply extension

Open
#729 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

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 / _addBurned only 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; attestSupply proves the inbox empty in-circuit so the attested total cannot miss pending deltas.
  • Demonstrated by the ConcurrentConfidentialNoteFungibleToken preset.

Landed in #679 (draft). Open decision: re-basing the Regulated preset onto it — its emission policy must credit the inbox inside emitOutput.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.