ERC-8085 Dual-mode fungible token (Dual-Mode Fungible Tokens)

Draft · Tokens · created 2025-11-15

A standard that lets a single token contract support both a transparent ERC-20 mode and a zero-knowledge-proof-based privacy mode, allowing holders to freely switch their balances between the two modes.

Why it is needed

When creating a new token, a project had to choose one of two options. Using ERC-20, where everything is visible transparently, integrates well with the DeFi ecosystem but offers no privacy at all, while using a pure privacy protocol keeps things private but limits integration with the existing ecosystem. A DAO wants its treasury operations to be visible transparently but wants voting to be anonymous, a company wants its accounting to be auditable and public while keeping payroll payments private, and ordinary users want to participate in DeFi while hiding their personal holdings. The existing wrapper-based privacy pools created two separate tokens, the original token and the wrapped token, splitting liquidity in two, and users had to go through the hassle of unwrapping again to use DeFi. This approach works for tokens that are already deployed, but for tokens being newly issued right now, a better way was needed to build privacy in as a core feature from the start.

What to implement

In depth

Definitions of the two modes

This standard clearly distinguishes between transparent mode and privacy mode. Transparent mode stores balances the standard ERC-20 way, so anyone can look them up with balanceOf(). Privacy mode hides the amount and owner using a cryptographic commitment, recorded in the Privacy State, an authenticated data structure (e.g. a Merkle tree) that tracks them. The value that proves a commitment has already been used is the nullifier, which prevents the same commitment from being used twice. The process of moving value between the two modes is called Mode Conversion, and when converting from privacy to public mode, it must go through BURN_ADDRESS, an unusable elliptic curve point, to be safe.

ERC-20 functions only operate in transparent mode

Implementing this standard requires implementing all of ERC-20, and balanceOf(), transfer(), approve(), and transferFrom() all apply only to transparent mode balances. Privacy mode balances are hidden and are not included in balanceOf(). totalSupply() must return the sum of all transparent balances plus totalPrivacySupply(). Standard ERC-20 Transfer events must also be emitted during mode conversion: toPrivate() emits Transfer(account, address(0), amount), and toPublic() emits Transfer(address(0), recipient, amount).

Supply invariant

An implementation must always maintain totalSupply() == sum(all balanceOf()) + totalPrivacySupply(). totalPrivacySupply() is not computed from commitment values in the Merkle tree (since commitment values are encrypted and cannot be computed), but is tracked separately, incrementing when toPrivate() is called and decrementing when toPublic() is called. If the public mode supply is needed, it can be obtained as totalSupply() - totalPrivacySupply(), so no separate totalPublicSupply() function is provided.

Mode conversion functions and proofType

toPrivate() takes amount, proofType, proof, and encryptedNote, burns the transparent balance, and generates an IZRC20-style privacy commitment. toPublic() takes recipient, proofType, proof, and encryptedNotes (an array), verifies the proof that consumes the privacy note, mints transparent tokens to the recipient, and returns any change as encryptedNotes. The proofType parameter allows an implementation to support multiple proof strategies, for example letting it accept proofs suited to different data structures or optimization strategies, such as an active tree versus an archival tree.

Safely moving value via BURN_ADDRESS

The ZK circuit only enforces the value conservation rule that input amounts must equal output amounts, and has no awareness that the value is moving into public mode. That's why toPublic() requires the first output to be sent to BURN_ADDRESS, which has no owner and can never be used again. For example, taking a note worth 100 as input, outputting 50 to BURN_ADDRESS and 50 in change to the user satisfies the circuit condition (100 = 50 + 50), while the 50 sent to BURN_ADDRESS is permanently unusable, and the contract mints a new public balance of 50 to the user in exchange. This way, total supply stays constant during mode conversion and is only redistributed between modes.

Backwards compatibility with ERC-20 and ERC-8086

This standard inherits from both ERC-20 and ERC-8086 (IZRC20), making it fully backwards compatible. All ERC-20 functions and events operate as-is in transparent mode, so existing wallets, DEXs, and DeFi protocols can use public mode without any modifications. Privacy-related functions and events are provided as-is from ERC-8086's IZRC20, with privacy mode added as an additional, optional feature.

Limitations: new tokens only, exposure on conversion

This standard is not designed to add privacy to already-deployed tokens, but to build privacy in from the start for newly issued tokens. Also, privacy mode balances cannot interact directly with DEXs or DeFi, so using DeFi requires first converting via toPublic(), and this conversion process has the limitation of revealing the amount in an on-chain event.

Proposal status

This standard is a Draft proposal written in November 2025, has not yet been finalized, and its content may change or discussion may stall.

Things to watch out for

Original ERC · ← ERCs