Zcoin documentation
Zcoin is a privacy-first network for Ecash (ticker E). It does three things: it routes every buy through a Zcash full node so activity is anchored to the Zcash chain, it lets holders convert E directly to ZEC, and it lets holders shield their balances using Zcash's zero-knowledge shielded pools.
These docs describe the design as it will run at launch. Where a parameter is not final it is marked TBA. Where something is not live it is marked Not live.
Project status
NOT_LIVE for every request.| Component | State | Notes |
|---|---|---|
| Website & docs | Live | You're reading it. |
| Explorer | Scaffold | All views render from zero state. |
| Buy router | Spec | Design below; testnet next. |
| Zcash node fleet | Spec | zebrad + lightwalletd. |
| Convert (E→ZEC) | Not live | UI complete, placeholder backend. |
| Shield / Unshield | Not live | UI complete, placeholder backend. |
| Mainnet | Not launched | Parameters TBA. |
Quickstart
Once the network is live, the shortest path from nothing to private ZEC is:
- Get a wallet that supports Ecash and Zcash Unified Addresses. Write down the seed phrase offline.
- Buy E. Your buy is routed through an Zcoin Zcash node; the explorer will show the Zcash txid next to your purchase.
- Shield. Open Shield, choose Orchard, and move your balance into the shielded pool.
- Convert (optional). Open Convert, paste your
u1…address and swap any amount of E for ZEC. - Verify. Look up your Zcash txid in the Zcoin explorer or any Zcash explorer.
Core concepts
Two kinds of value
Zcash, and therefore Zcoin, supports two kinds of value in one ledger:
- Transparent value uses a Bitcoin-style UTXO model. Every input, output and amount is public.
- Shielded value lives in encrypted notes. The chain stores only commitments to notes and nullifiers of spent notes, plus a zero-knowledge proof that everything balances.
Pools
A pool is the set of all value of one kind. Zcash has a transparent pool and shielded pools named after their protocol upgrades: Sprout (legacy, closed to new deposits), Sapling (activated October 2018) and Orchard (activated with NU5 in May 2022). Value moves between pools only through transactions that reveal the amount crossing the boundary, which is why pool totals are public even though individual balances are not.
Anchoring
An Zcoin action is anchored when there is a confirmed Zcash transaction that commits to it. Every buy is anchored by design (see Buy routing). Anchoring gives Zcoin the same finality and censorship resistance as the Zcash chain for those actions.
Units
| Unit | Value |
|---|---|
| 1 E | 108 base units (proposed, mirroring Zcash) |
| 1 ZEC | 100,000,000 zatoshis |
| Zcash target block time | 75 seconds (since the Blossom upgrade) |
The Ecash token (E)
Ecash is the asset you buy, hold, shield and convert. Its uses are:
- Medium of exchange between Zcoin users, transparent or shielded.
- Convertible claim to ZEC via the router, at the quoted rate.
- Router fees are denominated in E.
Supply, issuance schedule and allocation are listed in Tokenomics and are TBA until published.
Architecture
Zcoin is made of four components. Each can be run by Zcoin and, over time, by independent operators.
Wallet
Holds the seed, derives Ecash and Zcash keys, signs orders and builds shielded proofs locally. The router never sees spending keys.
Router
The router accepts signed orders, prices them, holds short-lived locks, and constructs the Zcash transactions that anchor each action. It is stateless with respect to custody: it can build and broadcast but cannot spend user funds without a valid user signature.
Zcash node (zebrad)
Zcoin runs Zebra (zebrad), the Rust Zcash full node, as the canonical source of Zcash chain state and as the broadcaster for routed transactions. zcashd is supported for compatibility while it remains maintained, but new deployments should use Zebra.
lightwalletd
lightwalletd serves compact blocks over gRPC so wallets can scan for their shielded notes without downloading full blocks.
Indexer / Explorer
Reads both Ecash state and Zcash anchors and serves the explorer and the public REST API.
Buy routing lifecycle
The defining property of Zcoin: every buy is routed through a Zcash node. Concretely, a buy is not final until a Zcash transaction committing to it is confirmed.
States
| State | Meaning |
|---|---|
CREATED | Wallet signed an order; router received it. |
QUOTED | Router priced it and returned a quote id with expiry. |
BUILDING | Router's node is constructing the anchoring Zcash transaction. |
BROADCAST | Transaction submitted to Zcash mempool via sendrawtransaction. |
ANCHORED | Zcash tx mined. Ecash credited. Zcash txid linked. |
FINAL | Anchoring tx reached the finality depth (TBA confirmations). |
EXPIRED | Not mined before expiry height; order voided, nothing credited. |
The anchoring transaction
Each anchoring transaction carries a commitment to the order in its memo or an OP_RETURN-style output:
anchor = BLAKE2b-256(
personalization = "Zcoin_Anc",
order_id || buyer_commitment || amount_E || quote_id || ecash_height
)
For privacy, buyer_commitment is a hiding commitment, not the buyer's address. Anyone can verify that an anchor exists for a given order id; only the buyer (or a holder of their viewing key) can link it to themselves.
Expiry
Zcash transactions carry an nExpiryHeight (introduced in Overwinter). The router sets it to a short horizon so stuck orders fail cleanly rather than lingering.
Batching
To keep Zcash fees proportional, the router may batch several orders into one anchoring transaction, with a Merkle root of the order anchors in the memo. Each order's inclusion proof is served by the API.
Converting to ZEC
Convert swaps E for ZEC delivered to an address you control. Open the tool.
Flow
POST /v1/quotereturns a rate, fee breakdown, quote id and expiry.- Wallet signs a lock of
amount_Ereferencing the quote id. - Router builds a ZEC transaction from its liquidity to your destination. For
u1/zs1destinations this creates a shielded output note encrypted to you. - On confirmation, the lock finalises and the E is retired from circulation or returned to the liquidity pool (TBA).
- If the ZEC transaction doesn't confirm before expiry, the lock is released.
Destination rules
| Prefix | Type | Accepted | Privacy |
|---|---|---|---|
u1 | Unified Address (ZIP 316) | Yes (recommended) | Shielded to the best receiver (Orchard first) |
zs1 | Sapling | Yes | Shielded |
t1 / t3 | Transparent P2PKH / P2SH | Yes | Public |
tex1 | TEX (ZIP 320) | Yes | Public, transparent-source only |
zc | Sprout | No | Sprout pool closed to new value |
Shielding deep dive
Shielding moves value from the transparent pool into a shielded pool. After that, transfers between shielded addresses reveal nothing about sender, receiver or amount. Open the tool.
Notes
A shielded note is roughly (diversifier, pk_d, value, rseed) for Sapling, and similar with an extra rho and psi for Orchard. Notes are never published in the clear.
Note commitments
When a note is created the transaction publishes its note commitment cm, a hiding and binding commitment to the note. Commitments are appended to an incremental Merkle tree (depth 32). The tree root at some height is the anchor a spend proves membership against.
Nullifiers
To spend a note you reveal its nullifier nf, computed from the note and your nullifier-deriving key. Nodes reject any transaction whose nullifier has already appeared, preventing double-spends. Because only the owner can compute nf, observers can't tell which commitment was spent.
Zero-knowledge proofs
Each shielded spend and output comes with a zk-SNARK proving, without revealing anything else:
- the spent note's commitment is in the tree at the claimed anchor;
- the spender knows the keys that authorise spending it;
- the nullifier is correctly derived;
- input and output values balance (checked via homomorphic value commitments and a binding signature).
| Sapling | Orchard | |
|---|---|---|
| Activated | Oct 2018 | May 2022 (NU5) |
| Proof system | Groth16 | Halo 2 |
| Trusted setup | Yes (multi-party ceremony) | None |
| Curves | BLS12-381, Jubjub | Pallas, Vesta |
| Transaction unit | Spend + Output descriptions | Actions (one spend + one output each) |
| Zcoin default | Supported | Recommended |
Note encryption
The recipient learns about a new note from an encrypted ciphertext attached to the output. The sender does a Diffie-Hellman key agreement with the recipient's diversified transmission key and encrypts the note plaintext and a 512-byte memo with ChaCha20-Poly1305. Wallets trial-decrypt compact outputs from lightwalletd to find their notes.
What remains visible
- That a transaction occurred, its size, and the number of spends/outputs/actions (padded where possible).
- The fee.
- Amounts crossing between pools (shielding and unshielding).
- Network-level metadata such as your IP address, unless you use Tor or similar.
Addresses
| Network | Prefix | Encoding | Example shape |
|---|---|---|---|
| Ecash transparent | e1 | Bech32m (proposed) | e1q… |
| Ecash shielded | eu1 | Unified-style, Bech32m (proposed) | eu1… |
| Zcash transparent | t1, t3 | Base58Check, 35 chars | t1… |
| Zcash Sapling | zs1 | Bech32, 78 chars | zs1… |
| Zcash Unified | u1 | Bech32m with F4Jumble (ZIP 316) | u1… |
Unified Addresses
A Unified Address bundles several receivers (Orchard, Sapling, transparent) into one string. The sender's wallet picks the most private receiver it supports. Zcoin always prefers the Orchard receiver.
Diversified addresses
One shielded key can generate practically unlimited unlinkable addresses. Give each counterparty its own.
Keys & viewing keys
| Key | Can spend | Sees incoming | Sees outgoing | Share? |
|---|---|---|---|---|
| Seed / spending key | Yes | Yes | Yes | Never |
| Full viewing key (UFVK) | No | Yes | Yes | Auditors only |
| Incoming viewing key (UIVK) | No | Yes | No | Proof of receipts |
| Address | No | No | No | Yes |
Keys derive from a BIP-39 seed using ZIP 32 hierarchical derivation. Zcoin wallets derive Ecash and Zcash keys from the same seed under separate paths (TBA coin type).
Fees
Zcash network fee
Zcash uses the ZIP 317 proportional fee mechanism: fee = 5,000 zatoshis × max(2, logical_actions). A simple shielded transaction costs 10,000 zatoshis (0.0001 ZEC). More inputs and outputs cost proportionally more.
Router fee
A router fee in E covers anchoring and liquidity. Rate TBA. The fee is always shown in the quote before you sign.
Running a node
Anyone can run the Zcash side of the stack. A router node needs zebrad, lightwalletd and the Zcoin router service (TBA, to be open-sourced).
Hardware (Zcash mainnet, approximate)
- 4+ CPU cores, 16 GB RAM
- 300 GB+ SSD (chain grows over time)
- Stable broadband; port 8233/tcp open for Zcash P2P
zebrad
# install (Rust toolchain required)
cargo install --locked zebrad
# generate a config and enable RPC
zebrad generate -o ~/.config/zebrad.toml
# ~/.config/zebrad.toml (excerpt)
[network]
network = "Mainnet"
listen_addr = "0.0.0.0:8233"
[rpc]
listen_addr = "127.0.0.1:8232"
[state]
cache_dir = "/var/lib/zebrad"
zebrad start
lightwalletd
git clone https://github.com/zcash/lightwalletd
cd lightwalletd && make
./lightwalletd --grpc-bind-addr 0.0.0.0:9067 \
--zcash-conf-path ./zcash.conf --data-dir /var/lib/lightwalletd
Zcoin router (placeholder)
# electrocoin-router.toml (proposed)
[zcash]
rpc_url = "http://127.0.0.1:8232"
lightwalletd = "127.0.0.1:9067"
[router]
listen = "0.0.0.0:7400"
batch_window = "TBA"
finality = "TBA"
API reference
Base URL https://api.electrocoin.example/v1 (placeholder). All responses are JSON. Until launch every endpoint returns 503 with code NOT_LIVE.
| Method | Path | Description |
|---|---|---|
| GET | /status | Network height, Zcash tip, router health |
| GET | /blocks?limit=&before= | Paginated blocks, newest first |
| GET | /blocks/{height|hash} | Single block |
| GET | /txs/{txid} | Single transaction |
| GET | /address/{addr} | Transparent balance and history (shielded addresses return 403) |
| GET | /routed?limit= | Recent routed buys with Zcash txids |
| GET | /anchors/{order_id} | Anchor + Merkle inclusion proof |
| POST | /quote | Price an E→ZEC conversion |
| POST | /convert | Submit a signed conversion lock |
| POST | /shield | Relay a wallet-built shielding tx |
| GET | /pools | Transparent / Sapling / Orchard totals |
| GET | /supply | Circulating supply breakdown |
Example: quote
POST /v1/quote
{ "from": "E", "to": "ZEC", "amount": "250.0", "destination_type": "unified" }
200 OK
{
"quote_id": "q_01H…",
"rate": "TBA",
"amount_out": "…",
"fees": { "router_E": "…", "zcash_zat": 10000 },
"expires_at_height": 0
}
Example: current response
503 Service Unavailable
{ "ok": false, "code": "NOT_LIVE",
"message": "Zcoin mainnet has not launched." }
JSON-RPC methods
The router exposes a small JSON-RPC 2.0 interface for operators. Zcash-side calls are passed to zebrad's standard RPC (getblockchaininfo, getrawtransaction, sendrawtransaction, z_gettreestate, …).
| Method | Params | Returns |
|---|---|---|
ec_getinfo | — | Router version, heights, peers |
ec_getorder | order_id | Order state and anchor |
ec_listpending | limit | Orders in BUILDING/BROADCAST |
ec_getanchorproof | order_id | Merkle path to batch root |
ec_getpoolinfo | — | Pool totals |
curl -s -X POST localhost:7400 -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"ec_getinfo","params":[]}'
Error codes
| Code | HTTP | Meaning |
|---|---|---|
NOT_LIVE | 503 | Network not launched |
QUOTE_EXPIRED | 409 | Quote past expiry height |
BAD_ADDRESS | 400 | Destination failed validation |
INSUFFICIENT_FUNDS | 402 | Balance lower than amount + fee |
LIMIT_EXCEEDED | 429 | Above per-conversion limit |
ZCASH_REJECTED | 502 | Zcash node rejected the transaction |
SHIELDED_PRIVATE | 403 | Shielded data can't be queried |
Explorer guide
The explorer shows Ecash blocks, transactions, routed buys and their Zcash anchors. Today it shows the empty chain: height 0, no transactions.
- Search accepts a block height, a 64-hex block hash or txid, or an address. It detects the type automatically.
- Routed buys lists each buy with the Zcash txid that anchored it.
- Shielded pools shows pool totals only; individual shielded balances are private by design.
- Deep links:
explorer.html#/block/0,#/tx/<txid>,#/address/<addr>.
Security model
- Self-custody. Spending keys never leave the wallet. The router can build transactions but can't sign for users.
- Anchoring. Routed buys inherit Zcash's proof-of-work security once anchored.
- Zcash cryptography. Shielding uses Zcash's audited Sapling and Orchard circuits via librustzcash and orchard; Zcoin doesn't write its own circuits.
- Audits. Router and conversion contracts will be externally audited before mainnet; reports will be published here.
- Disclosure. Report vulnerabilities to
security@electrocoin.example(placeholder).
Threat model
| Adversary | Can | Cannot |
|---|---|---|
| Chain observer | See tx existence, fees, pool crossings | See shielded amounts, senders, receivers |
| Malicious router | Delay or refuse orders; censor | Steal funds or forge user signatures |
| Network observer | See your IP talking to a node | Read shielded contents |
| Viewing-key holder | See history covered by that key | Spend |
| Phishing site | Trick you into signing | Anything, if you verify the domain and never paste your seed |
Risks
- Router centralisation at launch: a single operator could halt routing until additional operators join.
- Liquidity risk on conversion: large conversions may be rate-limited or unavailable.
- Smart-contract and implementation bugs.
- Regulatory risk: privacy features may be restricted in some jurisdictions.
- Price risk: E and ZEC are volatile. Nothing here is financial advice.
Tokenomics
We won't publish numbers before they're final. This table will be filled in before genesis.
| Parameter | Value |
|---|---|
| Total / max supply | TBA |
| Initial circulating supply | TBA |
| Issuance schedule | TBA |
| Allocation (community / liquidity / team / treasury) | TBA |
| Vesting | TBA |
| Router fee rate | TBA |
| Decimals | 8 (proposed) |
Governance
Protocol changes will follow a public proposal process (Zcoin Improvement Proposals, "EIPs" in this project's namespace, TBA), modelled on how Zcash uses ZIPs: written proposal, public discussion, reference implementation, then activation. Treasury use, if any, will be published on-chain.
Relationship to Zcash
Zcoin is an independent project. It builds on the open-source Zcash protocol and software (MIT / Apache-2.0 licensed) and uses the Zcash network to anchor activity and deliver ZEC.
- ZEC is the native asset of Zcash. E is the native asset of Zcoin. They are different assets.
- Zcash development is funded by protocol-level issuance decided by the Zcash community. For background, ZIP 1014 (approved Feb 2020, effective from the Canopy upgrade in Nov 2020) split block rewards 80% to miners, 8% to independent grants, 7% to Electric Coin Co. and 5% to the Zcash Foundation for four years. See the Feed for more history.
Glossary
- Anchor (Zcoin)
- A confirmed Zcash transaction that commits to an Zcoin action.
- Anchor (Zcash)
- A note commitment tree root that a shielded spend proves membership against.
- Halo 2
- Recursive proof system used by Orchard; requires no trusted setup.
- lightwalletd
- Server that streams compact blocks to light wallets.
- Note
- A unit of shielded value, encrypted to its owner.
- Note commitment
- Public, hiding commitment to a note, stored in a Merkle tree.
- Nullifier
- Unique tag published when a note is spent, preventing double-spends.
- Orchard
- Zcash's newest shielded pool (NU5, 2022).
- Router
- Zcoin service that turns buys into anchoring Zcash transactions.
- Sapling
- Zcash shielded pool activated in 2018.
- Shielding
- Moving value from the transparent pool into a shielded pool.
- Unified Address
- A
u1…address bundling multiple receivers (ZIP 316). - Viewing key
- Key granting read-only visibility into shielded transactions.
- Zatoshi
- 10-8 ZEC.
- zebrad
- Zcash full node implementation in Rust (Zebra).
- ZIP
- Zcash Improvement Proposal.
FAQ
Why route buys through Zcash at all?
It gives every buy a public, independently verifiable receipt on a proof-of-work chain, and it means Zcoin activity contributes real transactions to Zcash.
Does routing through Zcash make my buy private?
Routing anchors the buy; shielding makes it private. The anchor uses a hiding commitment so it doesn't reveal your address, but for full privacy you should hold and transact in a shielded pool.
Can Zcoin freeze my funds?
Shielded and transparent E are controlled by your keys. The router can refuse to process new orders but cannot move or freeze existing balances.
Why does the explorer show zeros?
Because nothing has launched. We'd rather show an honest zero than simulated activity.
Which Zcash pool should I use?
Orchard. It has no trusted setup and is the default for modern Zcash wallets.
References
- github.com/zcash: Zcash source organisation
- zcash/zips and zips.z.cash: Zcash Improvement Proposals (ZIP 32, 316, 317, 320, 1014)
- Zcash Protocol Specification
- ZcashFoundation/zebra: zebrad full node
- zcash/librustzcash: Rust Zcash libraries
- zcash/orchard and zcash/halo2
- zcash/lightwalletd
- Final text of ZIP 1014 (Zcash Community Forum)