OpenZeppelin / OpenZeppelin/compact-contracts

Add Confidential Note Fungible Token Audit extension

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

A regulated confidential asset needs an auditor who sees everything. Policy-based audit records are evadable: a sender can skip or fake the record. Auditor completeness has to be structural.

📝 Details

contracts/src/token/extensions/ConfidentialNoteFungibleTokenAudit.compact

  • The trick: the note's nonce IS the audit channel. _emitAuditedOutput DERIVES the nonce from an ECDH shared secret with the audit key and returns it; the consumer commits exactly that nonce.
  • It also pushes an AuditRecord encrypting the output's value and owner to the audit key.
  • Because one proof binds the commitment and the record to the same fields, an output the auditor cannot open cannot exist. The public sees nothing.
  • Uses crypto/EcdhMask's KDF; imports no token module.

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.

Research direction

Start with contracts/src/token/extensions/ConfidentialNoteFungibleTokenAudit.compact and read the crypto/EcdhMask KDF usage described in the issue. Compare the draft work in #679, then verify that _emitAuditedOutput derives the nonce from the audit-key ECDH secret, returns it for the consumer commitment, and emits the encrypted AuditRecord bound to the same output fields.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain, cryptography
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.