PrivaraPay

Private, compliant payroll and treasury management on‑chain

About

## Wave 1 submission

Foundation & Core Contract Development Focus: Establish development environment, design encrypted payroll logic, and deploy base contracts locally.

🧱 What We Accomplished

- Environment Setup - Initialized a Hardhat project with the Fhenix Hardhat plugin to simulate FHE operations locally. - Installed @cofhe/sdk, @reineira-os/sdk, and dependencies for encryption/decryption. - Configured network profiles for local FHE simulation and Fhenix Sepolia testnet. - Contract Architecture - Designed PayrollFactory.sol – a factory that deploys individual EncryptedPayroll instances per organization. - Implemented EncryptedPayroll.sol with: - euint64 for encrypted salary amounts. - Mapping of employee addresses to encrypted salary data. - Encrypted payment schedules stored as arrays of euint64 timestamps. - Added access control using Fhenix’s FHE library to ensure only authorized roles (employer, employee, auditors) can perform certain operations. - Encrypted Data Storage - Employer registers employees and encrypts salary amounts using the employee’s public key. - Used FHE.asEuint64 to store encrypted values on-chain. - Implemented a simple encrypted balance system: total payroll budget encrypted with the employer’s key. - Local Testing - Wrote unit tests for: - Encrypted salary storage and retrieval. - Access control (only employer can add/update salaries). - Basic arithmetic on encrypted values (e.g., checking that total payroll does not exceed budget). - All tests passed in the local FHE simulation environment.

🔧 Challenges Faced

- Gas Costs of FHE Operations - Each FHE.asEuint64 call consumes significant gas. We had to batch operations and store encrypted data in efficient structures to avoid hitting block limits. - Key Management - Deciding how to handle public keys on-chain without exposing them to everyone. We opted to store a mapping of employee addresses to their public key, but this still makes keys visible. We’ll revisit this in Wave 2. - Understanding FHE Type Constraints - FHE types (euint etc.) have limited operations; comparisons and arithmetic are possible but must be done carefully. We had to refactor some logic to avoid unsupported operations.

📚 Lessons Learned

- Simulation is essential – The Hardhat plugin allowed us to iterate quickly without deploying to a testnet for every change. - Privacy-by-design forces new patterns – Traditional access control (e.g., OpenZeppelin’s Ownable) works, but we must also consider encryption keys as a separate layer of permission. - Start with minimal features – Getting the core encryption and storage working first validated the approach before adding complexity.

🏁 Milestones Achieved

- Hardhat project with Fhenix plugin and Privara SDK integrated. - Factory and payroll contracts with encrypted storage. - Unit tests covering all basic encrypted operations. - Local deployment and end-to-end test of storing an encrypted salary.

From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

No public repo linked, so we can't tell.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.