Last updated 3 months ago
Grant-funded projects need public accountability for fund allocation while protecting team member salary privacy. Current blockchain solutions force an all-or-nothing choice, creating legal risks.
Dual-mode DApp: public grant allocation for transparency, private payments for salary privacy. Zero-knowledge proofs verify compliance without revealing sensitive payroll data.
Please provide your proposal title
CompliancePay: Public Grant & Private Payment Reference DApp
Please specify how many months you expect your project to last
3
Please indicate if your proposal has been auto-translated
No
Original Language
en
What is the problem you want to solve?
Grant-funded projects need public accountability for fund allocation while protecting team member salary privacy. Current blockchain solutions force an all-or-nothing choice, creating legal risks.
Supporting links
Does your project have any dependencies on other organizations, technical or otherwise?
No
Describe any dependencies or write 'No dependencies'
No dependencies
Will your project's outputs be fully open source?
Yes
Please provide here more information on the open source status of your project outputs
Project will be published with the MIT License. All code will be publicly available and freely available for developers to reuse and customize as they please
Please choose the most relevant theme and tag related to the outcomes of your proposal
Governance
What is useful about your DApp within one of the specified industry or enterprise verticals?
CompliancePay solves a critical problem in finance and governance: maintaining accountability for public funds while protecting individual privacy rights. This is essential for DAOs, grant programs, corporate finance, non-profits, and government contractors. The dual-mode approach shows developers exactly when to use public versus private state, making Midnight's privacy model tangible and immediately applicable to real-world compliance scenarios.
What exactly will you build? List the Compact contract(s) and key functions/proofs, the demo UI flow, Lace (Midnight) wallet integration, and your basic test plan.
Compact Contracts:
GrantRegistry.compact (Public State)
createGrant() - Creates public grant with amount, purpose, deliverables
getGrantDetails() - Returns grant information
Public state: grant IDs, amounts, recipient addresses, deliverables
PrivatePayroll.compact (Mixed State)
addAuthorizedRecipient() - Registers team member privately
makePayment() - Executes private payment with ZK proof
verifyCompliance() - Verifies proof on-chain
Private state: payment amounts, recipient identities
Public state: proof verification results, aggregate budget usage
Key Zero-Knowledge Proofs:
"Payment amount ≤ remaining grant balance"
"Recipient is authorized team member"
"Total payments ≤ grant amount"
Demo UI Flow:
Public Mode: Connect Lace wallet -> Create grant -> View grants publicly
Private Mode: Add team members privately -> Make shielded payment -> Verify proof -> Recipient views payment privately
Compliance View: Public dashboard shows aggregate budget usage and proof verification status
Lace Wallet Integration:
Lace Midnight wallet for Midnight testnet
Exemplifying both public transactions and private payments to inspire developers
Proof server connection for ZK generation
Test Plan:
Unit tests for contract functions
Integration tests for proof generation/verification
End-to-end test: complete grant lifecycle with multiple payments
How will other developers learn from and reuse your repo? Describe repo structure, README contents, docs/tutorials, test instructions, and extension points. Which developer personas benefit, and how will you gauge impact (forks, stars, issues, remixes)?
Repository Structure:
compliancepay/
├── contracts/ (Compact contracts + tests)
├── ui/ (Web application)
├── docs/ (ARCHITECTURE.md, TUTORIAL.md, DEPLOYMENT.md)
├── examples/ (Usage examples)
└── README.md
README Contents:
Problem statement and solution overview
Quick start guide
Architecture diagram (public/private state flow)
Usage examples with code snippets
Extension guide
Documentation:
Architecture guide explaining public vs private state design decisions
Tutorial content for implementing dual-mode transactions
Test instructions for running locally and on testnet
Extension points for custom proof circuits and payment types
Developer Personas:
DAO treasury managers building transparent fund management
Grant program developers needing compliance tools
DeFi builders requiring privacy-compliant payment systems
Midnight developers learning public/private state patterns
Impact Metrics:
GitHub stars, forks, and issues as engagement indicators
Remixes and adaptations for other use cases
Community feedback and feature requests
Integration into other Midnight projects
Please describe your proposed solution and how it addresses the problem
CompliancePay demonstrates Midnight's dual-ledger architecture through a practical implementation addressing real-world compliance needs.
Architecture:
The system uses Compact smart contracts with simultaneous public and private state:
Public Ledger (Unshielded):
Grant amounts and purposes
Aggregate budget consumption
Zero-knowledge proof verification results
Private State (Shielded):
Individual payment amounts
Recipient identities
Payment details
Zero-Knowledge Proofs:
Local proof generation proves statements without revealing data:
"Payment is to authorized team member"
"Amount is within budget"
"Total spending complies with rules"
User Flow:
Grant Issuers: Create public grants -> Authorize team privately -> Monitor compliance publicly
Team Members: Receive shielded payments -> View private history -> Prove payment for taxes without revealing amounts
Auditors: View grants and total amounts -> Verify all compliance proofs -> Cannot see individual salaries
This provides programmable selective disclosure—revealing exactly what's needed for compliance while protecting sensitive data.
Please define the positive impact your project will have on Midnight ecosystem
CompliancePay provides immediate, tangible value to the Midnight ecosystem:
Developer Education: First clear reference showing how to balance public and private state in Compact contracts
Use Case Validation: Proves Midnight's model works for real-world regulatory compliance
Code Reusability: Developers building DAOs, payroll systems, or treasury management can adapt this codebase
Enterprise Credibility: Demonstrates privacy blockchain meeting regulatory requirements
Community Resource: Comprehensive tutorials and documentation accelerate ecosystem learning
The project bridges Midnight's technical capabilities with practical developer needs, providing a complete working example that accelerates the ecosystem's ability to build compliant applications.
What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?
Capability to deliver:
Lead Developer: Andre Brunsal (Elementary Software)
Feasibility validation:
Pre-Development:
Per Milestone:
Risk Mitigation:
Please provide a cost breakdown of the proposed work and resources
Total: $USDM 10,000.00
Smart Contract Development - $USDM 4,000.00
• Compact contract implementation (GrantRegistry + PrivatePayroll)
• ZK proof circuit design
• Testing and testnet deployment
Frontend Development - $USDM 3,000.00
• Web application
• Lace wallet integration
• UI/UX implementation
• Proof server integration
Documentation - $USDM 1,000.00
• Architecture documentation
• Tutorial content
• Video walkthrough
• Code examples
Testing & QA - $USDM 2,000.00
• Unit and integration tests
• End-to-end testing
• Bug fixes
How does the cost of the project represent value for the Midnight ecosystem?
Reusable Asset: Code becomes permanent ecosystem resource for future developers
Accelerated Learning: Clear reference reduces developer onboarding time from weeks to hours
Enterprise Validation: Demonstrates Midnight handles real-world compliance scenarios
Educational Resource: Comprehensive documentation reduces support burden
Cost Efficiency: $10,000 for open-source reference that benefits entire ecosystem
I confirm that the proposal clearly provides a basic prototype reference application for one of the areas of interest.
Yes
I confirm that the proposal clearly defines which part of the developer journey it improves and how it makes building on Midnight easier and more productive.
Yes
I confirm that the proposal explicitly states the chosen permissive open-source license (e.g., MIT, Apache 2.0) and commits to a public code repository.
Yes
I confirm that the team provides evidence of their technical ability and experience in creating developer tools or high-quality technical content (e.g., GitHub, portfolio).
Yes
I confirm that a plan for creating and maintaining clear, comprehensive documentation is a core part of the proposal's scope.
Yes
I confirm that the budget and timeline (3 months) are realistic for delivering the proposed tool or resource.
Yes
I Agree
Yes
Andre Brunsal - Lead Developer & Project Lead