OpenZeppelin / OpenZeppelin/compact-contracts

Add Confidential Note Fungible Token core

Open
#723 0 comments 0 reactions 1 assignee View on GitHub

@0xisk is already working on this.

Since Jul 28, 2026.

0-high effort: 4-L enhancement feat:token
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

🧐 Motivation

The mechanism every other piece of the family builds on: a self-contained note-based token with full graph privacy (amounts, sender, recipient hidden), complete and deployable on its own with no extension.

📝 Details

contracts/src/token/ConfidentialNoteFungibleToken.compact

  • State is the Zcash split: _commitments: HistoricMerkleTree<32, Bytes<32>> ("what value exists", append-only) and _nullifiers: Set<Bytes<32>> ("what was spent"). Neither reveals amounts or owners.
  • cm = H(domain, value, nonce, pk) with a 256-bit nonce for hiding; nf = H(domain, nonce), deliberately omitting any owner secret so seizure can be escrow-free.
  • _consumeNote is the heart: proves Merkle membership against a historical root, checks the owner's spend secret, inserts the nullifier (k=14, ~12.2k rows).
  • Deliberately role-free and supply-free: ungated _-prefixed blocks (_mint, _mintNote, _transfer, _burn, _consumeNote) plus value conservation; the composing contract supplies all policy.
  • Standalone mode returns created notes to the caller for out-of-band handoff; the Delivery extension replaces that with on-chain discovery.

Landed in #679 (draft).

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.