EIPs Explained

ERC-7945 · Final · ERC · 2025-05-09

ERC-7945: Confidential Transactions Supported Token

A minimal ERC-20-style interface for fungible tokens whose balances and transfer amounts are encrypted, so wallets and apps can support confidential tokens without tying themselves to one proof system.

What problem does it solve?

On a normal ERC-20 token, every balance and every transfer amount is public. That is a blocker for payroll, treasury management, regulated institutions and many business payments.

Confidential token designs exist (for example the Zether scheme the spec cites), but each project invents its own interface. A wallet cannot easily tell whether a token supports confidential transfers or how to call it. ERC-7945 standardizes only the smallest shared surface in an account-based model, so different encryption schemes, proof systems and compliance workflows can sit behind the same function names.

How it works

Balances, amounts and allowances are opaque bytes. The token decides what they contain (e.g. homomorphic ElGamal ciphertexts) and what _proof must show.

Function Purpose
confidentialBalanceOf(owner) Encrypted balance of an account
confidentialTransfer(to, value, proof) Move an encrypted amount; reverts if the proof fails
confidentialApprove(spender, value, proof) Set aside an encrypted allowance
confidentialAllowance(owner, spender) Remaining encrypted allowance
confidentialTransferFrom(from, to, value, proof) Spend from an allowance

For a Zether-style token, a transfer proof typically shows that the ciphertext is correctly encrypted for sender and recipient, that the hidden amount is non-negative, and that the sender's hidden balance covers it.

confidentialApprove differs from ERC-20 approve: it splits the caller's encrypted balance into an allowance part and the remainder. Calling it again first merges the old allowance back, then sets the new one.

Events ConfidentialTransfer(spender, from, to, value) and ConfidentialApproval(...) mirror ERC-20's. name, symbol and decimals are optional metadata. A confidentialTotalSupply() accessor is optional, because a readable plaintext supply would reveal mint and burn amounts.

Sample code

// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.19;

interface IERC7945 {
    function confidentialBalanceOf(address owner) external view returns (bytes memory);
    function confidentialTransfer(address to, bytes memory value, bytes memory proof) external;
    function confidentialTransferFrom(address from, address to, bytes memory value, bytes memory proof) external;
    function confidentialApprove(address spender, bytes memory value, bytes memory proof) external;
    function confidentialAllowance(address owner, address spender) external view returns (bytes memory);

    event ConfidentialTransfer(address indexed spender, address indexed from, address indexed to, bytes value);
    event ConfidentialApproval(address indexed owner, address indexed spender, bytes currentAllowancePart, bytes allowancePart);
}

Client flow with ethers v6 (encryption and proving come from the token's own SDK):

const encBalance = await token.confidentialBalanceOf(me);
const balance = decryptWithMyKey(encBalance);            // implementation-specific
const { ciphertext, proof } = await prover.transfer(balance, 25n, me, recipientPubKey);
await (await token.confidentialTransfer(recipient, ciphertext, proof)).wait();

Things to know

  • Status: Final. The interface is settled, but the cryptography is entirely implementation-defined, so two compliant tokens can still need different client SDKs.
  • Addresses are still public: this hides amounts and balances, not who transacts with whom. For sender/recipient privacy see the note-based design in ERC-8086.
  • Auditing is possible by also encrypting amounts to auditor keys, without changing the function signatures.
  • A token can implement ERC-20 at the same time ("fat token") and offer functions to move value between plaintext and confidential balances.
  • Mint and burn with plaintext amounts leak information; the spec advises against them.

#token #privacy #confidential #zk #standard

Details

Authors
Siyuan Zheng (@andrewcoder666) <[email protected]>, Zhe Han (@iampkuhz) <[email protected]>, Xiaoyu Liu (@elizabethxiaoyu) <[email protected]>, Wenwei Ma (@madyinglight) <[email protected]>, Jun Meng Tan (@chadxeth) <[email protected]>, Yuxiang Fu (@tmac4096) <[email protected]>, Kecheng Gao (@thanks-v-me-50) <[email protected]>, Alwin Ng Jun Wei (@alwinngjw) <[email protected]>, Chenxin Wang (@3235773541) <[email protected]>, Xiang Gao (@GaoYiRu) <[email protected]>, yuanshanhshan (@xunayuan) <[email protected]>, Hao Zou (@BruceZH0915) <[email protected]>, Yanyi Liang <[email protected]>, Yuehua Zhang (@astroyhzcc) <[email protected]>
Status
Final
Type
Standards Track / ERC
Created
2025-05-09
Requires

Machine-readable: Markdown · JSON