Skip to main content
Anchoring is the single on-chain action a payer takes: publish one hash per payment to Ethereum so the worker can later prove that payment happened. This page covers the contract, the exact commitment encoding, and how to deliver the slip a worker needs to build a proof.

The contract

PayerAnchor on Ethereum Sepolia. Unowned, immutable, permissionless: anyone can call it, and nobody can upgrade it. It is a trust root, so it has no admin to compromise.
Batch a payroll run into one call. One transaction is one verification downstream, so thirty separate calls cost thirty verifications instead of one.

The commitment

abi.encode, not abi.encodePacked. Four 32-byte words, 128 bytes total. The zero-knowledge circuit mirrors this exactly. One byte of difference and everything compiles, nothing verifies, and the failure surfaces somewhere that looks unrelated.
address
required
The worker’s wallet. This becomes the credential’s subject.
uint256
required
Base units of a six-decimal token. $2,500 is 2500000000. Must fit in a uint64; the circuit holds it as one.
uint256
required
Your pay-cycle counter, incrementing by one. Payer-local: your period 7 has nothing to do with anyone else’s. The circuit requires three consecutive periods, so gaps make a window unprovable.
bytes32
required
See below. This choice decides whether the commitment hides anything.

The salt decides your privacy

Anchoring

Anchoring the same commitment twice from the same address reverts with AlreadyAnchored. Scoping is per payer, so two payers may legitimately anchor the same commitment.

Delivering the slip

If you used a random salt, the worker needs the recipient, amount, period, salt and commitment to prove anything. Treat that complete record as payslip data and never publish a real preimage in documentation, source control or logs. The shape of a slip, with made-up values. Nothing below is anchored anywhere; the commitment is what shared/commitment.ts returns for these inputs, so you can recompute it to check the encoding:
Any channel you already trust for payslips: the portal they log into, an encrypted export, your existing HR system. It is the same sensitivity as a payslip, because that is what it is.
Direct payer-to-worker delivery gives the strongest privacy because Orru never sees the preimage. In the current testnet demo, an authenticated Orru route may deliver or derive the demo slip for the connected wallet. The exact amount and salt are still never published on-chain, placed in the credential, shown to a lender or sent to a remote proving service, but the demo does not hide them from the Orru server.

Then what

A relayer picks up your PaymentAnchored event, waits for the block to be attested, and submits the Attestcoin proof to Creditcoin, typically within minutes. After that the worker can build a proof and issue a statement whenever they like. You do not have to run that relayer, and it needs no permission from you.