Zecmix: Zcash light-wallet sync and broadcast through the Nym mixnet (local lightwalletd gateway + CLI)

Mission: Build with Nym
GitHub: GitHub - apeirs/zecmix: Zcash light-wallet traffic over the Nym mixnet: local lightwalletd gateway + CLI (sync, broadcast) on nymdial, no nym-socks5-client needed · GitHub (MIT)
Nyx address for rewards: n10c7h7wae558d5zejysktztheca6t3gc3vrnep9

What it does

zecmix puts a Zcash light wallet’s network traffic on the Nym mixnet. It is one Go binary with two parts:

zecmix nym setup                 # starts nym-socks5-client on a random active exit gateway
zecmix gateway                   # local lightwalletd at 127.0.0.1:9067 -> mixnet -> zec.rocks:443
zecmix info / tip / blocks / treestate / tx / send   # lightwalletd calls over the mixnet
zecmix ip                        # shows the IP servers see (a Nym exit gateway)

Any wallet or tool that takes a custom lightwalletd server (zcash-devtool, scripts, SDK-based wallets) can sync and broadcast through the gateway without code changes. The server sees a Nym exit gateway instead of the user’s IP.

The problem it solves

Zcash shields amounts and addresses on chain, but a light wallet still connects to a lightwalletd server. That server learns the wallet’s birthday height, when it syncs, transparent-address queries, and above all which IP broadcast which transaction. ZecHub issue #2219 (“Routing Zcash Wallet Traffic Over the Nym Mixnet”) points at this gap. zecmix closes it with one command, without a VPN, a system-wide proxy, or anyone having to run a dedicated server.

How it uses Nym (real mixnet traffic, not a mock)

  • Drives the official nym-socks5-client (v2026.19). zecmix nym setup asks the Nym API for active exit gateways whose network requester uses the exit policy, picks one at random, and turns on reply SURBs.
  • The gateway is an HTTP/2 gRPC reverse proxy. A wallet’s calls run as streams over one TLS connection to the public server, inside a single SOCKS5 stream through the mixnet. TLS is end to end, so the exit only relays ciphertext, and gRPC streaming and trailers are preserved.
  • Server names are resolved with DNS-over-HTTPS over the mixnet, then connected by IPv4, so the local resolver never sees them.
  • There is no clearnet fallback. If the mixnet client is down, the CLI refuses to connect and the gateway answers with gRPC UNAVAILABLE.
  • The lightwalletd ports (443, 9067, 8232-8233) are all allowed by Nym’s exit policy.

Proof it works (live mainnet mixnet, 2026-10-11; full logs in the repo’s examples/)

The server sees the exit gateway, not me:

$ zecmix ip
https://api.ipify.org sees this request coming from 185.191.239.61 (2.95s over the mixnet)
= Nym node 3156 (CH, exit gateway: true) in the nym-api node list

lightwalletd over the mixnet:

$ zecmix info
server            zec.rocks:443 (via Nym mixnet, 7.08s)
chain             main
block height      3513917 (estimated 3513918)
$ zecmix blocks tip-9 tip
10 compact blocks 3513908..3513917, 6022 bytes, 8 sapling outputs, 0 orchard + 22 ironwood actions, prev-hash chain linked; 2.20s (zec.rocks:443, via Nym mixnet)

Raw transaction broadcast. No coins move: a real tx that is already mined, then a malformed one. Getting the node’s rejection back proves the full round trip:

$ zecmix send examples/already-mined-tx.hex
REJECTED  zec.rocks:443  code -25  4.80s  failed to validate tx: WtxId("private"), error: transaction is already in state    (via Nym mixnet)
$ zecmix send examples/invalid-tx.hex
REJECTED  zec.rocks:443  code -22  7.24s  parse error: invalid consensus branch id    (via Nym mixnet)

A real light wallet syncing through the gateway. This is unmodified zcash-devtool, which has no Nym support of its own:

$ zcash-devtool wallet -w ./w sync -s 127.0.0.1:9067
... Sapling tree has 1128 subtrees / Orchard tree has 770 subtrees / Ironwood tree has 11 subtrees
... Scan complete for range ChainTip(3513850..3513951); progress is 76/76
(gateway log: 10 calls, GetTreeState, GetSubtreeRoots, GetBlockRange, ..., all grpc-status=0 via mixnet)

The wallet was fully scanned at the tip (3,513,950) about 11 seconds after the sync started. Round trips take about 1 to 3 s once connected.

Current progress

  • v0.1.0 is working and published as a single Go binary: mainnet and testnet, a plaintext or TLS local listener, --dns doh|exit, JSON output.
  • Offline tests use a fake SOCKS5 proxy, a fake DoH resolver and a fake TLS lightwalletd. They check that nothing is resolved locally, that neither the CLI nor the gateway falls back to clearnet, that no forwarding headers leak, and that gRPC streams and error codes pass through. There is also an opt-in live test through the real mixnet.
  • The README has an honest threat model. For example, calls in one gateway session are linkable to each other (not to you), and transparent transaction data stays public.
  • Prior art is credited. nym-zcash-grpc-demo needs a dedicated proxy server next to lightwalletd, and Zingo is adding its own Mixnet Mode (Zingo users should use that). zecmix is the wallet-agnostic option: it needs no extra server and adds a scriptable CLI.

Future plans

  • Split mode: broadcasts on a separate connection and mixnet identity from the sync session, with an optional random delay before broadcast.
  • A native nym-sdk build, so no separate client binary is needed.
  • Packaged builds, a systemd user unit, and a ZecHub guide that uses zecmix.
  • Full-node P2P (port 8233) via Nym’s IP packet router.
  • zk-nym bandwidth credential support.