Agent Tank Hackathon / Onchain Justice

FLIGHT
RECORDER

Tamper-evident evidence layer + on-chain AI settlement for agent-to-agent deals

Mochi, the GenLayer mascot
00 / ABOUT

What is
this?

The short version, before the evidence.

Flight Recorder is a black box for deals between AI agents. Every request, delivery and approval is written into a SHA-256 hash chain that breaks visibly if anyone rewrites history. When a deal goes wrong, that record becomes the evidence.

A settlement contract on GenLayer Studio Next then acts as judge and escrow: funds lock when the deal opens, the case-file hash anchors at dispute, AI validators fetch and check the evidence, and the winner is paid on-chain. No central arbiter.

Everything on this page is live. The transactions below ran on chain 61997, and the widgets let you reproduce the evidence checks in your own browser.

New here? Start with TRY IT - 30 seconds, no install.

In plain words

  • Hash - a fingerprint of a file. Change one byte and the fingerprint changes completely.
  • Chain - each fingerprint includes the previous one, so editing history breaks every link after it.
  • Anchor - one fingerprint written on-chain, where nobody can edit it.
  • Escrow - the money locks in a contract, not in anyone's bank account.
  • Validators - independent AI judges that re-check the evidence themselves before anyone gets paid.
EVIDENCEhash chainANCHORon-chain hashVERDICTAI judges pay
01 / FLOW

From evidence
to outcome.

Every transition is visible, deliberate, and anchored.

open_deal

Escrow funded

record events

Hash-chain witness

dispute

Case file anchored

resolve

AI validators decide

finalize

Winner paid

02 / LIVE PROOF

Real state.
Real chain.

Inspect the deployed Settlement contract and its lifecycle transactions.

0x51A54D74e86159482F2E57b8d4744c7Ba44D7043
METHODTX HASHSTATUSEXPLORER
open_deal0x833a8910...a07260FINALIZEDVIEW ↗
dispute0x571095fb...5167758cFINALIZEDVIEW ↗
resolve0xd581386f...dba4de8FINALIZEDVIEW ↗
finalize0x847ed870...e2b61c9FINALIZEDVIEW ↗

Every row is a real transaction on GenLayer Studio Next (chain 61997). Deal 4 completed the full lifecycle: dispute → AI resolve → APPROVED → finalize, paying the worker 0.1 GEN. These four transactions ran on the previous deployment (v2, 0x8BC5…), which stays on-chain as evidence; the address above is the current v6 contract (D6).

02A / VERIFY IN 3 WAYS

Don't trust.
Check.

Three independent paths from claim to evidence.

Path 01 / On-chain

In the explorer

Open the contract page, check the transaction list and the FINALIZED badges.

Path 02 / Locally

On your machine

Clone the repo, run the tests, then execute the live demo.

git clone https://github.com/hoveiser/flight-recorder.git
pytest tests/ -v
node scripts/e2e_demo.js

Expect 173 passed: 93 off-chain plus 80 direct-mode contract tests. The direct-mode half needs Linux/macOS (gltest cannot inject its fd-0 message on Windows), so on Windows run pytest tests --ignore=tests/direct and let CI be the authoritative full run.

Path 03 / Zero install

In your browser, right now

No install needed. Use the Case File Hash Checker below and reproduce the on-chain hash yourself.

02B / SCENARIO MATRIX

Four runs.
One record.

Live outcomes from the deployed Settlement contract.

SCENARIOVERDICT / OUTCOMEPAYOUT TOKEY TX
0 / HAPPY PATH, AI RESOLVEAPPROVED / releasedWorker (0.1 GEN)0x847ed870... VIEW ↗
1 / OFF-CHAIN ANCHORChain anchor verified on-chainNone0x6d87f4ed... VIEW ↗
2 / TIMEOUT RELEASEEarly release correctly rejected - 7-day escrow lock enforcedNone0x19ca7d54... VIEW ↗
3 / EVIDENCE HASH MISMATCHMISMATCH / refundedClient0x535b7200... VIEW ↗

Row 3 / EVIDENCE HASH MISMATCH anchors a deliberately wrong case-file hash: validators re-fetch the served evidence, re-hash it during the consensus round, detect the mismatch, and refund the client - the tamper path, demonstrated live. Exact hashes and validator reasoning: scripts/e2e_results.md. Every row in this matrix ran on the previous deployment (v2, 0x8BC5…), which remains on-chain and verifiable. The current D6 contract's own runs, including twelve adversarial cases and a live CHAIN_MISMATCH refund, are recorded in the same file. The 7-day timeout lock is a deployment parameter chosen for escrow realism; per-deal configurable timeouts are on the roadmap.

02C / TRY IT

Reproduce the
on-chain hash.

Fetch the case file, hash it in your browser, compare with what is anchored on-chain.

1 Fetch2 Hash3 Compare
Computed SHA-256: pending

The digest below is recomputed from the exact bytes served from the repo. A dispute anchors that same digest on-chain as case_file_hash, so a tampered copy fails here and on-chain for the same reason.

02D / TAMPER DETECTION

Break the
chain.

Edit any payload and watch every later hash change. This is exactly what /verify detects off-chain.

Chain rule: hash_i = SHA256(payload_i + previous_hash), genesis = 64 zeros.

02E / WATCH A REAL DISPUTE

The whole path,
one screen.

The widgets above prove the evidence layer. This panel shows the execution layer: a real dispute lifecycle that ran on Studio Next, step by step, with the exact transactions and the commands to reproduce it.

STEP 2

record events

Off-chain hash chain grows; the widgets above verify it. No gas, no on-chain tx.

STEP 4

resolve

Validators fetch the case file, recompute the hash chain against the anchored head, verdict APPROVED.

0xd581386f...dba4de8 VIEW ↗FINALIZED

Why is there no Run-it-now button here?

Executing a dispute needs a funded Studio Next account and a private key. We will not ask for your key, and we will not spend gas from a shared wallet silently. Instead, one command reproduces the entire lifecycle with your own account: node scripts/e2e_demo.js - or call the methods yourself on contract 0x51A54D74e86159482F2E57b8d4744c7Ba44D7043 in Studio Next (studio-dev, chain 61997). Every run shown above is public and verifiable.

Browser-executed disputes are live in section 08: TRY A DISPUTE connects your wallet and signs open_deal / dispute on-chain from your browser, and off-chain event recording is served by the hosted evidence API. An integrated faucet remains on the roadmap.

03 / ARCHITECTURE

Witness meets
judge.

Evidence stays inspectable. Consensus stays distributed.

Off-chain / witness
a91f...c20d7b3e...19aaBROKEN
c8ff...4401
91d2...08be

Append-only SQLite log. Any modification breaks the chain.

On-chain / judge
LEADER
PROPOSES
VALIDATOR 01 / AGREEVALIDATOR 02 / AGREEVALIDATOR 03 / AGREE

Equivalence-principle consensus. No single party controls the verdict.

04 / CASE FILE

Evidence,
serialized.

The case file carries the record from the witness layer to the judge.

{
  "deal_id": "demo_happy_002",
  "definition_of_done": { "success_criteria": "1000 valid records" },
  "parties": [ "0x62F4e023b1d1e68a86E153829704610C007175Fb", "0x..." ],
  "events": [{ "event_type": "DELIVERY", "payload": { "valid": 500 }, "actor": "0x...", "signature": "0x... personal_sign by the actor", "sig_version": 2 }],
  "chain_integrity": { "verification": "PASS", "signature_status": "PASS", "last_hash": "33d588cb..." }
}
HASH CHAIN: PASSSHA-256 ANCHORED ON-CHAIN
05 / VERDICTS

The record
gets a verdict.

APPROVEDWorker paidAgreement fulfilled
REFUNDEDClient refundedWorker failed delivery
EVIDENCE_MISMATCHClient refundedServed bytes are not the anchored case file
AGREEMENT_MISMATCHClient refundedCase-file terms are not the anchored agreement
ANCHOR_MISMATCHClient refundedNo delivery head was ever anchored on-chain; fails closed
CHAIN_MISMATCHClient refundedThe contract recomputes the chain from genesis and its own head is not the anchored delivery head
UNRESOLVABLENo payout until the appeal window closesToo many failed attempts; then timeout_release refunds
TIMEOUTWorker paidNo dispute filed within 7 days
The four red verdicts are evidence outcomes: they are derived from the fetched bytes, so validators must agree on them exactly, and none of them depends on what a model thinks about the work.
06 / QUICK START

Run the
recorder.

Five commands from clone to on-chain verification.

git clone https://github.com/hoveiser/flight-recorder.git && cd flight-recorder
pip install -r requirements.txt && npm install
pytest tests/ -v
uvicorn src.main:app
node scripts/e2e_demo.js

Verify on-chain: open the Studio Explorer contract page ↗

07 / VIDEO

See the flow
in motion.

Watch on X

Recorded against deployment v1; the transaction hashes visible in the video belong to v1 (see Deployment history in the README).

08 / TRY A DISPUTE

Open, record,
dispute.

Your connected wallet signs the writes. This page does not mint GEN.

Current contract: 0x51A54D… (v6 / D6). Superseded history that stays on-chain and verifiable: v5 / D5 0xc93007…, v4 0xfD91f7…, audited v3 0x223323CE… and v2 0x8BC5….

STEP 1

Open a deal

Locks 0.01 GEN escrow on the deployed Settlement contract.

STEP 2

Record an event

Appends one off-chain event with the session token. Your wallet signs the event with personal_sign, so the recorder can prove the actor is a deal party and owns the session.

STEP 3

Dispute

Seals your own evidence log, then anchors the case-file hash and the sealed chain head on-chain in one transaction. The head can never be overwritten afterwards.

STEP 4

Transaction hashes

Explorer links for every write in this run.