{"eip":7945,"title":"Confidential Transactions Supported Token","description":"Outlines a fungible token interface that hides per-account balances, boosting privacy in dApps","authors":["Siyuan Zheng (@andrewcoder666) \u003czhengsiyuan.zsy@antgroup.com\u003e","Zhe Han (@iampkuhz) \u003chanzhe.hz@ant-intl.com\u003e","Xiaoyu Liu (@elizabethxiaoyu) \u003cjiushi.lxy@antgroup.com\u003e","Wenwei Ma (@madyinglight) \u003chuiwei.mww@antgroup.com\u003e","Jun Meng Tan (@chadxeth) \u003cjunmeng.t@antgroup.com\u003e","Yuxiang Fu (@tmac4096) \u003ckunfu.fyx@antgroup.com\u003e","Kecheng Gao (@thanks-v-me-50) \u003cgaokecheng.gkc@antgroup.com\u003e","Alwin Ng Jun Wei (@alwinngjw) \u003calwin.ng@antgroup.com\u003e","Chenxin Wang (@3235773541) \u003cwcx465603@antgroup.com\u003e","Xiang Gao (@GaoYiRu) \u003cgaoxiang.gao@antgroup.com\u003e","yuanshanhshan (@xunayuan) \u003cyuanshanshan.yss@antgroup.com\u003e","Hao Zou (@BruceZH0915) \u003csitu.zh@antgroup.com\u003e","Yanyi Liang \u003ceason.lyy@antgroup.com\u003e","Yuehua Zhang (@astroyhzcc) \u003cruoying.zyh@antgroup.com\u003e"],"status":"Final","type":"Standards Track","category":"ERC","created":"2025-05-09","requires":[20],"discussionsTo":"https://ethereum-magicians.org/t/interface-of-confidential-transactions-supported-token-contract/23586","repo":"ERCs","label":"ERC-7945","officialUrl":"https://eips.ethereum.org/EIPS/eip-7945","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7945.md","url":"https://eips.huatuo.xyz/eip-7945/","tldr":{"en":"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.","ja":"残高と送金額が暗号化された代替可能トークンのための、最小限の ERC-20 風インターフェース。ウォレットやアプリが、特定の証明システムに縛られることなく機密トークンに対応できる。","ko":"잔액과 전송 금액이 암호화된 대체 가능 토큰을 위한 최소한의 ERC-20 스타일 인터페이스. 지갑과 앱이 특정 증명 시스템에 얽매이지 않고 기밀 토큰을 지원할 수 있다.","zh":"一个最小化的、类 ERC-20 的接口，面向余额和转账金额均被加密的同质化代币，使钱包和应用无需绑定某一种证明系统即可支持机密代币。"},"tags":["token","privacy","confidential","zk","standard"],"explainers":{"en":{"lang":"en","tldr":"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.","tags":["token","privacy","confidential","zk","standard"],"related":[20,8086,2612],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7945/","markdown":"## What problem does it solve?\n\nOn a normal [ERC-20](/eip-20/) token, every balance and every transfer amount is public. That is a blocker for payroll, treasury management, regulated institutions and many business payments.\n\nConfidential 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.\n\n## How it works\n\nBalances, amounts and allowances are opaque `bytes`. The token decides what they contain (e.g. homomorphic ElGamal ciphertexts) and what `_proof` must show.\n\n| Function | Purpose |\n| --- | --- |\n| `confidentialBalanceOf(owner)` | Encrypted balance of an account |\n| `confidentialTransfer(to, value, proof)` | Move an encrypted amount; reverts if the proof fails |\n| `confidentialApprove(spender, value, proof)` | Set aside an encrypted allowance |\n| `confidentialAllowance(owner, spender)` | Remaining encrypted allowance |\n| `confidentialTransferFrom(from, to, value, proof)` | Spend from an allowance |\n\nFor 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.\n\n`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.\n\nEvents `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.\n\n## Sample code\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.19;\n\ninterface IERC7945 {\n    function confidentialBalanceOf(address owner) external view returns (bytes memory);\n    function confidentialTransfer(address to, bytes memory value, bytes memory proof) external;\n    function confidentialTransferFrom(address from, address to, bytes memory value, bytes memory proof) external;\n    function confidentialApprove(address spender, bytes memory value, bytes memory proof) external;\n    function confidentialAllowance(address owner, address spender) external view returns (bytes memory);\n\n    event ConfidentialTransfer(address indexed spender, address indexed from, address indexed to, bytes value);\n    event ConfidentialApproval(address indexed owner, address indexed spender, bytes currentAllowancePart, bytes allowancePart);\n}\n```\n\nClient flow with ethers v6 (encryption and proving come from the token's own SDK):\n\n```ts\nconst encBalance = await token.confidentialBalanceOf(me);\nconst balance = decryptWithMyKey(encBalance);            // implementation-specific\nconst { ciphertext, proof } = await prover.transfer(balance, 25n, me, recipientPubKey);\nawait (await token.confidentialTransfer(recipient, ciphertext, proof)).wait();\n```\n\n## Things to know\n\n- **Status: Final.** The interface is settled, but the cryptography is entirely implementation-defined, so two compliant tokens can still need different client SDKs.\n- 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](/eip-8086/).\n- Auditing is possible by also encrypting amounts to auditor keys, without changing the function signatures.\n- A token can implement ERC-20 at the same time (\"fat token\") and offer functions to move value between plaintext and confidential balances.\n- Mint and burn with plaintext amounts leak information; the spec advises against them.\n"},"ja":{"lang":"ja","tldr":"残高と送金額が暗号化された代替可能トークンのための、最小限の ERC-20 風インターフェース。ウォレットやアプリが、特定の証明システムに縛られることなく機密トークンに対応できる。","tags":["token","privacy","confidential","zk","standard"],"related":[20,8086,2612],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7945/","markdown":"## 何を解決するのか\n\n通常の [ERC-20](/eip-20/) トークンでは、すべての残高とすべての送金額が公開されます。これは、給与支払い、トレジャリー管理、規制対象の機関、多くの企業間決済にとって障害です。\n\n機密トークンの設計は存在しますが（たとえば仕様が引用している Zether 方式）、プロジェクトごとに独自のインターフェースが作られています。ウォレットは、あるトークンが機密送金に対応しているかどうか、どう呼び出せばよいかを簡単には判断できません。ERC-7945 は、アカウントベースのモデルで共通する最小限の部分だけを標準化し、異なる暗号方式、証明システム、コンプライアンスのワークフローを同じ関数名の背後に置けるようにします。\n\n## 仕組み\n\n残高、金額、allowance は不透明な `bytes` です。何を含むか（たとえば準同型 ElGamal 暗号文）、そして `_proof` が何を示さなければならないかは、トークンが決めます。\n\n| 関数 | 目的 |\n| --- | --- |\n| `confidentialBalanceOf(owner)` | アカウントの暗号化された残高 |\n| `confidentialTransfer(to, value, proof)` | 暗号化された金額を移す。証明が失敗すると revert する |\n| `confidentialApprove(spender, value, proof)` | 暗号化された allowance を確保する |\n| `confidentialAllowance(owner, spender)` | 残りの暗号化された allowance |\n| `confidentialTransferFrom(from, to, value, proof)` | allowance から支出する |\n\nZether 方式のトークンでは、送金の証明は通常、暗号文が送信者と受信者の両方に対して正しく暗号化されていること、秘匿された金額が非負であること、送信者の秘匿された残高がそれを賄えることを示します。\n\n`confidentialApprove` は ERC-20 の `approve` とは異なります。呼び出し元の暗号化された残高を、allowance の部分と残りの部分に**分割**します。再度呼び出すと、まず古い allowance を元に戻してから、新しいものを設定します。\n\nイベント `ConfidentialTransfer(spender, from, to, value)` と `ConfidentialApproval(...)` は、ERC-20 のものに対応します。`name`、`symbol`、`decimals` はオプションのメタデータです。`confidentialTotalSupply()` アクセサはオプションです。平文で読める供給量は、ミントとバーンの金額を明らかにしてしまうためです。\n\n## サンプルコード\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.19;\n\ninterface IERC7945 {\n    function confidentialBalanceOf(address owner) external view returns (bytes memory);\n    function confidentialTransfer(address to, bytes memory value, bytes memory proof) external;\n    function confidentialTransferFrom(address from, address to, bytes memory value, bytes memory proof) external;\n    function confidentialApprove(address spender, bytes memory value, bytes memory proof) external;\n    function confidentialAllowance(address owner, address spender) external view returns (bytes memory);\n\n    event ConfidentialTransfer(address indexed spender, address indexed from, address indexed to, bytes value);\n    event ConfidentialApproval(address indexed owner, address indexed spender, bytes currentAllowancePart, bytes allowancePart);\n}\n```\n\nethers v6 でのクライアントの流れ（暗号化と証明の生成はトークン独自の SDK が行います）：\n\n```ts\nconst encBalance = await token.confidentialBalanceOf(me);\nconst balance = decryptWithMyKey(encBalance);            // implementation-specific\nconst { ciphertext, proof } = await prover.transfer(balance, 25n, me, recipientPubKey);\nawait (await token.confidentialTransfer(recipient, ciphertext, proof)).wait();\n```\n\n## 知っておくべきこと\n\n- **ステータス：Final。** インターフェースは確定していますが、暗号技術は完全に実装依存なので、準拠した 2 つのトークンが異なるクライアント SDK を必要とすることがあります。\n- アドレスは依然として公開されています。隠されるのは金額と残高であり、誰が誰と取引しているかではありません。送信者・受信者のプライバシーについては、[ERC-8086](/eip-8086/) のノートベースの設計を参照してください。\n- 関数シグネチャを変えずに、金額を監査人の鍵でも暗号化することで、監査が可能になります。\n- トークンは ERC-20 を同時に実装することもでき（「fat token」）、平文の残高と機密残高の間で価値を移す関数を提供できます。\n- 平文の金額でのミントとバーンは情報を漏らします。仕様はそれらを避けるよう助言しています。\n"},"ko":{"lang":"ko","tldr":"잔액과 전송 금액이 암호화된 대체 가능 토큰을 위한 최소한의 ERC-20 스타일 인터페이스. 지갑과 앱이 특정 증명 시스템에 얽매이지 않고 기밀 토큰을 지원할 수 있다.","tags":["token","privacy","confidential","zk","standard"],"related":[20,8086,2612],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7945/","markdown":"## 어떤 문제를 해결하나요?\n\n일반 [ERC-20](/eip-20/) 토큰에서는 모든 잔액과 모든 전송 금액이 공개됩니다. 이는 급여 지급, 트레저리 관리, 규제 대상 기관, 많은 기업 간 결제에 걸림돌입니다.\n\n기밀 토큰 설계는 존재하지만(예를 들어 스펙이 인용하는 Zether 방식) 프로젝트마다 자체 인터페이스를 만듭니다. 지갑은 어떤 토큰이 기밀 전송을 지원하는지, 어떻게 호출해야 하는지 쉽게 알 수 없습니다. ERC-7945는 계정 기반 모델에서 공유되는 가장 작은 표면만 표준화하여, 서로 다른 암호 방식, 증명 시스템, 컴플라이언스 워크플로를 같은 함수 이름 뒤에 둘 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n잔액, 금액, allowance는 불투명한 `bytes`입니다. 그 안에 무엇이 들어가는지(예: 준동형 ElGamal 암호문)와 `_proof`가 무엇을 보여야 하는지는 토큰이 정합니다.\n\n| 함수 | 용도 |\n| --- | --- |\n| `confidentialBalanceOf(owner)` | 계정의 암호화된 잔액 |\n| `confidentialTransfer(to, value, proof)` | 암호화된 금액을 이동. 증명이 실패하면 revert |\n| `confidentialApprove(spender, value, proof)` | 암호화된 allowance를 따로 확보 |\n| `confidentialAllowance(owner, spender)` | 남은 암호화된 allowance |\n| `confidentialTransferFrom(from, to, value, proof)` | allowance에서 지출 |\n\nZether 방식 토큰에서는 전송 증명이 보통 암호문이 발신자와 수신자에 대해 올바르게 암호화되었고, 숨겨진 금액이 음수가 아니며, 발신자의 숨겨진 잔액이 그 금액을 감당할 수 있음을 보여줍니다.\n\n`confidentialApprove`는 ERC-20의 `approve`와 다릅니다. 호출자의 암호화된 잔액을 allowance 부분과 나머지로 **분할**합니다. 다시 호출하면 먼저 이전 allowance를 되돌려 합친 다음 새 것을 설정합니다.\n\n이벤트 `ConfidentialTransfer(spender, from, to, value)`와 `ConfidentialApproval(...)`은 ERC-20의 이벤트와 대응합니다. `name`, `symbol`, `decimals`는 선택적 메타데이터입니다. `confidentialTotalSupply()` 접근자는 선택 사항인데, 평문으로 읽을 수 있는 공급량은 발행과 소각 금액을 드러내기 때문입니다.\n\n## 샘플 코드\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.19;\n\ninterface IERC7945 {\n    function confidentialBalanceOf(address owner) external view returns (bytes memory);\n    function confidentialTransfer(address to, bytes memory value, bytes memory proof) external;\n    function confidentialTransferFrom(address from, address to, bytes memory value, bytes memory proof) external;\n    function confidentialApprove(address spender, bytes memory value, bytes memory proof) external;\n    function confidentialAllowance(address owner, address spender) external view returns (bytes memory);\n\n    event ConfidentialTransfer(address indexed spender, address indexed from, address indexed to, bytes value);\n    event ConfidentialApproval(address indexed owner, address indexed spender, bytes currentAllowancePart, bytes allowancePart);\n}\n```\n\nethers v6를 사용한 클라이언트 흐름(암호화와 증명 생성은 토큰 자체 SDK에서 제공):\n\n```ts\nconst encBalance = await token.confidentialBalanceOf(me);\nconst balance = decryptWithMyKey(encBalance);            // implementation-specific\nconst { ciphertext, proof } = await prover.transfer(balance, 25n, me, recipientPubKey);\nawait (await token.confidentialTransfer(recipient, ciphertext, proof)).wait();\n```\n\n## 알아둘 점\n\n- **상태: Final.** 인터페이스는 확정되었지만 암호 기술은 전적으로 구현이 정하므로, 규격을 따르는 두 토큰이라도 서로 다른 클라이언트 SDK가 필요할 수 있습니다.\n- 주소는 여전히 공개됩니다. 가려지는 것은 금액과 잔액이며 누가 누구와 거래하는지가 아닙니다. 발신자/수신자 프라이버시는 [ERC-8086](/eip-8086/)의 노트 기반 설계를 참고하세요.\n- 함수 시그니처를 바꾸지 않고 금액을 감사자 키로도 암호화하면 감사가 가능합니다.\n- 토큰은 동시에 ERC-20을 구현할 수 있고(\"fat token\"), 평문 잔액과 기밀 잔액 사이에서 가치를 옮기는 함수를 제공할 수 있습니다.\n- 평문 금액으로 발행하고 소각하면 정보가 새어 나갑니다. 스펙은 이를 피하라고 권고합니다.\n"},"zh":{"lang":"zh","tldr":"一个最小化的、类 ERC-20 的接口，面向余额和转账金额均被加密的同质化代币，使钱包和应用无需绑定某一种证明系统即可支持机密代币。","tags":["token","privacy","confidential","zk","standard"],"related":[20,8086,2612],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7945/","markdown":"## 它解决什么问题？\n\n在普通的 [ERC-20](/eip-20/) 代币上，每个余额和每笔转账金额都是公开的。这对工资发放、资金管理、受监管机构以及许多商业支付来说是个障碍。\n\n机密代币的设计已经存在（例如规范引用的 Zether 方案），但每个项目都自创接口。钱包很难判断某个代币是否支持机密转账，也不知道该如何调用。ERC-7945 只标准化账户模型中最小的共同接口，使不同的加密方案、证明系统和合规流程可以放在相同的函数名背后。\n\n## 它如何运作\n\n余额、金额和授权额度都是不透明的 `bytes`。代币自己决定其中包含什么（例如同态 ElGamal 密文），以及 `_proof` 必须证明什么。\n\n| 函数 | 用途 |\n| --- | --- |\n| `confidentialBalanceOf(owner)` | 某账户的加密余额 |\n| `confidentialTransfer(to, value, proof)` | 转移加密金额；证明失败则 revert |\n| `confidentialApprove(spender, value, proof)` | 预留一份加密的授权额度 |\n| `confidentialAllowance(owner, spender)` | 剩余的加密授权额度 |\n| `confidentialTransferFrom(from, to, value, proof)` | 使用授权额度进行支出 |\n\n对于 Zether 风格的代币，转账证明通常要证明：密文已针对发送方和接收方正确加密，隐藏的金额非负，并且发送方隐藏的余额足以支付。\n\n`confidentialApprove` 与 ERC-20 的 `approve` 不同：它把调用者的加密余额**拆分**为授权额度部分和剩余部分。再次调用时，会先把旧的授权额度合并回去，然后再设置新的额度。\n\n事件 `ConfidentialTransfer(spender, from, to, value)` 和 `ConfidentialApproval(...)` 与 ERC-20 的事件相对应。`name`、`symbol` 和 `decimals` 是可选的元数据。`confidentialTotalSupply()` 访问器是可选的，因为可读的明文总供应量会暴露铸造和销毁的金额。\n\n## 示例代码\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.19;\n\ninterface IERC7945 {\n    function confidentialBalanceOf(address owner) external view returns (bytes memory);\n    function confidentialTransfer(address to, bytes memory value, bytes memory proof) external;\n    function confidentialTransferFrom(address from, address to, bytes memory value, bytes memory proof) external;\n    function confidentialApprove(address spender, bytes memory value, bytes memory proof) external;\n    function confidentialAllowance(address owner, address spender) external view returns (bytes memory);\n\n    event ConfidentialTransfer(address indexed spender, address indexed from, address indexed to, bytes value);\n    event ConfidentialApproval(address indexed owner, address indexed spender, bytes currentAllowancePart, bytes allowancePart);\n}\n```\n\n使用 ethers v6 的客户端流程（加密和生成证明来自代币自己的 SDK）：\n\n```ts\nconst encBalance = await token.confidentialBalanceOf(me);\nconst balance = decryptWithMyKey(encBalance);            // implementation-specific\nconst { ciphertext, proof } = await prover.transfer(balance, 25n, me, recipientPubKey);\nawait (await token.confidentialTransfer(recipient, ciphertext, proof)).wait();\n```\n\n## 需要注意\n\n- **状态：Final。** 接口已经确定，但密码学部分完全由实现自行定义，因此两个合规的代币仍可能需要不同的客户端 SDK。\n- 地址仍然是公开的：它隐藏的是金额和余额，而不是谁与谁交易。关于发送方/接收方隐私，请参阅 [ERC-8086](/eip-8086/) 中基于 note 的设计。\n- 通过同时用审计者的密钥加密金额，可以在不改变函数签名的情况下实现审计。\n- 代币可以同时实现 ERC-20（“fat token”），并提供在明文余额和机密余额之间转移价值的函数。\n- 以明文金额铸造和销毁会泄露信息；规范建议避免这样做。\n"}}}
