sabiedu/confidential-salary-vault — explained in plain English
Analysis updated 2026-05-18
Learn how to build a smart contract that computes on encrypted data using Zama FHEVM.
Prototype a payroll system that proves total spend without leaking individual salaries.
Study a working example of per-user decryption permissions on encrypted blockchain data.
Deploy the demo to Sepolia testnet to see confidential payroll in action.
| sabiedu/confidential-salary-vault | 0xradioac7iv/tempfs | 7vignesh/pgpulse | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a Sepolia RPC URL, a funded wallet private key, and understanding of FHEVM tooling to deploy and test.
Confidential Salary Vault is a demo project that shows how a company could prove its total payroll on a public blockchain without revealing any individual employee's salary. It is built on Zama's FHEVM, a system that lets smart contracts do math on encrypted numbers without ever decrypting them. Normally, if a company wants to prove a payroll total to an auditor or investor, it has to show everyone's individual pay. This project flips that. Salaries are stored on-chain as encrypted values. The smart contract can add them together, compare them, and calculate performance-based bonuses, all while the numbers stay encrypted the whole time. An owner can choose to reveal only the total payroll for an audit, while each employee can only decrypt their own salary and nobody else's. The project uses the encrypted math features of the Zama FHEVM library: adding and subtracting encrypted numbers, multiplying and dividing them to calculate a performance-weighted bonus, comparing encrypted values safely to guard against overflow, and a permission system that controls exactly who is allowed to decrypt which piece of data. When an employee claims their pay, the contract works out salary plus bonus entirely on the encrypted values and only that employee can unlock the result. The smart contract is written in Solidity and tested with Hardhat, including 9 automated tests that all pass against a local FHEVM test environment. The frontend is a React and TypeScript web app that connects to a crypto wallet using wagmi and viem, and it uses Zama's SDK to handle encrypting data before sending it and decrypting results afterward. A working version is deployed to the Ethereum Sepolia test network, with contract code, deployment scripts, and setup instructions included in the repository. This is an educational and demonstration project built for a Zama developer program, aimed at showing what confidential, privacy-preserving finance applications on a blockchain can look like. It uses the BSD-3-Clause-Clear license.
A demo payroll system on Ethereum that proves the total salary spend on-chain while keeping every individual salary encrypted.
Mainly TypeScript. The stack also includes Solidity, Hardhat, React.
Use freely including commercially, keep the copyright notice, and note that BSD-3-Clause-Clear excludes any patent rights.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.