Private payments · zero-knowledge · Apache-2.0

Payments that keep receipts private.

Opacus fuses the proven Monero transaction model (ring-CT semantics, stealth addresses, Pedersen commitments) with Zcash-style Halo2 FCMP++ spend proofs: every spend carries a succinct zero-knowledge proof that its key material belongs to the global set of all wallet keys — and reveals nothing else.

Get started Source on GitHub ↗
2.1 smembership spend proof at 2³² tree depth
2³²note-commitment tree capacity, constant memory
441workspace tests green in CI · zero warnings · clippy -D warnings
0trusted setup — IPA over Pasta (Vesta)
How the privacy works

Three layers of anonymity, one Rust workspace.

No trusted ceremony, no hand-waving: the circuit, the prover and the tree are all in-repo and testable at mainnet scale.

Shield

Outputs are Pedersen commitments appended to a sparse Merkle tree at mainnet depth 2³². The commutative Poseidon tree hash (t=3, x⁵ S-box) removes direction bits from witness paths.

Prove

A single-region Halo2 circuit (FcmpCircuit, 65 rows per permutation) proves in zero knowledge that the spend key is a member of the global tree — revealing only a nullifier.

Settle

Consensus verifies the IPA proof and registers the nullifier: double-spends are impossible, while amounts, recipients and history stay untraceable.

FCMP++-style membership

The spend proves key material belongs to the global set of all wallet keys at depth 2³² — the FCMP++ design — not a small anonymity ring.

Transparent proving system

halo2_proofs 0.3.5 (zcash lineage) with IPA commitments over the Pasta (Vesta) scalar field. No trusted setup — every constraint is auditable.

Constant-memory tree

A sparse Merkle frontier with empty-subtree-root padding computes roots and auth paths in O(leaves + depth) — the naive approach would need ~137 GB of RAM.

Monero atomic swaps

Cross-group Schnorr DLEq proofs, a hashlock state machine (Offered → … → Claimed/Refunded) and a length-prefixed P2P protocol with tamper-evident offer ids — since v0.9 the hashlock is proven in-circuit and CLAIM/REFUND are enforced at consensus level.

Ethereum bridge & wOpacus

Quorum-gated ERC-20 wrapper deployed to Sepolia, EIP-155 signer, Uniswap Router02 calldata builders and a JSON-RPC client — a full DEX/bridge toolchain.

Daemon & CLI out of the box

opacusd runs the net and swap services and hands authenticated connections to the swap plane; opacus-cli drives the shielded wallet — build, prove, self-verify before any state mutation.

Quick start

From clone to shielded node in four commands.

Prerequisites: a recent stable Rust toolchain (rustup) and Git.

$ git clone https://github.com/opacusio/opacus.git
$ cd opacus
$ cargo build --release
$ cargo test --workspace            # 441 tests

# real (non-mock) IPA prover tests:
$ cargo test -p opacus-zk --features real-prover

# run a local swap node (daemon: opacusd):
$ cargo run --release -p opacus-node --bin opacusd

# or a full testnet node via the canonical CLI:
$ cargo run --release -p opacus-cli --bin opacus -- start --network testnet

Prefer mining? opacus-miner ships a PoW engine with stats and config. Ethereum-side contracts build with Foundry: forge test --root contracts.

Architecture

Eleven crates, one clean seam.

opacus-zkHalo2 FCMP++ circuits, Poseidon, sparse frontier, real IPA prover
opacus-walletshielded wallet: build / prove / self-verify zk spends
opacus-cryptokeys, stealth addresses, Pedersen commitments
opacus-consensusblocks & transactions, nullifier-reuse prevention
opacus-bridgeMonero DLEq, atomic-swap FSM, RPC, swap P2P core
opacus-dexEthereum: RLP, ABI, EIP-155, Uniswap calldata, wOpacus
opacus-networkP2P: DLEq handshake, disco gossip, encrypted notes, swap-plane handover, TCP swap node
opacus-nodeopacusd daemon: net + swap services wired, consensus-gated tx submission
opacus-light-clientcompact block state and sync for light clients
opacus-minerPoW mining engine with config and stats
opacus-clicommand-line wallet & node control
Roadmap

Shipped and next.

v0.3 — first public releasezk core, shielded wallet, Monero bridge, DEX toolchain, swap node, wOpacus on Sepolia.
v0.4 — in-circuit value conservationv4 prover bench, README/CHANGELOG refresh, accumulator per the complete FCMP++ design.
v0.5 — opacusd daemon & opacus.iodaemon rename, workspace-wide opacus rebrand, canonical site and release engineering.
v0.6 — networkingpersistent node identity, DLEq-bound authenticated handshake, peer discovery with disco gossip, encrypted note transmission between wallets.
v0.7 — protocol + hardeningauthenticated connections upgrade into the swap plane (NetMsg::Upgrade + attach_swap, wired in opacusd); node identity secret zeroized in memory (non-Copy SecretScalar).
v0.8 — wallet keys, prover & audit hardeningBIP-39 English mnemonics for spending keys (WG-25); PROVER-10S keyset cache — full v4 spend 4.8 s cold / 2.3 s steady-state, inside the 10 s budget (WG-17); DLEq-nonce and handshake replay-cache security fixes; SECURITY.md mainnet gate; wOPACUS contract rebrand.
v0.9 — atomic swaps end to end on testnetin-circuit Poseidon hashlock (WG-26), chain-level CLAIM/REFUND enforcement (WG-27), in-transaction note encryption (WG-29), monerod-facing CLSAG verification (WG-CLSAG); 1551 → 1605 circuit rows at k = 11, ~7.3 ms per 2-input CLSAG verify.
GIP-2 governance — delivered & rehearsed in mainnote-weighted zk voting per GIP-2: wallet-gov bridge at H_open, sealed gossip envelope channel, collector service with close + R1-schema minutes; the scripted N=3 nodes / M=5 wallets rehearsal executed end to end, artifacts pinned by a CI replay test, an offline auditor replays every close.
mainnet — gated on auditan external security audit is REQUIRED before any mainnet use. Testnet keys are throwaway.