Docs · Verify a receipt
VERIFY
Verify a receipt
Don't take our word for a simulated result. Every PerpBrain receipt can be re-derived from its inputs with the open-source verifier in the PerpBrain SDK (MIT). Same inputs, same hashes: verified and reproducible.
Run it yourself
You need Node 22.6 or newer (node -v) and git. No account, API key or exchange key. This checks the example receipt that ships with the SDK:
git clone https://github.com/PERPBRAIN/perpbrain-sdk.git
cd perpbrain-sdk
node --experimental-strip-types examples/verify-receipt.ts fixtures/receipts/goodExpected output:
{"dir":"fixtures/receipts/good","status":"VERIFIED","mismatches":[]}
To check your own receipt, point the same command at a directory holding its receipt.json, manifest.json and inputs.json. Exit code 0 means VERIFIED; exit code 1 means MISMATCH, with each failing field named.
The example receipt
From fixtures/receipts/good/receipt.json in the SDK: a SIMULATED ETH long of 0.01 on a recorded two-sided book, under the standard limits preset.
| Field | Value |
|---|---|
result_sha256 | f785e785d0e5eeac7c2552cceffc10d1c0bb3d759e52ba13c36e37c46f38631d |
data_snapshot_id | c6b42a445f209ef5148ecc767ca187fbbe5f290e93ac52305eaf95a00b2a5633 |
manifest_sha256 | 86bd46cadab71bc95f27a53114683b9d3e04d0e0a5e8e8c618086e743461634b |
limits_hash | 2a2aa4853a9ca3a4a5e0bb9cb27ae59d201452cd0c18753bc1f313c755ac7edb |
market_snapshot_id | 149df7a64ce65928fb7dec00a1809adb564a6b9b5df017607baeba43f4873953 |
statement | verified and reproducible |
The input hash is plain SHA-256 of the file, so you can confirm it with no PerpBrain code at all:
sha256sum fixtures/receipts/good/inputs.json
# c6b42a445f209ef5148ecc767ca187fbbe5f290e93ac52305eaf95a00b2a5633See it catch a change
node --experimental-strip-types examples/verify-receipt.ts fixtures/receipts/tampered-result{"dir":"fixtures/receipts/tampered-result","status":"MISMATCH","mismatches":["result_sha256 mismatch","result.fills[0].price mismatch"]}
What the verifier does
- Re-derives the SHA-256 of the inputs, the manifest, the limits payload, the market snapshot and the stored result.
- Reruns the book simulator on
inputs.jsonand compares every field of the result. - Re-applies the frozen limits on that rerun.
- Reads no network and submits no order.
The full list of checks is in Receipts. Agents can run the same check with the MCP tool verify_receipt.
VERIFIED receipt proves the simulation is reproducible from its inputs. It is not a forecast and not advice. Real execution can differ. Limits you set; losses are still possible.