✨ About the Project
💡 What Inspired Me
I built ZK-Payroll because I saw a big problem in how global teams and DAOs handle payments. Most payroll systems are expensive, slow, and expose private salary information. I wanted to create a solution that protects privacy, works across borders, and costs less than a cent per transaction.
I imagined a world where:
- People get paid instantly, no matter where they live.
- Salaries stay private, even on public blockchains.
- Mobile users can manage payroll from anywhere.
That vision led me to build ZK-Payroll.
🧠 What I Learned
This project taught me a lot about:
- Zero-Knowledge Proofs: I learned how to use ZK to hide sensitive data like salary amounts while still proving payments are valid.
- Smart Contracts in Cairo: I built secure contracts on Starknet using Cairo, a new language designed for scalability and privacy.
- Cross-Chain Integration: I connected Bitcoin wallets using Xverse and simulated bridges between Bitcoin and Starknet.
- Mobile Development: I created a full React Native app that works on phones and supports wallet connections.
I also learned how to manage wallet persistence, Merkle trees, and nullifiers — all key parts of private blockchain systems.
🏗️ How I Built It
I built ZK-Payroll step by step:
- Smart Contracts: I wrote contracts in Cairo to handle payroll logic, fund deposits, and ZK-proof verification.
- Frontend: I used React and TypeScript to build a clean dashboard for employers and employees.
- Mobile App: I built a React Native app with wallet integration and privacy controls.
- Privacy System: I used Merkle trees to batch payments and nullifiers to prevent double claims.
- Bitcoin Integration: I added support for Xverse wallets and simulated cross-chain payments using Atomiq.
I tested everything with 51 automated tests and made sure the app works on both web and mobile.
🚧 Challenges I Faced
Building this alone was tough, but I pushed through. Some of the hardest parts were:
- Learning Cairo: It’s a new language, and documentation is still growing. I had to experiment a lot.
- ZK Proofs: Designing privacy systems with Merkle trees and nullifiers took time and deep research.
- Cross-Chain Logic: Simulating Bitcoin-to-Starknet bridges was complex, especially without full mainnet tools.
- Mobile Wallets: Getting wallet persistence and privacy toggles to work smoothly on mobile was tricky.
Despite these challenges, I built a working, production-ready system that solves a real-world problem.
🔢 A Bit of Math
To protect privacy, I used Merkle trees and nullifiers. Here's a simple example:
Let each employee's payment be a leaf in a Merkle tree: [ \text{Leaf}_i = \text{Hash}(\text{Address}_i, \text{Amount}_i) ]
The root of the tree is published, but individual amounts stay hidden. When an employee claims payment, they submit a ZK proof that: [ \text{Leaf}_i \in \text{Merkle Tree} ] without revealing (\text{Amount}_i).
This keeps salary data private while proving the payment is valid.
🌍 Why It Matters
ZK-Payroll is more than a hackathon project. It’s a real solution for DAOs, remote teams, and crypto-native companies. It protects privacy, saves money, and works globally — all on mobile.
I’m excited to take it further with grants, partnerships, and real-world pilots.
Built With
- atomiq
- cairo
- ethereum-(via-l2)
- javascript
- merkle
- react-native
- starknet
- typescript
- xverse-wallet
Log in or sign up for Devpost to join the conversation.