# Verify

Each claim SANCTRA makes can be checked from public data, without a wallet. This page pairs every claim with the place to look. The live addresses are listed on [/verify.html](/verify.html) and returned by [`/api/v1/config`](/api/v1/config) and [`/api/v1/warden`](/api/v1/warden).

## What you trust, and how to check it

| Claim | How to check |
|---|---|
| The escrow has no owner, proxy or fee | Read the verified source on the explorer at the escrow address. There is no admin function, no `delegatecall`, and transfers send the full `amount`. |
| Only the Warden can authorise a payout | Call `warden()` on the escrow and compare with `signer` from `/api/v1/warden`. |
| The bounty cap is fixed | Call `maxBounty()` on the escrow (6 decimals). |
| A verdict was signed by the Warden | Recover the signer from the verdict, below. |
| The terms were not changed after locking | Compare `termsHash` in `agreement(taskId)` or the `Locked` event with the hash recomputed from the terms you hold. |
| The exploit checked is the one submitted | `exploitHash = keccak256(utf8(exploitSource))`, signed inside the verdict and emitted in `Released`. |
| Sealing happens in your browser | Read `warden/sealing.mjs`: WebCrypto only, no network calls. |
| Yard verdicts are reproducible | Press Rerun on any run in [The Yard](/yard/). |

## Check a verdict signature

Take a verdict from `GET /api/v1/tasks/:id` (`verdicts[]`) together with the task's `termsHash` and `breaker`, then:

```js
import { recoverTypedDataAddress } from 'viem';

const signer = await recoverTypedDataAddress({
  domain: { name: 'Sanctra Warden', version: '1', chainId: 4663, verifyingContract: ESCROW },
  types: { Verdict: [
    { name: 'taskId', type: 'bytes32' }, { name: 'termsHash', type: 'bytes32' },
    { name: 'breaker', type: 'address' }, { name: 'outcome', type: 'uint8' },
    { name: 'exploitHash', type: 'bytes32' }, { name: 'checkedAt', type: 'uint64' } ] },
  primaryType: 'Verdict',
  message: { taskId, termsHash, breaker, outcome: 1 /* BREACHED */, exploitHash, checkedAt: BigInt(checkedAt) },
  signature,
});
console.log(signer === WARDEN_SIGNER);
```

`ESCROW` and `WARDEN_SIGNER` come from `/api/v1/config` (`escrow`, `wardenSigner`). For an on-chain cross-check, call `verdictDigest(...)` on the escrow and compare it with `hashTypedData` over the same input.

## Check the escrow on chain

With any RPC client pointed at Robinhood Chain (`https://rpc.mainnet.chain.robinhood.com`):

```js
import { createPublicClient, http, parseAbi } from 'viem';
const client = createPublicClient({ transport: http('https://rpc.mainnet.chain.robinhood.com') });
const abi = parseAbi(['function warden() view returns (address)', 'function maxBounty() view returns (uint96)', 'function usdg() view returns (address)']);
const [warden, cap, usdg] = await Promise.all(['warden', 'maxBounty', 'usdg'].map((f) => client.readContract({ address: ESCROW, abi, functionName: f })));
```

`usdg` should equal `0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168`.

## Check a terms commitment

If you are the Owner or the approved Breaker, you hold the terms. Recompute:

```js
import { keccak256, stringToBytes } from 'viem';
const commitment = keccak256(stringToBytes('sanctra-terms:v1:' + canonicalJson(terms)));
const termsHash  = keccak256(stringToBytes('sanctra:' + commitment));
```

`canonicalJson` sorts object keys recursively and drops whitespace (see `warden/terms.mjs`).

## Rerun a Yard verdict

Every Yard run publishes its build artifacts and the exact exploit source. Rerun executes them in an EVM inside your browser under the same rules as the Warden and shows whether it reaches the same outcome. See [The Yard and Rerun](/docs/yard-and-rerun).

## Public addresses

| Name | Where it is published |
|---|---|
| Escrow | `/api/v1/config` → `escrow` |
| Warden signer | `/api/v1/config` → `wardenSigner`, `/api/v1/warden` → `signer` |
| Warden sealing key (X25519) | `/api/v1/config` → `wardenSealingKey`, `/api/v1/warden` → `sealingPublicKey` |
| USDG | `0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168` |
| Explorer | `https://robinhoodchain.blockscout.com` |
