Overview
Moonveil is a privacy-preserving Layer 2 protocol for Bitcoin, designed to run on Rootstock. It enables users to spend Bitcoin UTXOs privately while preserving Bitcoin’s native script logic (P2PKH, P2SH, etc.) in zero-knowledge circuits.
At its core, Moonveil maps Bitcoin’s UTXO model into a privacy-preserving UTXO pool deployed on Rootstock. Each transaction is a Rootstock transaction that updates two state trees — a UTXO tree and a nullifier tree — ensuring private balance transfers. Users deposit Bitcoin via the Rootstock bridge, mint shielded UTXOs, and privately spend them by generating zero-knowledge proofs of valid Bitcoin script execution.
Vision: To let Bitcoin users enter Moonveil directly via the Rootstock bridge without needing to interact with EVM to offer a Bitcoin → private Bitcion User experience.
Team Background
Mohammed - Github: mohammed7s
An open-source builder focused on zero-knowledge proofs, privacy, and financial systems. Implemented zk-email in o1js and developed openbanking.nr (zk circuits for Open Banking). Contributor at Attested Frontiers, an R&D collective for verifiable attestations, collaborating with cryptographers and smart contract engineers on applied zk research. Experience spans Noir, o1js, Groth16 proving systems, and secure transaction parsing. Currently exploring the emerging BitVM/BitVMX era of Bitcoin, with a focus on extending Bitcoin’s capabilities through verifiable and privacy-preserving systems.
Funding
$60,000 total requested; 20,000 for milestone1
Milestone 1: $20,000
Milestone 2: $20,000
Milestone 3: $20,000
Implementation Strategy
Milestone 1: P2PKH Circuit & Rootstock EVM Verification (Essentials)
Deliverables:
- Implement Bitcoin opcodes needed for P2PKH verification in Noir (OP_DUP, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG, OP_EQUAL)
- Generate and verify Groth16 proofs inside Rootstock EVM contract
- Implement stack-based virtual machine logic
- Basic transaction parsing for P2PKH scripts
KPIs:
- Successful on-chain verification of P2PKH spend.
- Open-source code in GitHub repo.
Milestone 2: Opcode Coverage & P2SH & P2SW (Core Set)
Deliverables:
- Extend Noir circuit to support core opcode set beyond P2PKH (~25 opcodes total)
- Implement support for P2SH script verification with redeem script execution
- Implement support for P2WSH (SegWit)
- Multi-signature support (OP_CHECKMULTISIG) with common configurations
- Enhanced transaction parsing for both legacy and SegWit formats
- Update Rootstock integration to handle all script types
KPIs:
- On-chain verification of both P2SH 2of3 multisig spend.
- On-chain verification of P2WSH script spend
- BIP 143 test vector compliance
- unit tests covering opcodes in the core set
Milestone 3: Shielded Pool Contract & State Management
Deliverables:
- Deploy Rootstock smart contract to manage UTXO tree and nullifier tree.
- Implement shielded transaction pool (privacy pool) for deposits/withdrawals.
- frontend client application for user interaction
KPIs:
- Public testnet deployment of Moonveil state contract.
- e2e flow
- app with bitcoin wallet integration
Technical Specs
Core components:
-
bitcoin-script.nr library
- noir based circuits with groth16 proofs
- Stack-based VM with fixed arrays
- ~25 opcodes covering P2PKH and script support
- Tx parsing (legacy and segwit)
-
Roostock smart contracts
- Shielded pool contract: state tree management, deposit, withdrawal
- ScriptSig proof verifier
-
Frontend Client
- web application
- note management
- tx builder
-
Privacy Architecture
- UTXO tree: sparsed maerkle tree for note commitments
- Nullifier tree: Indexed merkle tree preventing double-spend
Value Prop for Rootstock
- Novel Privacy Solution: First Bitcoin-native privacy protocol on Rootstock, filling critical market gap
- Bitcoin Liquidity Attraction: Direct bridge integration brings Bitcoin holders into Rootstock ecosystem
- Developer Infrastructure: Open-source bitcoin-script.nr library enables new privacy applications
- Technical Leadership: Positions Rootstock as premier platform for Bitcoin ZK innovation
- TVL Growth: Shielded BTC deposits increase total value locked on Rootstock
- Research Contribution: Advances state-of-art in Bitcoin privacy and ZK verification
- Ecosystem Differentiation: Unique selling point versus other Bitcoin Layer 2 solutions
Current Progress & GitHub Repository
Existing Work: shadowBTC Repository (github.com/mohammed7s/shadowbtc)
(Will migrate to MoonVeil repo)
- Experimental Noir circuits for Bitcoin script verification
- Foundation for Moonveil development