๐ฌ 30-Second Demo Video | ๐ Pitch Deck (Google Slides) | ๐ Detailed Flow Explanation
Hackathon Track: Midnight Finance Innovation: First payroll system combining zero-knowledge proofs with machine learning for private income verification
|
Private Salary Management Key Features:
|
Privacy-First Payroll Key Features:
|
ZKML Proof Verification Key Features:
|
๐ฏ See Complete User Journey (Click to Expand)
Company Login โ Deposit Funds โ Add Employees โ Create Recurring Payments
Company Dashboard - Main View
Adding New Employee
Paying Employee
Setting Up Recurring Payments
Employee Login โ View Payment History โ Generate Proof โ Submit to Auditor
Generate Income Proof Form
Proof Generated - Details View
Downloadable PDF Proof
Auditor Login โ Receive Proof โ Validate EZKL โ Sign Attestation โ Earn Fee
- Auditors receive employee proof requests
- Validate EZKL proof structure and history commitment
- Sign attestation with private key
- Earn 60-70% of verification fee + build reputation
Bank/Lender โ Call Smart Contract โ Verify Proof โ Approve Loan
- Banks/landlords call
verifyIncomeProof()on smart contract - Contract returns TRUE/FALSE (threshold met or not)
- Verifier NEVER sees exact salary amount
- Instant verification (~20ms on-chain)
Today's broken income verification:
When employees need to prove income for loans, leases, or credit applications, they must:
- โ Share exact salary amounts with third parties
- โ Provide full bank statements and payment history
- โ Trust that verifiers won't misuse or leak their data
- โ Accept document fraud risks and manual processing delays
The privacy crisis:
- Employees lose control over sensitive financial data
- Companies face data breach liability and compliance costs
- Verifiers spend 3-5 days manually reviewing documents
- Everyone trusts paper/PDFs that can be forged
zkSalaria lets employees prove income requirements without revealing exact amounts.
Traditional Way (BAD):
Alice โ Bank: "Here's my salary: $7,500/month" + paystubs
Bank sees: EXACT AMOUNT ($7,500)
Privacy: โ NONE
zkSalaria Way (GOOD):
Alice โ zkSalaria: "I earn โฅ $4,000/month" + ZK Proof
Bank sees: THRESHOLD MET (โฅ $4,000)
Privacy: โ
Exact amount hidden ($7,500 never revealed)
Trust: โ
Cryptographic proof (no documents needed)
Result: Alice gets loan approval while keeping her exact salary private.
What you get:
- โ Privacy-first payroll: Receive salary payments with fully encrypted amounts on-chain
- โ Selective disclosure: Prove "I earn โฅ $4,000/month" without revealing exact salary
- โ Reusable proofs: Generate one proof, use for multiple verifiers (loans, leases, credit)
- โ No document fraud: Cryptographic proofs can't be forged or tampered with
- โ Instant verification: Get approved in seconds instead of waiting 3-5 days
Why it matters: Traditional income verification requires sharing exact salary details with banks, landlords, and lenders. This creates privacy risks, identity theft exposure, and loss of control over sensitive data. zkSalaria gives you cryptographic income proofs that protect your privacy while meeting verifier requirements.
What you get:
- โ Complete privacy: All company balances and payment amounts encrypted on-chain
- โ Zero data breach liability: Employee data never leaves their control
- โ Automated recurring payroll: Set up weekly/bi-weekly/monthly salary payments
- โ Compliance-friendly: Encrypted payment history for audit purposes
- โ No verification burden: Employees handle their own income proofs
Why it matters: Payroll data breaches cost companies millions in lawsuits, regulatory fines, and reputation damage. zkSalaria eliminates this risk by keeping all financial data encrypted on-chain. Companies can run payroll privately while enabling employees to verify income independently.
What you get:
- โ 99% cost reduction: Instant cryptographic verification vs. 3-5 days manual review
- โ No document fraud: Mathematical proofs can't be forged like paystubs/W-2s
- โ Instant results: Verify income eligibility in real-time via smart contract
- โ Zero liability: No sensitive data to store, no breach risk
- โ Flexible requirements: 4 proof types for different use cases
Why it matters: Manual income verification is slow (3-5 days), expensive (staff costs), and risky (document fraud). zkSalaria provides instant, cryptographically certain verification with zero fraud risk and minimal cost.
What you get:
- โ New revenue stream: Earn fees for verifying ZKML proofs (~60-70% of proof value)
- โ Automated workflow: Verify proofs in ~30 seconds (vs. 30 minutes manual review)
- โ Remote work: Software-based verification from anywhere
- โ Reputation marketplace: Build on-chain reputation score (0-1000 scale)
- โ High throughput: Process 60-120 proofs per hour with EZKL automation
Why it matters: Traditional income verification is manual, time-consuming, and low-margin. zkSalaria creates a new verification marketplace where auditors provide cryptographic attestations, earn reputation-based fees, and scale through automation. High-reputation auditors command premium fees and higher volume.
Auditor Incentives:
- Direct fees: Earn 60-70% of proof lifecycle value
- Reputation multiplier: Higher reputation = premium fees
- Market dynamics: Compete on speed, quality, and specialization
- Future evolution: Transition to value-added services as verification becomes trustless
โโโโโโโโโโโโ
โ Company โ Deposits funds โ zkSalaria Contract
โโโโโโฌโโโโโโ
โ Pays $7,500/month (ENCRYPTED)
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Blockchain โ Stores:
โ (Midnight) โ - Company balance: ENCRYPTED โ
โ โ - Employee balance: ENCRYPTED โ
โ โ - Payment amount: ENCRYPTED โ
โ โ - Payment history: ENCRYPTED (12 months) โ
โโโโโโโโโโโโโโโโโโโโ
Key Privacy: All amounts encrypted. Nobody (not even validators) can see exact salaries.
โโโโโโโโโโโโ
โ Employee โ Fetches encrypted payment history
โโโโโโฌโโโโโโ
โ Decrypts locally (data never leaves machine)
โผ
โโโโโโโโโโโโโโโโโโโโ
โ EZKL ZKML Model โ Runs on employee's machine
โ (ONNX Neural Net)โ Generates ZK proof in ~0.5 seconds
โโโโโโฌโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Income Proof Generated โ
โ Type 1: Threshold โ "I earn โฅ $4,000/month"
โ Type 2: Range โ "I earn $8K-$10K/month"
โ Type 3: Average โ "Avg income โฅ $11K/month"
โ Type 4: Credit Score โ "Payment score โฅ 600"
โโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โ Sends to Auditor
โผ
โโโโโโโโโโโโโโโโ
โ Auditor โ Validates EZKL proof
โ (Deloitte) โ Signs attestation
โโโโโโฌโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโ
โ Employee โ Submits proof + auditor signature
โโโโโโฌโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ zkSalaria Contract โ Validates:
โ (Midnight Blockchain) โ โ Auditor is trusted (whitelist)
โ โ โ History commitment matches blockchain
โ โ โ Proof type valid (1-4)
โ โ โ No replay attack
โ โ
โ โ Updates auditor reputation:
โ โ - total_verifications++
โ โ - score = (โ/total) ร 1000
โ โ
โ โ Stores proof โ
โโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โ Later: Bank verifies
โผ
โโโโโโโโโโโโโโ
โ Bank โ Calls: verifyIncomeProof()
โ โ Returns: โ
TRUE (threshold met)
โ โ
โ โ Bank NEVER sees exact salary!
โโโโโโโโโโโโโโ
Prevents fake payment data
// Smart contract verifies:
computed_commitment = hash(on-chain_payment_history)
if (proof.history_commitment != computed_commitment) {
return false; // REJECTED - Employee tried to use fake data!
}
Incentivizes honest behavior
- Starts at 1000/1000 (perfect score)
- Each verification updates:
score = (successful / total) ร 1000 - High reputation = more clients = more revenue
- Bad auditors lose reputation and market access
Licensed professionals with liability
- Auditors are licensed CPAs/firms (stored: license #, name, type)
- Can be sued for fraud
- Professional licenses can be revoked
- Real-world legal consequences
Admin control over auditor access
- Only whitelisted auditors can verify proofs
- Misbehaving auditors can be deactivated instantly
- Company/governance controls who can verify
Payment Data Integrity:
- โ History commitment binding - Employee CANNOT use fake payment data
- โ On-chain verification - Proof must match actual blockchain payment history
- โ Tamper-proof - Cryptographic hash prevents data manipulation
This is the MOST critical protection - prevents the highest-risk fraud vector (fake salary claims).
Auditor Verification Enforcement:
โ ๏ธ Gap: Auditor could theoretically sign without checking EZKL proof validityโ ๏ธ No on-chain verification - Contract trusts auditor's signature (doesn't verify proof math on-chain)
Why This Gap Exists:
- Midnight blockchain doesn't yet support pairing functions (BLS12-381, KZG verification)
- On-chain EZKL verification requires cryptographic primitives not available in Compact
Why This Is Acceptable for MVP:
-
Reputation System (Economic Incentive)
- Lazy auditor gets caught via sample audits, disputes, pattern analysis
- Reputation score drops โ Less clients โ Less revenue
- Market forces punish dishonest behavior
-
Legal Accountability (Real-world Consequences)
- Licensed CPAs have professional liability insurance
- Can be sued for negligence/fraud ($millions in damages)
- Criminal prosecution for intentional fraud
- Professional licenses revoked (career-ending)
-
Admin Controls (Governance Layer)
- Misbehaving auditors deactivated immediately
- Community governance enforces quality standards
- Random sample audits catch lazy verifiers
-
History Commitment Still Protects (Cryptographic Fallback)
- Even if auditor doesn't verify proof, they can't fake payment data
- Employee must use real blockchain history
- Most fraud vectors still prevented
Risk Assessment:
Worst case scenario: Auditor signs invalid proof
- Employee still can't fake payment amounts (history commitment prevents this)
- Auditor faces reputation loss, legal liability, deactivation
- Probability: LOW (strong disincentives)
- Impact: MEDIUM (proof may not meet threshold, but no fake data)
- Overall Risk: ACCEPTABLE for MVP
When Midnight adds cryptographic primitives:
- โ BLS12-381 pairing operations
- โ KZG commitment verification
- โ On-chain SNARK verifiers
Then:
Employee โ EZKL Proof โ Smart Contract Verifier โ โ
Cryptographically Verified
โ
(No auditor needed - pure math!)
Benefits:
- โ Auditor CANNOT skip verification (on-chain enforcement)
- โ Zero trust assumptions (fully cryptographic)
- โ Auditors evolve to value-added services (compliance, model validation)
Timeline: See Evolution Roadmap
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend (React + Material-UI) โ
โ - Company dashboard, employee portal, auditor selection โ
โ Status: Work in Progress โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API Layer (TypeScript + RxJS) โ
โ - Type-safe contract wrapper, reactive state management โ
โ Coverage: 20/20 circuits (100%) โ
โ Status: โ
COMPLETED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Smart Contracts (Compact Language) โ
โ - 13 active circuits, encrypted ledger, multi-party privacy โ
โ Tests: 120 passing + 10 skipped โ
โ Status: โ
COMPLETED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Blockchain (Midnight Network) โ
โ - Privacy-preserving blockchain with zero-knowledge proofs โ
โ Status: โ
TESTNET DEPLOYED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ZKML Layer (EZKL + Python) - PARALLEL EXECUTION โ
โ - 4 ONNX models, ~0.5s proof generation, ~20ms verification โ
โ Tests: 23 E2E tests with real EZKL proofs โ
โ Status: โ
COMPLETED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Install dependencies
npm install
# Compile contracts
npm run compile
# Run tests (130 tests)
npm test
# Start UI (local network)
npm run payroll-ui:localOpen http://localhost:5173 in Chrome with Lace Wallet set to "Undeployed" network.
deposit_company_funds- Company deposits tokens for payrolladd_employee- Onboard employee with employment recordpay_employee- Single payment with encrypted amountwithdraw_employee_salary- Employee withdraws earned salarymint_tokens- Test helper for token creation
create_recurring_payment- Setup automated salary (weekly/bi-weekly/monthly)process_recurring_payment- Execute scheduled paymentpause_recurring_payment- Temporarily suspendresume_recurring_payment- Reactivate paused paymentedit_recurring_payment- Modify amount/schedule
register_trusted_verifier- Whitelist auditor with metadata (name, license, type)submit_income_proof- Employee submits ZK proof with auditor signatureverify_income_proof- Verifier validates proof meets requirements
| Type | Description | Use Case | Example |
|---|---|---|---|
| 1. THRESHOLD | Prove income โฅ amount | Loan approval | "I earn โฅ $4,000/month" |
| 2. RANGE | Prove income in range [min, max] | Credit products | "I earn $8K-$10K/month" |
| 3. AVERAGE | Prove avg income โฅ amount (12 months) | Lease agreements | "Avg income โฅ $11K/month" |
| 4. CREDIT SCORE | Prove ML-calculated score โฅ threshold | Creditworthiness | "Payment score โฅ 600" |
All proofs generated in ~0.5 seconds using EZKL
Unlike traditional systems, zkSalaria can add unlimited new ML models without redeploying smart contracts.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ZKML Models (Off-Chain) - Can be added anytime โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ income_above_threshold.onnx โ
โ โ income_range.onnx โ
โ โ average_income.onnx โ
โ โ credit_score.onnx โ
โ โ pay_bias_detector.onnx โ Add without deploymentโ
โ โ fraud_detection.onnx โ Add without deploymentโ
โ โ income_stability.onnx โ Add without deploymentโ
โ โ [any future model].onnx โ Add without deploymentโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
(EZKL generates ZK proof)
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Smart Contract (On-Chain) - Never needs redeployment โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ Validates proof structure (generic) โ
โ โ Checks auditor signature โ
โ โ Verifies history commitment โ
โ โ Stores proof metadata โ
โ โ
โ Contract is MODEL-AGNOSTIC! โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Why This Matters:
- โ No upgrade risk: Smart contract stays immutable and secure
- โ Fast innovation: Deploy new models in hours, not months
- โ Lower costs: No gas fees for contract redeployment
- โ Backward compatible: Old proofs still work with new models
- โ Auditor specialization: Different auditors can support different model types
Model: pay_bias_detector.onnx
- Use case: Employee proves "I'm paid fairly compared to peers with similar experience"
- Input: Employee's salary, years of experience, job role, industry benchmarks
- Output: ZK proof that compensation is within ยฑ15% of fair market value
- Beneficiary: Employees fighting discrimination, companies proving fair pay practices
Example:
Alice (5 years experience, Software Engineer):
Proof: "My salary is within fair range for my role/experience"
Bank/Court sees: โ
TRUE (compensation is fair)
Bank/Court NEVER sees: Exact salary ($95,000)
Model: fraud_detection.onnx
- Use case: Verifier proves "This income pattern shows no fraud indicators"
- Input: 12 months payment history, timing patterns, amount variance
- Output: ZK proof that fraud score < 0.1 (no suspicious patterns)
- Beneficiary: Lenders avoiding fraudulent loan applications
Fraud Signals Detected:
- Sudden income spikes before loan application
- Round-number payments (e.g., exactly $5,000 every month)
- Irregular payment timing
- Inconsistent employer patterns
Example:
Bob applies for mortgage:
Proof: "My income has fraud_score < 0.1"
Lender sees: โ
TRUE (income pattern is legitimate)
Lender NEVER sees: Individual payment dates or amounts
Model: income_stability.onnx
- Use case: Landlord proves "Tenant's income is stable for next 12 months"
- Input: Payment history, trend analysis, seasonal adjustments
- Output: ZK proof that income_stability_score โฅ 0.85
- Beneficiary: Landlords assessing long-term rental risk
Stability Factors:
- Income trend (increasing/decreasing/flat)
- Payment consistency (variance < 10%)
- Employment duration
- Seasonal income patterns (freelancers, gig workers)
Example:
Carol (freelancer, variable income):
Proof: "My income stability score โฅ 0.85"
Landlord sees: โ
TRUE (income is stable despite fluctuations)
Landlord NEVER sees: Exact monthly amounts or client details
Model: tax_bracket_verifier.onnx
- Use case: Prove "I'm in the 22% federal tax bracket" for tax planning
- Input: Annual income, deductions, filing status
- Output: ZK proof of tax bracket without revealing exact income
- Beneficiary: Financial planners, tax optimization services
Example:
David earns $89,000 (22% bracket):
Proof: "I'm in 22% tax bracket"
Financial advisor sees: โ
Tax bracket confirmed
Financial advisor NEVER sees: Exact income ($89,000)
Model: debt_to_income.onnx
- Use case: Mortgage lender proves "DTI ratio < 43%" without seeing debts or income
- Input: Monthly income, existing debt payments (provided privately)
- Output: ZK proof that DTI < 43%
- Beneficiary: Lenders evaluating mortgage applications
Example:
Emma applies for $400K mortgage:
Proof: "My DTI ratio < 43%"
Lender sees: โ
TRUE (qualifies for mortgage)
Lender NEVER sees: Exact income or debt amounts
Model: employment_continuity.onnx
- Use case: Prove "No employment gaps > 3 months in last 2 years"
- Input: Payment history timestamps, employment records
- Output: ZK proof of continuous employment
- Beneficiary: Employers during hiring, immigration applications
Example:
Frank (job applicant):
Proof: "No employment gaps > 3 months"
Employer sees: โ
TRUE (continuous work history)
Employer NEVER sees: Previous employer names or exact dates
Model: savings_capacity.onnx
- Use case: Investment advisor proves "Client can save โฅ $1,000/month"
- Input: Income history, estimated living expenses (optional private input)
- Output: ZK proof of savings capacity
- Beneficiary: Financial advisors, retirement planning services
Example:
Grace (retirement planning):
Proof: "I can save โฅ $1,000/month for retirement"
Advisor sees: โ
TRUE (can afford retirement plan)
Advisor NEVER sees: Exact income or current savings
Model: multi_employer_aggregator.onnx
- Use case: Gig worker proves "Combined income from all jobs โฅ $5,000/month"
- Input: Payment histories from multiple employers/platforms
- Output: ZK proof of aggregate income
- Beneficiary: Gig workers with multiple income streams
Example:
Hannah (Uber + DoorDash + Upwork):
Proof: "Combined income โฅ $5,000/month"
Lender sees: โ
TRUE (meets income requirement)
Lender NEVER sees: Individual platform earnings or employer count
Model: seasonal_income_normalizer.onnx
- Use case: Seasonal worker proves "Annualized income โฅ $60,000"
- Input: Seasonal payment patterns, work months per year
- Output: ZK proof of normalized annual income
- Beneficiary: Teachers, construction workers, seasonal employees
Example:
Ian (teacher, 9-month salary):
Proof: "Annualized income โฅ $60,000"
Lender sees: โ
TRUE (meets annual threshold)
Lender NEVER sees: Monthly salary or work schedule
1. Train ONNX Model (Off-Chain)
# zkml/payroll/models/pay_bias_detector.py
import onnx
model = train_ml_model(training_data)
onnx.save(model, "pay_bias_detector.onnx")2. Generate EZKL Proof Keys (Off-Chain)
cd zkml/payroll
python generate_all_models.py --model pay_bias_detector
# Creates: pay_bias_detector_pk.key, pay_bias_detector_vk.key3. Deploy via API (No Smart Contract Changes!)
// Employees can immediately use new model
const proof = await generateIncomeProof({
proofType: 5, // NEW: Pay bias detection
threshold: 0.85,
paymentHistory: employeePayments
});
// Auditor validates and signs
await auditor.validateAndSign(proof);
// Submit to SAME smart contract (no redeployment!)
await contract.submit_income_proof(proof);That's it! New proof type available to all users without touching the smart contract.
Traditional Smart Contract Systems:
New feature โ Redeploy contract โ Audit code โ Migrate data โ Risk of bugs
Timeline: 3-6 months
Cost: $50,000 - $500,000 (audit + gas fees)
zkSalaria Modular System:
New ONNX model โ Train & deploy โ Users can immediately use
Timeline: 1-3 days
Cost: $0 (no contract changes)
Benefits for Ecosystem:
- ๐ข Companies: Add custom models for specific industries
- ๐จโ๐ผ Employees: More proof types = more use cases
- ๐ฆ Verifiers: Choose proof types that match requirements
- ๐ Auditors: Specialize in specific model types (fraud, bias, etc.)
- ๐ Network: Faster innovation without governance overhead
zkSalaria/
โโโ payroll-contract/ # Smart contracts (Compact) - 13 circuits
โโโ payroll-commons/ # Shared types and utilities
โโโ payroll-api/ # TypeScript API layer (100% coverage)
โโโ payroll-ui/ # React frontend (Material-UI)
โโโ zkml/ # ZKML proof generation (EZKL)
โ โโโ payroll/ # 4 ONNX income proof models
โโโ zkml-verifier/ # ZKML verification service
โโโ docs/ # Documentation
โโโ technical/ # Implementation specs
โโโ design/ # UI wireframes
# Run all tests (130 tests)
npm test
# Contract tests only
cd payroll-contract && npm test
# API tests
cd payroll-api && npm test
# ZKML tests (requires Python env)
cd zkml/payroll && python test_proof_generation.pyTest Coverage:
- 44 calendar utility tests
- 61 multi-party payroll tests
- 23 ZKML integration tests (E2E with real EZKL proofs)
- 10 batch payment tests (skipped - testnet performance)
Alice needs a $10,000 loan. Bank requires proof of income โฅ $4,000/month.
- Alice requests paystubs from company HR
- HR emails paystubs (security risk!)
- Alice uploads to bank portal
- Bank manually reviews documents
- Alice's exact salary ($7,500) exposed
- โฑ๏ธ 3-5 day wait
- Alice fetches encrypted payment history from blockchain
- Alice generates ZKML proof locally: "I earn โฅ $4,000/month"
- Auditor (Deloitte) validates proof and signs (30 sec)
- Alice submits proof to zkSalaria contract
- Bank calls
verifyIncomeProof()โ โ TRUE - Alice's exact salary ($7,500) stays private
- โก Instant approval
Privacy win: Alice got loan approval without revealing she earns $7,500/month.
Employees
Fee Distribution:
- Auditor: ~60-70% (verification work)
- Protocol: ~25-30% (infrastructure)
- Staking Rewards: ~5-10% (future)
Auditor Earning Potential:
- Throughput: 60-120 proofs/hour (~30 sec each)
- Automation: EZKL handles proof validation
- Reputation multiplier: High reputation = premium fees
- Market competition: Quality, speed, specialization
Why Auditors Participate:
- New revenue stream from emerging market
- Remote, software-based work
- Build reputation in decentralized ecosystem
- Scale through automation (vs. manual review)
See detailed business model โ
Employee โ EZKL Proof โ Auditor Verification โ Contract
โ
(Trust assumption)
Why auditors now: Midnight doesn't yet support pairing functions for on-chain EZKL verification.
Trustless Tier: Basic proofs (Types 1-3) verified on-chain
Premium Tier: Advanced proofs + compliance audits by CPAs
When Midnight adds cryptographic primitives:
- โ BLS12-381 pairing operations
- โ KZG commitment verification
- โ Recursive SNARK verification
Auditors evolve to:
- Compliance & regulatory auditing
- ML model validation & certification
- Dispute resolution & forensics
- Enterprise integration services
See full evolution roadmap โ
- โ Privacy: Amounts encrypted on-chain vs. plaintext databases
- โ Income proofs: Cryptographic vs. manual document verification
- โ No breach risk: No central database to hack
- โ ZKML integration: 4 proof types, not just basic ZK
- โ Production-ready: 130 tests passing, real EZKL proofs
- โ Auditor marketplace: Reputation system + economic incentives
- โ Instant: ~30 seconds vs. 3-5 days
- โ No fraud: Cryptographic proofs can't be forged
- โ 99% cost reduction: Automated vs. manual review
โ Completed:
- Smart contracts (13 circuits, 130 tests)
- API layer (100% circuit coverage, 41 tests)
- ZKML integration (4 proof types, 23 E2E tests)
- Auditor verification system with reputation tracking
- Encrypted payment history system
- Recurring payment automation
๐ In Progress:
- UI development (company dashboard, employee portal)
- Auditor selection interface
- Demo preparation
โธ๏ธ Future:
- Mainnet deployment
- Production auditor onboarding
- Advanced ML models (fraud detection, income prediction)
- Detailed Flow Explanation - Complete system overview
- New Member Onboarding - Quick start guide for contributors
- Technical Roadmap - Implementation progress
- Auditor Implementation - Security model details
External Resources:
# Development mode with hot reload
npm run dev:local
# Compile contracts after changes
npm run compile
# Type checking
npm run typecheck
# Build all packages
npm run build| Command | Description |
|---|---|
npm run compile |
Compile Compact contracts |
npm run payroll-ui:local |
Start UI on local network |
npm run payroll-ui:testnet |
Start UI on testnet |
npm run dev:local |
Development with hot reload |
npm test |
Run all tests |
npm run typecheck |
Type check all packages |
npm run build |
Build all packages |
Primary:
- Crypto-native companies paying employees in tokens
- Privacy-conscious employees (Web3, crypto industry)
- DeFi lending protocols requiring income verification
- Licensed auditing firms (Big 4, regional CPAs)
Secondary:
- Traditional companies exploring blockchain payroll
- Banks/landlords wanting cryptographic verification
- International workers with cross-border income
Apache License 2.0 - see LICENSE file for details.
- Midnight Network for privacy-preserving blockchain infrastructure
- Input Output Global for the Midnight ecosystem
- EZKL for zero-knowledge machine learning framework
- The ZK cryptography community for advancing privacy technology
This is a hackathon project demonstrating privacy-preserving payroll with ZKML. Contributions welcome!
Priority areas:
- UI/UX development (React components)
- Additional ZKML proof types
- Documentation and examples
- Integration testing
Built for Midnight Finance Track Hackathon
Privacy-first payroll meets zero-knowledge machine learning
๐ฌ Watch Demo | ๐ View Pitch Deck | ๐ Read Full Documentation








