Payroll with Commitment-Based Privacy
The payroll system lets employers (including government entities) submit payroll to BelizeChain without storing plaintext salaries on-chain, while the Payroll pallet records a verifiable commitment for each payment.
Status: The payroll connector exists in Nawal and the Payroll pallet is in the runtime, but end-to-end payroll-on-chain operation has not been verified live on the testnet. Treat this page as the design contract.
Not zero-knowledge.
blockchain/payroll_connector.pysays so itself: the pallet "stores no Merkle root and accepts no ZK proof." The Merkle root andPayrollProofobjects are Nawal-side audit artifacts — only the batch or individual payment call reaches the chain. This page used to describe a ZK pipeline that does not exist.
How It Works
┌──────────────┐
│ Employer │
└──────┬───────┘
│ 1. Submit payroll
┌──────▼───────────────────┐
│ PayrollConnector │
│ ├─ Calculate taxes │
│ ├─ Build Merkle tree │ ← audit artifact, stays off-chain
│ └─ Build local proofs │ ← audit artifact, stays off-chain
└──────┬───────────────────┘
│ 2. Submit to chain
┌──────▼───────────────────┐
│ Payroll pallet │
│ ├─ Store commitment │ ← blake2_256(amount, employer, employee)
│ └─ Execute transfer │
└──────┬───────────────────┘
│ 3. Verification
┌──────▼───────────────────┐
│ Auditors │
│ ├─ Recompute commitment │
│ └─ Check off-chain tree │
└──────────────────────────┘
Privacy Model
- On-chain salary commitments — the pallet stores
salary_commitment: [u8; 32], computed asblake2_256(salary, employer, employee). The amount is not in the commitment preimage that a third party can recover. - Payment commitments — each
PayrollRecordcarriespayment_commitment = blake2_256(gross, deductions, net, employer, employee). - Off-chain Merkle tree — the connector builds a Merkle root over the batch as a local audit artifact. It is not submitted and not verified on-chain.
- What an auditor can do — given the plaintext figures, recompute the commitment and match it against the chain. They cannot go the other way.
- What an auditor cannot do — prove an individual salary without the employer supplying it. There is no ZK proof of that today.
Prerequisites
Payroll.verify_employer is gated on VerifierOrigin = TechnicalCouncilMember, so a council member must verify the employer before any payroll call can succeed. The connector does not verify employers itself.
Tax Calculation
The connector applies Belize tax brackets when constructing the payroll commitment:
| Bracket | Rate |
|---|---|
| Base band | 0% |
| Middle band | 25% |
| Upper band | 40% |
Quick Start
git clone https://github.com/BelizeChain/nawal-ai.git
cd nawal-ai
pip install -r requirements.txt
from blockchain.payroll_connector import PayrollConnector
connector = PayrollConnector(node_url="ws://localhost:9944")
Automation
Payroll runs can be scheduled (monthly, biweekly) through Xandross automation flows, or driven by the Payroll pallet's batch submission API directly.
Related
- Payroll pallet — runtime index 26
- Nawal integration
- Identity and compliance