OpenZeppelin / OpenZeppelin/compact-contracts
Add Confidential Note Fungible Token Audit extension
Nobody has claimed this yet.
- 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.
_emitAuditedOutputDERIVES the nonce from an ECDH shared secret with the audit key and returns it; the consumer commits exactly that nonce. - It also pushes an
AuditRecordencrypting 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
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/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