Verity records every settlement decision — the inputs, the rules, the evidence, the outcome — and makes it deterministically replayable by anyone. Given the same inputs and the same rules, replay always produces the same result. Not a claim. Mathematical proof.
When an autonomous agent completes work and receives payment, something important is missing: a tamper-proof record of why the outcome resolved the way it did.
Without that record, disputes have no ground truth. Audits have no replay. Enterprises cannot govern what they cannot inspect.
Verity is that record.
| System | What it records |
|---|---|
| Payment logs | Amount, status, timestamp |
| Audit logs | Who did what, when |
| Blockchain | Transaction hash, balance change |
| Verity | Decision inputs, rules, evidence, outcome, deterministic replay |
Before execution begins, Verity captures the complete decision context. After execution, it records the outcome and links the full chain. If you replay this receipt with the same inputs and the same rules, you get the same outcome. Every time. That is the invariant.
verity_id — unique receipt identifier
settlement_id — which settlement this governs
policy_version — which rules were in effect
input_state — everything the system knew
evidence[] — what was evaluated
outcome — SUCCESS / FAIL / UNKNOWN / DISPUTED / REVERSED
replay_hash — deterministic fingerprint
chain_hash — link to prior receipt
cargo addCanonical types, integer-only money arithmetic, deterministic serialization. The foundation every other crate depends on. Money is always integer minor units. No float arithmetic anywhere.
5 statesThe outcome state machine. Five outcomes: SUCCESS, FAIL, UNKNOWN, DISPUTED, REVERSED. Explicit transitions only. UNKNOWN is a first-class state — the system never pretends certainty it does not have.
hash chainsHash chains, Merkle trees, inclusion proofs. Every receipt links to the prior receipt in that agent's chain. A broken chain is detected immediately.
reversalsFinality classes and reversal journals. A Stripe settlement is reversible. A USDC on-chain settlement is irreversible. Verity models this explicitly. Reversals are journaled — not edits.
append-onlyAppend-only MoneyLedger and EvidenceLedger. No UPDATE. No DELETE. Enforced at the database trigger level. The past cannot be rewritten.
SUCCESSConditions met. Funds released.
FAILConditions not met. Funds returned.
UNKNOWNVerification ambiguous. Pre-declared resolution path executes.
DISPUTEDOne party challenges. Deterministic arbitration engages.
REVERSEDSettlement was final. Now reversed via journal entry.
UNKNOWN is not an error. It is the honest answer when evidence is insufficient or a condition times out. The pre-declared resolution path handles it. No money sits in limbo.
Paste any Verity receipt hash to verify it independently. No ZexRail account, no login, no trust required.
Anyone holding a receipt hash can verify it. This is how disputes get resolved, enterprises audit agent fleets, and regulators inspect autonomous commerce.
hash-chained receipt sequence
Verity is not a database that records what happened after the fact. It captures the decision context before execution and finalizes the truth record after. The pre-execution capture is what makes replay possible.
If the engine crashes between capture and finalization, the orphaned record is detected on restart and completed. No decision is ever lost.
let receipt = verity.capture(SettlementDecision {
settlement_id: "stl_4b7c9e2f",
input_state: current_state,
rules: active_policy,
evidence: vec![quality_score_ref, delivery_proof_ref],
})?;let replayed = verity.replay(receipt.verity_id)?;
assert_eq!(receipt.outcome, replayed.outcome);
assert_eq!(receipt.replay_hash, replayed.replay_hash);Reference implementation. Production settlement at scale.
ZexRail ships with Verity built in. Every settlement is automatically receipted and replayable. Get started →
Any XAP-compatible system can run Verity. The crates are independent.
List your implementationImplemented by
Install the Rust crates, read the documentation, or verify a receipt right now.