ERC-7984 Confidential fungible token

Draft · Tokens · created 2025-07-03

A standard that lets accounts send and receive tokens and delegate transfer authority to third parties under an account-based model, while hiding transfer amounts and balances from the public using bytes32 pointers.

Why it is needed

With existing fungible tokens like ERC-20, every account's balance and transfer amount is fully exposed on the blockchain for anyone to query. However, for use cases that must not reveal amounts, such as payroll, institutional settlement, or confidential DeFi, this transparency becomes an obstacle rather than a benefit. To address this, tokens are being built that hide amounts using different confidentiality technologies such as fully homomorphic encryption (FHE), zero-knowledge proofs, and secure enclaves, but without a common interface, each project ends up representing balances and transfers in its own way, forcing wallets, exchanges, and DeFi protocols to write separate integration code for every token.

What to implement

In depth

Pointer-based amounts

In this standard, every amount is represented as a bytes32 pointer. The pointer is not an actual numeric value but merely a reference indicating that the value is stored somewhere on-chain or off-chain, and the way the pointer is resolved and manipulated differs by implementation. This design exists so that implementations using different privacy technologies, such as FHE (fully homomorphic encryption), zero-knowledge proofs, and secure enclaves, can all comply with the same interface.

Basic information lookup and ERC-165

Compliant tokens must implement ERC-165, and supportsInterface must return true for interface ID 0x4958f2a4. name(), symbol(), and decimals() return the token's name, symbol, and decimal places as a plaintext uint8, respectively. contractURI() returns the token's metadata URI, and it is recommended to follow the ERC-7572 schema. confidentialTotalSupply() and confidentialBalanceOf(account) return the total supply and per-account balance, respectively, as bytes32 pointers.

Operator model

Calling setOperator(operator, until) grants operator the authority to transfer tokens on the caller's behalf until the plaintext uint48 timestamp until. While authorized, the operator can transfer the holder's tokens with no amount limit, and a single account can have multiple operators at once. isOperator(holder, spender) checks whether the authorization is currently valid. A time-limited approach is used instead of an ERC-20-style approve with an amount limit, in order to remove the burden on external confidential computation systems of having to track approved amounts.

Confidential transfer function family

The confidentialTransfer(to, amount) overload, and the one that also takes data, move an amount from the caller's own balance to to, and may revert if the balance is insufficient. confidentialTransferFrom(from, to, amount) is a function where an operator moves funds from from's balance to to, and it must revert if the caller is not an operator for from. The data parameter is for implementation-specific information such as cryptographic proofs, and all transfer functions return a pointer to the amount actually moved.

AndCall callback flow

Functions in the confidentialTransferAndCall family invoke a callback on the to address after the transfer logic completes. If to has no code, the callback is treated as succeeding with no action. If it has code, onConfidentialTransferReceived is called with the operator, from, the actual amount transferred, and callData; if this call reverts, the entire transaction reverts. If the callback returns false, the token contract attempts to send the received tokens back to the original sender, but this return can fail if the receiving contract has already spent the tokens inside the callback.

Event

ConfidentialTransfer must be emitted every time a confidential balance changes, including transfers of zero amount, and from must be the zero address on minting while to must be the zero address on burning. OperatorSet must be emitted whenever the expiration time is set for a holder/operator pair, including via a setOperator call. AmountDisclosed may be emitted when a pointer-based amount is converted to a disclosed value via an implementation-specific mechanism.

Technology-agnostic design and proposal status

Making amount a bytes32 pointer rather than a number is a choice meant to keep the interface compatible regardless of which confidential technology is used, whether FHE, zero-knowledge proofs, or secure enclaves. This proposal is still in Draft status, so the detailed rules may change or discussion may stall.

Things to watch out for

Original ERC · ← ERCs