Pearl

Tamper-proof black box for AI robots, with insurance payouts only a verified human can claim

Pearl

Created At

ETHGlobal Mumbai

Project Description

Pearl is a tamper-proof black box for AI-driven robots, with insurance built in.

Robots are leaving their cages and working next to people. When one hits something or someone, nobody can prove what really happened. The logs sit on the owner's computer and can be edited. Nobody can show which AI made which decision. A bot can file an insurance claim as easily as a person can.

Pearl fixes this in five steps:

  1. 0G AI decides. At each step of a task (plan, check the grasp, check the placement, rate an incident) the robot sends its camera image and sensor readings to an AI model on 0G. The model runs in verified mode inside secure hardware (a TEE). The arm only moves after a valid answer. If 0G is unreachable, or the answer is invalid or unverified, the robot stops safely and records "no decision". It never invents one.

  2. The robot keeps its own record. Every decision (with its 0G request id) and every camera frame goes into a hash-chained log. The robot encrypts the log with a fresh key for each run that only the owner can unlock, and signs it with its own key. The sealed file goes to 0G Storage, and its fingerprint is anchored on 0G Chain under the robot's own address.

  3. Anyone can check it. The robot writes a public entry for each run on Arkiv, with labels only: robot, outcome, severity and time. That makes runs and incidents searchable without a central database. A shared proof link lets anyone confirm a record is untouched without being able to read it. Change one byte and verification fails.

  4. Only a real human can claim. The robot's own safety loop freezes the arm when a hand enters the work zone or the base is knocked, and the AI rates how serious the incident was. The owner can then file a claim. That needs a fresh World ID Agent Pass check, proving it is really the account owner, and an IDKit Proof of Human, so one person gets one claim per incident. A person at the insurer unlocks that one run (the owner shares only that run's key), then approves or declines with a reason. A contract on 0G Chain pays a fixed amount by severity. Each claim is a live Arkiv record, updated at every step.

  5. It works without internet. The robot pre-signs its 0G and Arkiv transactions into a sealed bundle. A laptop relay, a phone over Bluetooth or another robot (a mesh, for future multi-owner fleets) carries it to the first device that's online. Carriers can't read or change anything.

Pearl runs on an ESP32-S3 robot arm and in a MuJoCo physics simulation. In the simulation, the rendered camera image is exactly what the AI sees. The web app has a landing page aimed at insurers, an owner workspace, an insurer workspace and labelled demo workspaces, so anyone can try it without World ID.

How it's Made

Robot program and server: TypeScript on Node 22. The robot side runs as its own program, just as the ESP32 does, and the dashboard server never signs robot data. The arm layer can drive a TypeScript simulator, a MuJoCo 3.3.7 physics arm (Python) or the real board, all over the same line protocol.

0G Compute:

  • Each checkpoint calls the 0G Compute Router with the camera frame and telemetry, using model 0gm-1.0-35b-a3b, trust mode "verified" and the TEE check turned on.
  • The model returns a named action as JSON, never joint angles, and the answer is checked against a schema (zod).
  • If the provider fails, the same prompt and image go to other 0G vision models (qwen2.5-vl-72b, gemini-2.5-flash-lite) within one time budget. Every attempt is recorded.
  • A bad answer is never retried. It becomes a failsafe.

0G Storage and 0G Chain:

  • The encrypted log and frames are uploaded with the 0G Storage SDK.
  • Two Solidity contracts (Foundry) run on Galileo, both source-verified on chainscan:
  • EpisodeAnchor is a write-once record keyed by the robot's address. It stores the log's fingerprint and a hash of all the 0G request ids.
  • RewardPool pays approved claims after re-checking the anchor.
  • The arm is also registered in 0G's zerobot registry, so a run can start from an on-chain command.

Arkiv (@arkiv-network/sdk) is the public, queryable index:

  • The robot's own wallet writes one read-only entry per run (pearl.episode.v2).
  • The insurer desk writes one patchable record per claim (pearl.claim.v1), updated at every status change.
  • The owner's run list, incident filter, home counters, claim status and the insurer's queue are all live Arkiv queries. No private data goes on Arkiv.

World:

  • Agent Pass uses OIDC with the device grant against the World IdP. We validate the ID token ourselves: signature, issuer, audience, freshness, the orb level, and that the subject is the owner.
  • IDKit v4 runs in the browser. The backend signs the request and verifies the proof with World's v4 API.
  • The action is claim-<run id> and the signal is the payout wallet, so one human gets one claim per incident. Reused proofs are rejected.

Encryption: AES-256-GCM with a fresh key for each run. The key is wrapped for the owner's P-256 key (ECDH + HKDF), and the robot signs with EIP-191. The same WebCrypto code runs in Node and the browser. When the owner files a claim, the browser re-wraps only that run's key for the insurer.

Firmware: ESP32-S3 N16R8 (PlatformIO, Arduino core 3). The safety loop needs no network:

  • a VL53L0X distance sensor watches the hand zone;
  • an MPU6500 motion sensor detects bumps;
  • a heartbeat watchdog catches lost connections.

On top of that, the board has a full device-first core in C++: the 0G call, sealing, signing, the 0G Storage upload, the anchor transaction, Arkiv calldata, bundles and Bluetooth (BLE GATT). An iPhone streams snapshots over Wi-Fi as the robot's camera.

Web app: React 19 + Vite, plain CSS and a three.js arm view. The frontend is on Vercel and the backend on Render.

Hacky bits worth mentioning:

  • We ported the robot's crypto and chain code to C++. To prove it matches, the TypeScript code generates test vectors and host tests check the firmware against them, byte for byte.
  • Offline robots pre-sign raw EIP-1559 transactions. We capture Arkiv's signed transaction with a custom viem transport, so anyone can broadcast it later without holding a key.
  • Uploads kept "succeeding" while files never appeared on 0G Storage, because nodes from another shard reported them as finalized. We now upload each segment to every node of the correct shard, and count only those nodes. There's also a direct node-download fallback for when the indexer can't find a file.
  • The MPU6500 on our board reports a chip ID the standard library rejects, so we wrote a small register-level driver.
  • The owner's wrapped key is embedded in the sealed file's header. That makes claims work even when the robot is offline: the dashboard reads everything it needs from Arkiv, 0G Chain and 0G Storage.
background image mobile

Join the mailing list

Get the latest news and updates

Pearl | ETHGlobal