Prove accredited investor status without disclosing underlying net worth, personal income, or financial records. Built on the Midnight Network using Compact smart contracts and zero-knowledge proofs.
VentureGate is an institutional zero-knowledge credential verification gateway engineered for private equity syndicates, angel networks, and venture funds. The protocol enables high-net-worth individuals and institutional allocators to mathematically prove compliance with accredited investor standards (e.g., SEC Rule 506(c) thresholds: minimum $1,000,000 net worth or minimum $200,000 annual income) without transmitting tax returns, bank statements, W-2 forms, or identity dossiers to centralized databases.
By decoupling compliance proof generation from plain-text record transmission, VentureGate eliminates high-liability data honeypots, prevents identity theft, and preserves investor sovereignty while providing cryptographically verifiable validity attestations on the Midnight blockchain.
- Live Application: https://venturegate-mid.netlify.app/
- Video Demonstration Walkthrough: https://drive.google.com/file/d/1YtwpQ9pI5BKeaVO3u1MlNxITJrrNdOKG/view?usp=sharing
- Midnight Preprod Contract Address:
8c34b5c05fe7ae32e5de68635a08d670c9a4ff5049ab2c2f76ffc95597b9082e - Midnight Block Explorer: https://preprod.midnightexplorer.com/contracts/8c34b5c05fe7ae32e5de68635a08d670c9a4ff5049ab2c2f76ffc95597b9082e
- Official X (Twitter) Post: https://x.com/itsVentureGate/status/2101975400998212022?s=20
- Source Repository: https://github.com/CodeBugMalik/VentureGate
Under United States SEC Rule 506(c) and equivalent global private placement frameworks, issuers and syndicates must take "reasonable steps to verify" accredited investor status. In traditional workflows, this mandates uploading:
- IRS Form 1040 tax returns and W-2 statements.
- Unredacted brokerage, depository, and cryptocurrency custodial statements.
- Letters from certified accountants, attorneys, or registered investment advisors.
This process introduces severe structural vulnerabilities:
- Critical Honeypots: Centralized compliance portals become high-priority targets for state actors and extortion rings targeting ultra-high-net-worth allocators.
- Identity Theft and Subpoena Exposure: Plain-text financial records stored in third-party cloud buckets remain vulnerable to subpoenas, leaks, insider tampering, and regulatory breaches.
- Operational Friction: Manual document review cycles consume 3 to 5 business days, resulting in missed investment allocations.
VentureGate addresses these deficiencies by shifting computation to the user's secure client environment via the Midnight Network Compact framework:
- Public On-Chain Ledger: The smart contract defines only the regulatory threshold variables (
min_net_worthandmin_income). - Private Local Witness: The investor's actual financial figures (
net_worthandincome) remain strictly in browser WASM memory as unexported witnesses. - Cryptographic Zero-Knowledge Circuit: The Compact smart contract compiler synthesizes an R1CS constraint circuit. The client generates a zk-SNARK proof demonstrating satisfaction of the inequalities
net_worth >= min_net_worthandincome >= min_income. - Discrete Ledger Settlement: Only the validity proof is broadcast across the network. The Midnight runtime validates the proof and commits an unforgeable attestation on-chain.
Selected Category:
- Category: Age / Eligibility Gate (proving threshold criteria without revealing underlying values)
- Secondary Alignment: Confidential Credentials (zero-knowledge compliance attestation)
- The public qualification thresholds set on-chain (e.g., minimum net worth of 1,000,000 and minimum income of 200,000).
- The immutable contract address on Midnight Preprod (
8c34b5c05fe7ae32e5de68635a08d670c9a4ff5049ab2c2f76ffc95597b9082e). - That a proof verification transaction was submitted and finalized in a Midnight block.
- Whether the mathematical proof passed or failed the circuit constraints.
- The gas consumption and DUST fee settlement associated with the state transition.
- The investor's actual liquid net worth (whether it is $1.1M or $500M).
- The investor's exact annual income (whether it is $205,000 or $5,000,000).
- Any identity dossiers, tax documents, account statements, or W-2 attachments.
- The transaction submitter's identity (Midnight does not expose an Ethereum-style
msg.sender). - Linkability between the investor's real-world identity and subsequent transaction executions.
| Domain | Attribute | Visibility | Description |
|---|---|---|---|
| Public State | min_net_worth: Uint<32> |
On-Chain Public | Minimum liquid net worth threshold required for accreditation ($1,000,000). |
| Public State | min_income: Uint<32> |
On-Chain Public | Minimum annual personal income threshold required ($200,000). |
| Public State | min_joint_income: Uint<32> |
On-Chain Public | Minimum joint spousal income threshold ($300,000). |
| Public State | min_qp_capital: Uint<64> |
On-Chain Public | Qualified Purchaser threshold under Section 2(a)(51) ($5,000,000). |
| Public State | verified_investors_count: Counter |
On-Chain Public | Monotonically increasing counter of verified accredited investors. |
| Public State | attestation_registry: Set<Bytes<32>> |
On-Chain Public | On-chain registry of anonymous zero-knowledge attestation commitments. |
| Public State | admin_public_key: Bytes<32> |
On-Chain Public | Syndicate administrator cryptographic public key for governance. |
| Public State | is_paused: Boolean |
On-Chain Public | Emergency circuit breaker governance state. |
| Private Witness | net_worth: Uint<32> |
Device Memory Only | Actual evaluated liquid capital. Never leaves client enclave. |
| Private Witness | income: Uint<32> |
Device Memory Only | Actual verified annual income. Discarded after circuit synthesis. |
| Private Witness | joint_income: Uint<32> |
Device Memory Only | Actual joint household income. Discarded after circuit synthesis. |
| Private Witness | qp_capital: Uint<64> |
Device Memory Only | Actual investable securities portfolio. Discarded after circuit synthesis. |
| Cryptographic Proof | zk-SNARK Output |
On-Chain Public | 256-bit proof verifying inequality assertions without leakage. |
flowchart TD
subgraph ClientEnclave["Investor Local Machine (Browser / 1AM Wallet)"]
W1["Private Liquid Capital (Witness)"]
W2["Private Annual Income (Witness)"]
Prover["Midnight WASM Prover Engine"]
Proof["Synthesized zk-SNARK Proof"]
W1 --> Prover
W2 --> Prover
Prover --> Proof
end
subgraph MidnightNetwork["Midnight Network (Preprod)"]
Contract["Compact Smart Contract<br/>venturegate.compact"]
Verifier["Consensus Verifier Engine"]
LedgerState["Public Ledger<br/>(min_net_worth, min_income)"]
Proof --> Verifier
LedgerState --> Verifier
Verifier -->|Valid Assertion| Contract
end
subgraph InstitutionalConsortium["Private Equity Syndicates & Fund Portals"]
Indexer["Midnight GraphQL Indexer"]
UI["VentureGate Institutional Dashboard"]
Contract --> Indexer
Indexer --> UI
end
VentureGate features an institutional Sovereign Gold and Obsidian Carbon interface engineered specifically for family offices and institutional fund syndicates.
Institutional gateway overview, network connection monitor, protocol metrics, and direct navigation links.
Three-stage protocol breakdown detailing local WASM witness isolation, Compact zk-SNARK proof synthesis, and discrete on-chain attestation.
Direct comparative analysis evaluating attack surfaces, identity liability, and execution turnaround between legacy compliance portals and Midnight zero-knowledge verification.
Interactive dual-column verification console providing real-time circuit simulation, preset test profiles, and direct connection to midnight_prover_daemon.wasm.
The smart contract is written in Compact, Midnight's domain-specific smart contract language for zero-knowledge circuits.
Source file: contracts/venturegate.compact
pragma language_version >=0.22.0;
// Public ledger state: specifies the required accreditation thresholds
export ledger min_net_worth: Uint<32>;
export ledger min_income: Uint<32>;
// Constructor: initializes on-chain thresholds
constructor(initial_min_net_worth: Uint<32>, initial_min_income: Uint<32>) {
min_net_worth = disclose(initial_min_net_worth);
min_income = disclose(initial_min_income);
}
// Circuit: validates private financial witnesses against public requirements
export circuit verify_accreditation(net_worth: Uint<32>, income: Uint<32>): [] {
assert(net_worth >= min_net_worth, "Net worth too low");
assert(income >= min_income, "Income too low");
}
Compiled with Compact compiler compact 0.31.1. Compilation produces:
- Circuit constraint definition (
managed/venturegate/zkir/) - Proving and verification keys (
managed/venturegate/keys/) - TypeScript interface and runtime contract wrappers (
managed/venturegate/contract/)
The test suite exercises end-to-end contract deployment, multi-pathway statutory qualification verification, and rejection of sub-threshold candidates using Midnight's headless test framework and Vitest.
Test Files 1 passed (1)
Tests 7 passed (7)
[PASS] Deploys the contract with VentureGate rules
- Deploys instance with min_net_worth = $1M, min_income = $200k, min_joint_income = $300k, min_qp_capital = $5M
- Verifies ledger state initialization via GraphQL Indexer query
[PASS] Verifies eligibility and registers on-chain attestation for Net Worth pathway
- Witness input: net_worth = $1,500,000 (selected_pathway = 1)
- Evaluates net_worth >= min_net_worth inside ZK circuit
- Registers anonymous commitment in attestation_registry set and increments counter
[PASS] Verifies eligibility and registers on-chain attestation for Individual Income pathway
- Witness input: income = $280,000 (selected_pathway = 2)
- Evaluates income >= min_income inside ZK circuit
- Registers anonymous commitment in attestation_registry set
[PASS] Verifies eligibility and registers on-chain attestation for Joint Spousal Income pathway
- Witness input: joint_income = $350,000 (selected_pathway = 3)
- Evaluates joint_income >= min_joint_income inside ZK circuit
- Registers anonymous commitment in attestation_registry set
[PASS] Verifies institutional Qualified Purchaser ($5M+ capital)
- Witness input: qp_capital = $7,500,000 (selected_pathway = 4)
- Evaluates qp_capital >= min_qp_capital under Section 2(a)(51)
- Registers anonymous commitment in attestation_registry set
[PASS] Fails verification for an investor who does not meet threshold
- Witness input: net_worth = $400,000 (below $1,000,000 threshold)
- Circuit assertion rejects and transaction is safely aborted without state modification
[PASS] Guarantees privacy: asserts witness values are never exposed on-chain or in ledger state
- Decodes public ledger state and asserts private witness keys (net_worth, income, etc.) are absent
- Stringifies raw public indexer payload to confirm 0 bytes of financial witness data ever leak
VentureGate enforces comprehensive automated quality gates, strict typing, circuit compilation, and zero-knowledge verification on every commit and pull request via GitHub Actions.
The primary continuous integration pipeline (.github/workflows/ci.yaml) executes dual parallel jobs on isolated Ubuntu runners:
-
install-and-test:- Toolchain Initialization: Installs Compact compiler
0.31.1viamidnightntwrk/setup-compact-action. - Strict Static Typing: Runs
yarn typecheck(tsc --noEmit) to verify contract wrappers, TypeScript providers, and test suites. - Circuit Synthesis: Compiles
contracts/venturegate.compactviayarn compile, verifying ZKIR circuits and cryptographic proving keys. - Ephemeral Devnet Container Stack: Boots an isolated Midnight container stack (Node
0.22.5, Indexer4.0.2, Proof Server8.0.3) via Docker Compose. - Deterministic DUST Accrual: Synchronizes test wallet and awaits spendable DUST coins via
scripts/wait-for-dust.ts. - Full Integration & Privacy Test Suite: Runs all 7 integration test specs against the live devnet tip via Vitest (
yarn test:local). - Resilient Service Log Capture: Dumps full container logs to
logs/docker-compose.logon failure before container teardown.
- Toolchain Initialization: Installs Compact compiler
-
build-frontend:- Automated Caching: Configures Node.js 22 with dependency caching keyed against
frontend/package-lock.json. - Deterministic Clean Install: Executes
npm cifor repeatable dependency resolution. - Production Bundling: Executes
npm run build(Vite) with WebAssembly and top-level await plugins, generating verified production bundles.
- Automated Caching: Configures Node.js 22 with dependency caching keyed against
-
Security Analysis (
.github/workflows/scan.yaml):- Scans dependencies and actions using
midnightntwrk/upload-sarif-github-action(Trivy, Gitleaks, Zizmor, Scorecard). - Enforces pinned 40-character commit hashes on all GitHub Action references to eliminate supply-chain vulnerabilities.
- Scans dependencies and actions using
- Node.js >= 22.0.0
- Docker Desktop (for local Midnight devnet stack)
- Compact compiler
compact 0.31.1installed in system PATH - 1AM Wallet browser extension configured for Midnight Preprod
git clone https://github.com/CodeBugMalik/VentureGate.git
cd VentureGate
# Install root dependencies
yarn install
# Install frontend dependencies
cd frontend
npm install
cd ..yarn compileTo sync generated proving artifacts into the frontend application:
# Windows PowerShell
Copy-Item -Recurse -Force contracts\managed\venturegate frontend\src\managed
Copy-Item -Recurse -Force contracts\managed\venturegate frontend\public\managed
# Linux / macOS
cp -r contracts/managed/venturegate frontend/src/managed/
cp -r contracts/managed/venturegate frontend/public/managed/cd frontend
npm run devOpen http://localhost:5173 to access the interface.
# Launch Midnight local node, indexer, and proof server
yarn env:up
# Wait for DUST generation
yarn wait:dust
# Execute integration test suite
yarn test:local
# Terminate devnet environment
yarn env:downcd frontend
npm run buildGenerates optimized static assets and WASM binaries in frontend/dist/.
VentureGate/
├── .github/workflows/
│ └── ci.yaml # Continuous Integration test and scan pipeline
├── contracts/
│ ├── venturegate.compact # Compact smart contract and circuit definitions
│ ├── index.ts # Contract bindings and type exports
│ └── managed/venturegate/ # Generated ZK proving keys, circuits, and wrappers
├── frontend/
│ ├── src/
│ │ ├── components/ # Navigation bar, footer, badges, icons
│ │ ├── contexts/ # WalletContext for 1AM and Lace connectors
│ │ ├── lib/ # Midnight SDK provider factory and session handlers
│ │ ├── pages/ # Landing, Verify, Admin Deployer, About
│ │ └── managed/ # TypeScript contract bindings
│ ├── public/
│ │ ├── _redirects # SPA routing rewrite rule
│ │ └── managed/ # Prover key assets served over HTTP
│ ├── netlify.toml # Frontend deployment configuration
│ ├── package.json # Frontend dependencies and npm scripts
│ └── vite.config.ts # Vite configuration with WASM and Top-Level Await
├── scripts/
│ ├── deploy.ts # Automated Preprod deployment script
│ └── wait-for-dust.ts # DUST accrual utility
├── src/
│ ├── config.ts # Network connection definitions (local, preview, preprod)
│ ├── providers.ts # Multi-provider orchestration
│ ├── wallet.ts # Headless Midnight wallet implementation
│ └── test/
│ └── venturegate.test.ts # Integration test specifications
├── sub assets/ # High-resolution application screenshots
├── compose.yml # Local Midnight Docker network compose definition
├── netlify.toml # Root zero-configuration deployment descriptor
├── package.json # Root project configuration
├── vitest.config.ts # Vitest test suite configuration
├── PROPOSAL.md # Comprehensive Hackathon Product Proposal (All 4 Questions)
└── README.md # Documentation and specification
- [PASS] Public GitHub repository: https://github.com/CodeBugMalik/VentureGate
- [PASS] Formal product proposal: PROPOSAL.md answering all 4 required questions (Product, Midnight, Data Model, Mainnet Scope)
- [PASS] Live deployed application: https://venturegate-mid.netlify.app/
- [PASS] Verifiable Preprod contract address:
8c34b5c05fe7ae32e5de68635a08d670c9a4ff5049ab2c2f76ffc95597b9082e - [PASS] Video demonstration: https://drive.google.com/file/d/1YtwpQ9pI5BKeaVO3u1MlNxITJrrNdOKG/view?usp=sharing
- [PASS] CI/CD pipeline configured and passing on GitHub Actions
- [PASS] Test suite passing with 7 comprehensive integration tests including explicit privacy guarantees
- [PASS] Compact smart contract compiled with managed circuit artifacts committed
- [PASS] Clear privacy model specification (observer capabilities vs zero-leak guarantees)
- [PASS] 40+ meaningful commits documenting progressive development history
This project is licensed under the terms of the MIT License. See LICENSE for details.




