ERC-7984 · Draft · ERC · 2025-07-03
ERC-7984: Confidential Fungible Token
An ERC-20-like interface where balances and transfer amounts are opaque bytes32 pointers to encrypted or off-chain data, so tokens can move privately while wallets and apps still share one standard.
What problem does it solve?
With ERC-20, every balance and every transfer amount is public. That rules out many real uses: payroll, institutional settlement, confidential DeFi positions. Privacy systems exist (fully homomorphic encryption, zero-knowledge proofs, secure enclaves), but each one invents its own token interface, so wallets and protocols cannot treat confidential tokens generically.
ERC-7984 defines a common interface for account-based confidential tokens that does not care which privacy technology sits underneath.
How it works
The key idea: every amount is a bytes32 pointer (often called a handle) rather than a number. The pointer refers to data stored elsewhere, on-chain or off-chain, and how it is resolved, computed on and decrypted is up to the implementation. The contract shuffles pointers; the privacy system does the arithmetic.
confidentialBalanceOf(account)andconfidentialTotalSupply()return pointers.confidentialTransfer(to, amount)andconfidentialTransferFrom(from, to, amount)take a pointer amount and return a pointer to the amount actually transferred. Implementations may transfer zero rather than revert on insufficient balance, since reverting could leak information. Overloads with an extrabytes datacarry proofs or other mechanism-specific inputs.- Operators instead of allowances:
setOperator(operator, until)authorises an address to move any amount until a timestamp. Tracking encrypted allowance amounts would be costly, so the standard uses time-limited operators. ...AndCallvariants callonConfidentialTransferReceivedon contract recipients. If the receiver returns a pointer tofalse, the token tries to send the funds back.name,symbol,decimals(plaintext) andcontractURI(per ERC-7572) give metadata.- Events:
ConfidentialTransfer(amount as pointer),OperatorSet, andAmountDisclosedwhen a value is deliberately revealed. - Must support ERC-165 with interface ID
0x4958f2a4.
Sample code
Core interface (subset):
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC7984 {
event ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount);
event OperatorSet(address indexed holder, address indexed operator, uint48 until);
event AmountDisclosed(bytes32 indexed handle, uint256 amount);
function decimals() external view returns (uint8);
function confidentialTotalSupply() external view returns (bytes32);
function confidentialBalanceOf(address account) external view returns (bytes32);
function isOperator(address holder, address spender) external view returns (bool);
function setOperator(address operator, uint48 until) external;
function confidentialTransfer(address to, bytes32 amount, bytes calldata data)
external returns (bytes32 transferred);
function confidentialTransferFrom(address from, address to, bytes32 amount)
external returns (bytes32 transferred);
}
Letting a protocol move your tokens for one hour:
token.setOperator(address(dex), uint48(block.timestamp + 1 hours));
Things to know
- Status is Draft.
- The standard only defines the interface. Real confidentiality depends entirely on the backing mechanism and its key management; side channels (such as revert behaviour or gas usage) can leak information.
- An operator can move any amount while approved, so keep
untilshort and only approve trusted contracts. - Callback functions bring the usual reentrancy and gas-griefing risks; use reentrancy guards.
- Addresses, and the fact that a transfer happened, remain public. Only amounts and balances are hidden.