---
eip: 8085
label: ERC-8085
title: Dual-Mode Fungible Tokens
status: Draft
type: Standards Track
category: ERC
created: 2025-11-15
requires: 20, 8086
official: https://eips.ethereum.org/EIPS/eip-8085
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8085.md
canonical: https://eips.huatuo.xyz/eip-8085/
lang: en
tldr: A token design where one contract holds both a normal ERC-20 balance and a zk-SNARK-shielded balance, letting holders move value between public and private mode without a separate wrapped token.
tags: [privacy, token, zk-snark, erc-20, shielded]
---

# ERC-8085: Dual-Mode Fungible Tokens

> Fungible tokens supporting both transparent (ERC-20) and privacy-preserving (zk-SNARK) modes with seamless conversion

**TL;DR:** A token design where one contract holds both a normal ERC-20 balance and a zk-SNARK-shielded balance, letting holders move value between public and private mode without a separate wrapped token.

## What problem does it solve?

A new token usually has to pick one of two options: [ERC-20](/eip-20/), which plugs into every wallet and DEX but exposes every balance and transfer, or a privacy protocol, which hides activity but lives apart from DeFi. Wrapping a public token into a privacy pool works, but creates a second token, splits liquidity and adds unwrap friction.

ERC-8085 proposes a "dual-mode" token: a single contract and a single address, where each holder chooses per use whether value sits in **transparent mode** (plain ERC-20) or **privacy mode** (shielded notes based on [ERC-8086](/eip-8086/)).

## How it works

- The contract implements both `IERC20` and the ERC-8086 privacy interface `IZRC20`.
- **ERC-20 functions only see public balances.** `balanceOf`, `transfer`, `approve` and `transferFrom` behave exactly as normal. Private holdings never appear in `balanceOf`.
- **`toPrivate(amount, proofType, proof, encryptedNote)`** burns public tokens (emitting `Transfer(account, 0x0, amount)`) and inserts a hidden commitment, proven correct with a zk-SNARK.
- **`toPublic(recipient, proofType, proof, encryptedNotes)`** spends private notes (marking their nullifiers as used) and mints public tokens to `recipient` (emitting `Transfer(0x0, recipient, amount)`).
- **Supply invariant:** `totalSupply() == sum(balanceOf) + totalPrivacySupply()`. `totalPrivacySupply()` is a running counter updated on conversions, so only the aggregate private supply is visible.
- Private-to-private transfers use the `IZRC20` transfer inherited from ERC-8086. `proofType` lets an implementation support several proof/tree variants.

The key safety rule: when converting to public, the circuit must send the converted amount to a provably unspendable `BURN_ADDRESS` note. Otherwise the same value could be spent again privately, minting tokens out of nothing.

## Sample code

User flow with ethers v6. Proofs are generated off-chain by the implementation's prover; the snippet only shows the contract calls:

```ts
import { Contract, parseUnits } from "ethers";

const abi = [
  "function balanceOf(address) view returns (uint256)",
  "function totalSupply() view returns (uint256)",
  "function totalPrivacySupply() view returns (uint256)",
  "function toPrivate(uint256 amount, uint8 proofType, bytes proof, bytes encryptedNote)",
  "function toPublic(address recipient, uint8 proofType, bytes proof, bytes[] encryptedNotes)",
];
const token = new Contract(tokenAddress, abi, signer);

// shield 100 tokens
const amount = parseUnits("100", 18);
const { proof, encryptedNote } = await prover.proveDeposit(amount); // implementation-specific
await token.toPrivate(amount, 0, proof, encryptedNote);

// later: unshield to a fresh address for DeFi use
const out = await prover.proveWithdraw(parseUnits("40", 18));        // implementation-specific
await token.toPublic(freshAddress, 0, out.proof, out.encryptedNotes);
```

## Things to know

- **Status: Draft**, and it depends on [ERC-8086](/eip-8086/), also a Draft. Interfaces and circuits may change.
- It is aimed at **new** tokens. Existing tokens cannot gain a privacy mode this way; wrapper-based pools fill that role.
- Conversions are public: the amount and the recipient of `toPublic` are visible on-chain, which limits privacy around entry and exit.
- DeFi only sees public balances. You must convert to public before trading or lending.
- Security rests on the verifier and circuits, especially nullifier uniqueness and the burn-address check. Treat any implementation as unaudited until proven otherwise.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8085
