ERC-8065 · Draft · ERC · 2025-10-18
ERC-8065: Zero Knowledge Token Wrapper
A draft standard for a permissionless wrapper that adds optional privacy to any existing token: send wrapped tokens to a provable burn address, then later remint them elsewhere with a zero-knowledge proof that breaks the on-chain link.
What problem does it solve?
Ethereum token balances and transfers are fully public. Getting privacy today usually means moving to a dedicated privacy chain or app, which can limit which tokens are supported and how they compose with the rest of DeFi. Token issuers rarely ship privacy-enabled variants of their own tokens.
ERC-8065 defines a Zero Knowledge Token Wrapper. Anyone can wrap an existing token (ETH, ERC-20, ERC-721, ERC-1155, ERC-6909) into a ZWToken that behaves like the original (transferable, tradable, usable in DeFi) but also supports a private burn-and-remint flow modelled on EIP-7503 "zero-knowledge wormholes".
How it works
- Deposit: lock the underlying token and mint ZWToken to a recipient (
deposit). - Burn privately: transfer ZWToken to a provable burn address, an address nobody can operate but whose creator can later prove they derived it. To observers it looks like an ordinary transfer.
- Commitment: the transfer is recorded in a commitment structure, either a contract-maintained Merkle tree (cheaper proofs, more gas per transfer) or protocol-level state such as a block hash (no extra gas, heavier proofs).
- Remint: later, the owner submits a ZK proof against a known commitment showing they control some burnt amount. The contract checks the proof, rejects reused nullifiers, and mints fresh ZWToken to any address, or pays out the underlying token directly when
redeem = true. A relayer can submit the transaction so the user's address never pays gas. - Withdraw: burn ZWToken to get the underlying token back.
For fungible tokens this breaks the traceable flow of funds. For NFTs it can only hide the current holder, since a unique token cannot be mixed.
Interface highlights: deposit, withdraw, remint(to, id, amount, RemintData), getLatestCommitment, hasCommitment, getUnderlying, optional ERC-4626-style preview* functions, and mandatory ERC-165 support. id is 0 for fungible tokens.
Sample code
Wrapping an ERC-20 and checking the result (ethers v6, illustrative):
import { Contract } from "ethers";
const underlying = new Contract(TOKEN, ["function approve(address,uint256) returns (bool)"], signer);
const zw = new Contract(ZWTOKEN, [
"function deposit(address to, uint256 id, uint256 amount, bytes data) payable",
"function previewDeposit(address to, uint256 id, uint256 amount, bytes data) view returns (uint256)",
"function getUnderlying() view returns (address)",
"event Deposited(address indexed from, address indexed to, uint256 indexed id, uint256 amount)",
], signer);
const amount = 1_000n * 10n ** 18n;
await (await underlying.approve(ZWTOKEN, amount)).wait();
// previewDeposit is optional in the standard; wrap in try/catch in real code.
const net = await zw.previewDeposit(me, 0n, amount, "0x"); // after any wrapper fees
await zw.deposit(me, 0n, amount, "0x"); // id = 0 for ERC-20
Generating burn addresses and proofs is implementation-specific (circuits, proverData and relayerData encodings are not standardised).
Things to know
- Status: Draft. Proof systems, burn-address derivation and the encoding of
proverData/relayerDataare left to implementations, so two ZWTokens may not interoperate. - EIP-7503, which inspired the burn-and-remint model, is itself Stagnant; ERC-8065 works at the application layer and does not need a protocol change.
- Privacy depends on user behaviour: use a fresh burn address each time, avoid distinctive amounts, wait between burn and remint, and fetch as much commitment data as possible when proving.
- Fees are implementation-defined and may apply on deposit, remint or withdraw. Events report net amounts.
- ZWToken total supply can exceed the underlying supply temporarily; the surplus corresponds to burnt tokens that can never be redeemed twice thanks to nullifiers.
- Fee-on-transfer and rebasing tokens need special care. Privacy tools can also carry legal and compliance implications that differ by jurisdiction; have them reviewed before deployment.