ERC-8086 · Draft · ERC · 2025-11-19
ERC-8086: Privacy Token
A minimal interface (IZRC20) for fungible tokens that use commitments, nullifiers and zero-knowledge proofs to hide amounts, senders and recipients, intended as a base for privacy wrappers and dual-mode tokens.
What problem does it solve?
Privacy for fungible tokens on Ethereum is usually built from scratch each time: one protocol wraps DAI into a private version, another builds a token that can switch between public and private modes. Each reinvents the same cryptographic machinery with its own interface, so wallets and indexers cannot support them generically, and every reimplementation is another chance for a security bug.
ERC-8086 standardizes the privacy primitive underneath those designs. It is not a wrapper or a dual-mode token itself, but a foundation they can share.
How it works
The design follows the note/commitment model used by shielded-pool systems:
- Commitments hide value and owner. They are appended to an append-only Merkle tree.
- Notes
(amount, publicKey, randomness)are encrypted off-chain data that let the recipient find and spend their commitment. - Nullifiers are published when a note is spent; the contract records them so the same note can never be spent twice.
- A ZK proof shows the inputs exist in the tree, the spender knows the keys, nullifiers are unused, and inputs equal outputs.
The IZRC20 interface provides:
| Item | Purpose |
|---|---|
mint(proofType, proof, encryptedNote) |
Create value directly in private form |
transfer(proofType, proof, encryptedNotes) |
Private transfer, outputs to recipient and change |
nullifiers(bytes32) |
Whether a nullifier has been spent |
activeSubtreeRoot() |
Current Merkle root for proofs |
privacyConfigURI() |
Link to a JSON file describing circuits, curves, encryption and endpoints |
name/symbol/decimals/totalSupply |
Optional metadata; supply is aggregate only |
Events CommitmentAppended, NullifierSpent, Minted and Transaction give wallets the data to scan for their notes. proofType lets one token route to different circuits.
Sample code
The critical double-spend check every implementation must have:
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;
contract NullifierSet {
mapping(bytes32 => bool) public nullifiers;
event NullifierSpent(bytes32 indexed nullifier);
function _spend(bytes32 nullifier) internal {
require(!nullifiers[nullifier], "Nullifier already spent");
nullifiers[nullifier] = true; // never removed
emit NullifierSpent(nullifier);
}
}
A trimmed Privacy Configuration File (values illustrative):
{
"version": "1.0.0",
"name": "Private Example",
"symbol": "zEX",
"proofSystem": { "protocol": "groth16", "curve": "bn128" },
"treeConfig": { "type": "dual-layer", "levels": 32 },
"circuits": { "TRANSFER": { "proofType": 0, "wasmUrl": "ipfs://...", "zkeyUrl": "ipfs://..." } }
}
Things to know
- Status: Draft. The interface and config schema may still change.
- Unlike ERC-7945, which hides amounts in an account model, this hides sender and recipient too, at the cost of off-chain note scanning and heavier proofs.
- Security depends almost entirely on the circuits: they must enforce value conservation, Merkle membership and nullifier binding, and should be audited with a sound setup ceremony.
- The config-file idea is borrowed from ERC-8004's registration-file pattern.
- Privacy tokens can raise regulatory and compliance questions depending on jurisdiction; get qualified review before deploying.