explaingit

sabiedu/confidential-salary-vault

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

A demo payroll system on Ethereum that proves the total salary spend on-chain while keeping every individual salary encrypted.

Mindmap

mindmap
  root((Confidential Salary Vault))
    What it does
      Encrypted on-chain salaries
      Public total audit
      Per-employee decrypt access
      Encrypted bonus math
    Tech stack
      Solidity
      Hardhat
      React and TypeScript
      Zama FHEVM SDK
    Use cases
      Prove payroll total to auditors
      Learn homomorphic encryption on-chain
      Compute bonuses privately
    Audience
      Blockchain developers
      FHE researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Learn how to build a smart contract that computes on encrypted data using Zama FHEVM.

USE CASE 2

Prototype a payroll system that proves total spend without leaking individual salaries.

USE CASE 3

Study a working example of per-user decryption permissions on encrypted blockchain data.

USE CASE 4

Deploy the demo to Sepolia testnet to see confidential payroll in action.

What is it built with?

SolidityHardhatReactTypeScriptwagmiZama FHEVM

How does it compare?

sabiedu/confidential-salary-vault0xradioac7iv/tempfs7vignesh/pgpulse
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardmoderatemoderate
Complexity4/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a Sepolia RPC URL, a funded wallet private key, and understanding of FHEVM tooling to deploy and test.

Use freely including commercially, keep the copyright notice, and note that BSD-3-Clause-Clear excludes any patent rights.

In plain English

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.

Copy-paste prompts

Prompt 1
Explain how FHE.allow gives an employee decrypt access to only their own encrypted salary in this contract.
Prompt 2
Walk me through deploying ConfidentialSalaryVault.sol to Ethereum Sepolia using the included Hardhat scripts.
Prompt 3
Show me how the bonus calculation is computed entirely on encrypted values using FHE.mul and FHE.div.
Prompt 4
Help me set up the React frontend to connect a wallet and encrypt a salary before submitting it to the vault.

Frequently asked questions

What is confidential-salary-vault?

A demo payroll system on Ethereum that proves the total salary spend on-chain while keeping every individual salary encrypted.

What language is confidential-salary-vault written in?

Mainly TypeScript. The stack also includes Solidity, Hardhat, React.

What license does confidential-salary-vault use?

Use freely including commercially, keep the copyright notice, and note that BSD-3-Clause-Clear excludes any patent rights.

How hard is confidential-salary-vault to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is confidential-salary-vault for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.