Inspiration

In emerging markets like Nigeria and across sub-Saharan Africa, millions of micro, small, and medium enterprises (MSMEs) run thriving daily businesses through Point-of-Sale (POS) terminals, mobile money agents, and digital banks. Despite processing millions of Naira monthly, over 80% remain unbanked or credit-ineligible by traditional financial institutions.

When informal merchants apply for credit, lenders demand 6–12 months of unshielded bank statements. This creates a severe dilemma:

  1. Trade secrets and supplier pricing leak to third parties and competitors.
  2. Customer identities and sensitive transaction logs are exposed across unencrypted channels.
  3. Legacy credit scoring models fail to capture high-velocity, daily cash-flow realities of informal commerce.

We built VouchZero to bridge this trust deficit. By combining client-side confidential computation with the Midnight blockchain’s dual-state zero-knowledge architecture, merchants can prove their creditworthiness mathematically without revealing a single raw transaction, customer name, or profit margin.


What It Does

VouchZero is a Zero-Knowledge Credit Attestation Engine for informal MSMEs:

  1. Local Statement Ingestion: The merchant imports their raw bank statement (JSON/CSV) or POS settlement export. The file is parsed 100% locally in browser RAM.
  2. Private Witness Compilation: The engine computes key underwriting metrics without transmitting data over the network:
    • 90-Day Turnover: ( \text{Turnover}{90d} = \sum{i=1}^{n} \text{Inflow}_i )
    • Active Trading Frequency: Average distinct trading days per month ( \ge d_{\min} )
    • Non-Sufficient Funds (NSF): Count of bounced debit attempts over 90 days.
  3. Compact ZK Circuit Execution: A Midnight Compact DSL smart contract verifies the underwriting rules inside a private circuit:
    • 🥇 Gold Tier: ( \text{Turnover} \ge \text{₦7,500,000} \land \text{ActiveDays} \ge 22 \land \text{NSF} = 0 \implies \text{₦4,000,000 Cap} ) (18.5% p.a.)
    • 🥈 Silver Tier: ( \text{Turnover} \ge \text{₦3,500,000} \land \text{ActiveDays} \ge 18 \land \text{NSF} \le 1 \implies \text{₦1,500,000 Cap} ) (22.0% p.a.)
    • 🥉 Bronze Tier: ( \text{Turnover} \ge \text{₦1,500,000} \land \text{ActiveDays} \ge 12 \land \text{NSF} \le 2 \implies \text{₦500,000 Cap} ) (26.0% p.a.)
  4. On-Chain Public Badge: Midnight records a verifiable credit badge to the public ledger mapped to the merchant's wallet public key—storing only the approved tier, loan cap, and cryptographic proof commitment.
  5. Instant Lender Underwriting: Lenders look up the merchant's public address on the Lender Desk, verify the immutable on-chain badge, and execute instant loan approval.

How We Built It

  • Smart Contract Layer: Written in Midnight Compact DSL (CreditAttestation.compact), defining private witness structures, public ledger mappings (merchantRegistry: Map<Bytes<32>, AttestationBadge>), and verification transitions (attestCreditworthiness).
  • Client-Side ZK Computation: Implemented an in-browser witness builder and Plonk proof generation pipeline that processes financial exports in ephemeral client memory.
  • Frontend DApp: Built with React 18, TypeScript, TailwindCSS, and Vite, featuring an interactive Merchant Prover Studio, ZK Proof & R1CS Inspector, and a full-featured Lender Underwriting Desk.
  • Backend API & Data Engine: Developed with Node.js, Express, and TypeScript, supporting multi-format financial parsing (POS CSVs, NIBSS JSONs, Open Banking schemas) and Midnight ledger query adapters.

Challenges We Ran Into

  1. Dual-State Architecture Design: Balancing total privacy for sensitive transaction amounts while giving lenders verifiable certainty on-chain required careful design of private witnesses vs. public commitments in Compact.
  2. Handling Unstructured Financial Formats: POS settlements and bank statements vary widely in column naming and date structures across Nigerian institutions; we built a flexible parser that standardizes multi-channel inflows.
  3. ZK Proof Performance: Ensuring the circuit constraints execute efficiently client-side without locking browser UI threads.

Accomplishments That We're Proud Of

  • True Dual-State Privacy: A functional end-to-end flow where sensitive bank records never leave the user's browser, yet lenders can verify credit eligibility with mathematical certainty on Midnight.
  • Real-World Impact: Tackling a genuine $300B+ credit gap for emerging market MSMEs with practical, deployable privacy tech.
  • Clean Full-Stack Architecture: 31/31 passing unit and integration test suites (including Midnight Testnet integration), responsive UI, and a complete Compact smart contract implementation.

Built With

Share this project:

Updates

Submission history