OpenZeppelin / OpenZeppelin/compact-contracts

Add Confidential Note Fungible Token Freeze extension

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

Nobody has claimed this yet.

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

Description

🧐 Motivation

Seizure alone is a race: an authority that has decided to claw back a note loses if the owner spends first. Regulated deployments need to stop the note moving before they act on it.

📝 Details

contracts/src/token/extensions/ConfidentialNoteFungibleTokenFreeze.compact

  • Freeze-before-seize: a frozen-nullifier set checked at the owner-spend chokepoint via _assertNotFrozen.
  • A note is frozen by its NULLIFIER. Because nf = H(domain, nonce) depends on the nonce alone, an authority armed by the audit trail derives the target's nullifier without consuming the note — freezing is non-destructive and needs no cooperation from the owner.
  • Seizure of a frozen note still works; only owner-spend paths are blocked.
  • Imports no token module and holds no roles; the consumer gates _freeze / _unfreeze behind its authority.

Landed in #679 (draft). Follow-up: document the authority sequence freeze → finality → seize (freeze only wins if it lands first).

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 by reading contracts/src/token/extensions/ConfidentialNoteFungibleTokenFreeze.compact and the implementation referenced as #679. Document the authority sequence freeze → finality → seize, including that freeze must land before the owner's spend and that seizure remains possible after freezing.

Written by the indexing model from the issue text.

Assessment

Domain
blockchain, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.