OpenZeppelin / OpenZeppelin/compact-contracts

Add Confidential Note Fungible Token Allowlist extension

Open
#731 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

KYC on a pool with hidden spenders cannot use a Set lookup — the lookup itself would disclose who is transacting, defeating the sender privacy the model is for.

📝 Details

contracts/src/token/extensions/ConfidentialNoteFungibleTokenAllowlist.compact

  • Membership is proven in zero knowledge against a Merkle tree of identity leaves: an observer learns only "an allowed party", never which one.
  • _assertAllowed is wired at the spend chokepoints; admin _addAllowed / _removeAllowed are gated by the consumer.
  • Removal tombstones the leaf against the current root, so revocation is instant.
  • Imports no token module.

Landed in #679 (draft). Follow-up: admin-vs-spend liveness — every _addAllowed aborts in-flight KYC spends via the current-root pin; evaluate HistoricMerkleTree + resetHistory on removal so additions stop hurting while removals keep instant revocation.

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/ConfidentialNoteFungibleTokenAllowlist.compact and the draft in #679. Trace the current-root pinning used by _addAllowed and removal tombstones, then evaluate HistoricMerkleTree with resetHistory. Done means additions no longer abort in-flight KYC spends while removals retain instant revocation.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain, cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.