You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ERCS/erc-8289.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ created: 2026-06-16
12
12
13
13
## Abstract
14
14
15
-
This document defines [ERC-8289](./eip-8289.md), a **private-by-default fungible token** for the EVM: the privacy version of [ERC-20](./eip-20.md). Under the hood it uses the Orchard shielded-pool model from the Zcash Protocol Specification (https://zips.z.cash/protocol/protocol.pdf). It keeps the [ERC-20](./eip-20.md) full method surface, but several methods are **private** (holder-only, off-chain) rather than public on-chain reads, and `transfer` / `approve` / `transferFrom` all appear on-chain as the same `transfer` operation. See [Interface Overview](#interface-overview).
15
+
This document defines [ERC-8289](./eip-8289.md), a **private-by-default fungible token** for the EVM: the privacy version of [ERC-20](./eip-20.md). Under the hood it uses the Orchard shielded-pool model from the Zcash Protocol Specification. It keeps the [ERC-20](./eip-20.md) full method surface, but several methods are **private** (holder-only, off-chain) rather than public on-chain reads, and `transfer` / `approve` / `transferFrom` all appear on-chain as the same `transfer` operation. See [Interface Overview](#interface-overview).
16
16
17
17
## Motivation
18
18
@@ -28,7 +28,7 @@ The key words **MUST**, **MUST NOT**, **SHOULD**, **MAY** are interpreted per RF
28
28
29
29
### Underlying Protocol
30
30
31
-
Value is held in shielded notes, not account balances. The note format, nullifiers, commitment tree, note encryption, and action/bundle structure follow the **Orchard shielded pool** in the Zcash Protocol Specification (https://zips.z.cash/protocol/protocol.pdf), adapted here as a per-asset EVM contract verified with Groth16. Field-level formats not repeated below are normative in the [Reference Implementation](#reference-implementation).
31
+
Value is held in shielded notes, not account balances. The note format, nullifiers, commitment tree, note encryption, and action/bundle structure follow the **Orchard shielded pool** in the Zcash Protocol Specification, adapted here as a per-asset EVM contract verified with Groth16. Field-level formats not repeated below are normative in the [Reference Implementation](#reference-implementation).
32
32
33
33
### Interface Overview
34
34
@@ -38,9 +38,9 @@ This section lists **all interfaces** in one place and marks whether each corres
38
38
|---|---|---|---|---|
39
39
|`name()` / `symbol()` / `decimals()`| yes | on-chain | public | Identical to [ERC-20](./eip-20.md)|
40
40
|`totalSupply()`| yes | on-chain | public | Public counter (`mint` − `burn`) |
Every value-changing operation submits a `PrivacyCall` encoding one or more **Orchard actions** (Zcash Protocol Specification, https://zips.z.cash/protocol/protocol.pdf):
132
+
Every value-changing operation submits a `PrivacyCall` encoding one or more **Orchard actions** (Zcash Protocol Specification):
@@ -165,7 +165,7 @@ Without the `pubFields` ↔ calldata equality checks, a valid proof could be rep
165
165
166
166
The bundle-level `bindingSig` MUST be verified over all action nullifiers, commitments, and the operation's `valueBalance` before any state mutation (see Method Semantics for encodings).
167
167
168
-
Note encryption and key derivation follow the Orchard note format in the Zcash Protocol Specification (https://zips.z.cash/protocol/protocol.pdf); exact encodings are in the [Reference Implementation](#reference-implementation).
168
+
Note encryption and key derivation follow the Orchard note format in the Zcash Protocol Specification; exact encodings are in the [Reference Implementation](#reference-implementation).
169
169
170
170
### Method Semantics
171
171
@@ -175,11 +175,11 @@ Identical to [ERC-20](./eip-20.md): public on-chain views.
175
175
176
176
#### `transfer(PrivacyCall) → bool`
177
177
178
-
Spends input Orchard notes (Zcash Protocol Specification, https://zips.z.cash/protocol/protocol.pdf) and creates output notes in a value-conserving action bundle (`valueBalance == 0`). Sender, recipient, and amount MUST remain private. Returns `true` on success; emits `NoteAdded` / `NoteConfirmed`, not `Transfer(from,to,value)`.
178
+
Spends input Orchard notes (Zcash Protocol Specification) and creates output notes in a value-conserving action bundle (`valueBalance == 0`). Sender, recipient, and amount MUST remain private. Returns `true` on success; emits `NoteAdded` / `NoteConfirmed`, not `Transfer(from,to,value)`.
Same Orchard action verification path as `transfer` (Zcash Protocol Specification, https://zips.z.cash/protocol/protocol.pdf), with public `totalSupply` accounting:
182
+
Same Orchard action verification path as `transfer` (Zcash Protocol Specification), with public `totalSupply` accounting:
183
183
184
184
-`mint`: `totalSupply += amount` (`onlyIssuer`); `amount` public, recipient private. Mint MUST use the same anchor / nullifier / spend-auth path as `transfer` (no output-only branch). The circuit MUST constrain the consumed input to `v = 0` so the action represents net inflow; the contract does not read note value directly.
185
185
-`burn`: `totalSupply -= amount`; any holder MAY burn own notes; `amount` public, burner private.
@@ -192,11 +192,11 @@ Same Orchard action verification path as `transfer` (Zcash Protocol Specificatio
192
192
193
193
#### `balanceOf` (off-chain, private)
194
194
195
-
Only the holder can compute their balance by scanning `NoteAdded` events, trial-decrypting Orchard notes (Zcash Protocol Specification, https://zips.z.cash/protocol/protocol.pdf) with their viewing key, and excluding spent nullifiers. There is no on-chain `balanceOf` and no way to query a third party's balance.
195
+
Only the holder can compute their balance by scanning `NoteAdded` events, trial-decrypting Orchard notes (Zcash Protocol Specification) with their viewing key, and excluding spent nullifiers. There is no on-chain `balanceOf` and no way to query a third party's balance.
Approved spending is built on ZIP-32 hierarchical accounts (https://zips.z.cash/zip-0032): each **EOA spender** receives a dedicated subaccount (`account_S`) with its own spending and viewing keys, cryptographically isolated from the owner's main account and from every other spender. This ERC maps [ERC-20](./eip-20.md)`approve` / `transferFrom` onto it as follows:
199
+
Approved spending is built on ZIP-32 hierarchical accounts: each **EOA spender** receives a dedicated subaccount (`account_S`) with its own spending and viewing keys, cryptographically isolated from the owner's main account and from every other spender. This ERC maps [ERC-20](./eip-20.md)`approve` / `transferFrom` onto it as follows:
200
200
201
201
1.**`approve(spender, N)`** — Owner derives an unused ZIP-32 subaccount, funds it with `N` via `transfer(PrivacyCall)`, and delivers that subaccount's spending key to the spender (encrypted off-chain). On-chain: one `transfer`.
202
202
2.**`allowance(owner, spender)`** — Remaining balance of that subaccount, scanned with the subaccount viewing key. No on-chain mapping.
@@ -207,7 +207,7 @@ The allowance ceiling is enforced by the subaccount's actual note balance, not a
207
207
208
208
### Execution Requirements
209
209
210
-
The on-chain state machine follows the Orchard shielded pool (Zcash Protocol Specification, https://zips.z.cash/protocol/protocol.pdf). Implementations MUST:
210
+
The on-chain state machine follows the Orchard shielded pool (Zcash Protocol Specification). Implementations MUST:
211
211
212
212
- Maintain a nullifier set; the same `nf` MUST NOT be spent twice.
213
213
- Maintain an append-only commitment tree; historical roots queryable via `isValidAnchor`.
@@ -220,10 +220,10 @@ The on-chain state machine follows the Orchard shielded pool (Zcash Protocol Spe
220
220
221
221
## Rationale
222
222
223
-
-**Orchard ZK-UTXO model.** Notes, nullifiers, and the commitment tree follow the Zcash Protocol Specification (https://zips.z.cash/protocol/protocol.pdf); this ERC defines the private token interface and per-asset deployment on EVM.
223
+
-**Orchard ZK-UTXO model.** Notes, nullifiers, and the commitment tree follow the Zcash Protocol Specification; this ERC defines the private token interface and per-asset deployment on EVM.
224
224
-**Private [ERC-20](./eip-20.md), not a different asset.** Same method surface; privacy changes openness (public view vs private query vs indistinguishable transfer), not user intent.
225
225
-**One on-chain operation for all movement.** Collapsing `transfer` / `approve` / `transferFrom` removes approval metadata [ERC-20](./eip-20.md) unavoidably leaks.
226
-
-**Approved spending via ZIP-32 subaccounts** (https://zips.z.cash/zip-0032). Each EOA spender gets an isolated hierarchical account instead of an on-chain `allowance` mapping; see Method Semantics.
226
+
-**Approved spending via ZIP-32 subaccounts**. Each EOA spender gets an isolated hierarchical account instead of an on-chain `allowance` mapping; see Method Semantics.
227
227
-**No `approve(contract)`.** A contract has no private key; placing a spending key on-chain would expose it to everyone. Programmable private spending (predicate-authorized notes, MPC custody) is future work, not part of this ERC.
228
228
-**Wallet behavior is out of scope of the on-chain ABI.** Subaccount layout, encrypted key delivery, and note scanning are wallet/SDK responsibilities; a conformant reference is provided in the [Reference Implementation](#reference-implementation).
229
229
@@ -244,16 +244,16 @@ The [Reference Implementation](#reference-implementation) repository includes:
- Cryptographic and wallet formats (key derivation, `perc1` addresses, note encryption, nullifiers, approved-spending packaging): reference libraries and SDK in the same repository.
251
251
252
252
### Related Standards and Protocols
253
253
254
254
-[EIP-20](./eip-20.md): Token Standard — the public fungible token interface that this ERC maps to.
255
-
- Zcash Protocol Specification (https://zips.z.cash/protocol/protocol.pdf): Orchard shielded pool — note commitments, nullifiers, note encryption, and action structure adapted here for EVM Groth16 verification.
256
-
- ZIP-32 (https://zips.z.cash/zip-0032): Shielded Hierarchical Deterministic Wallets — hierarchical account derivation used for per-spender subaccounts in `approve` / `transferFrom`.
255
+
- Zcash Protocol Specification: Orchard shielded pool — note commitments, nullifiers, note encryption, and action structure adapted here for EVM Groth16 verification.
256
+
- ZIP-32: Shielded Hierarchical Deterministic Wallets — hierarchical account derivation used for per-spender subaccounts in `approve` / `transferFrom`.
0 commit comments