proofbolt

A physical lock AI can't open alone: Arkiv grants, 0G decisions, on-chain proof, real hardware.

proofbolt

Created At

ETHGlobal Mumbai

Project Description

proofbolt is a physical lock, built on a real ESP8266 with a servo, that AI can't open by itself. It opens only when a live access grant on Arkiv, its secret access code, a 0G AI decision and a one-time signed command all pass. If any step fails, including 0G or Arkiv being unreachable, the door stays locked.

An owner creates an access link and QR code that lasts as long as they choose. The person scans it, and a 3D lock shows their camera and a random challenge, like "4 fingers". The photo goes to a 0G vision model, which answers OPEN, HOLD or ALERT. HOLD gives a new challenge, up to three tries. ALERT catches screens, printed pictures and notes trying to trick the AI. A separate policy then checks the grant again, so an owner can revoke access mid-attempt, and even a fooled AI can't open a revoked grant.

If everything passes, the gateway sends the board a signed one-time command. The board holds no AI and no policy: it only checks the signature, moves the bolt, and relocks after x time (5 seconds for now).

Every decision is recorded. The full record, with its 0G request ID, goes to 0G Storage, and its hash is anchored on 0G Chain, so anyone can rebuild and verify the history from 0G alone. A public status page reads only Arkiv: the locker's record lasts 60 seconds and the gateway keeps renewing it, so if the gateway dies, the record expires and the page shows Offline.

It's a prototype on testnets. Access works by secret link, with no identity check, and the gateway is a trusted party.

How it's Made

The gateway is TypeScript on Node with Hono, running on a laptop. It connects a React kiosk, the ESP8266 firmware (C++ with PlatformIO) and the two partner stacks.

0G: The gateway sends each photo and random challenge to the 0G Router (qwen3.8-flash), using its OpenAI-compatible API. Only a strict JSON answer counts, and anything else means no decision. If 0G is unreachable, the board shows SAFE STOP and the record shows no decision was made, with no fake fallback. Each hash-chained record, with its 0G request ID, is uploaded to 0G Storage using the TypeScript SDK, then a small Solidity contract, DecisionAnchor, anchors its hash and storage root on Galileo. "pnpm zerog replay" downloads every record with Merkle proofs and checks the hashes and chain. Publishing runs in the background, resumes after failures, and never affects the door.

Arkiv: Using @arkiv-network/sdk on Rabdi, we store grants, a live locker record, attempts, and pointers to the 0G records. Expiry is product logic: grants end by themselves, and the locker's 60-second record has to keep being renewed, so a dead gateway shows up with nobody reporting it. Anyone can transfer an entity to our wallet, so every read checks both creator and owner. Access codes never go on Arkiv, only a SHA-256 hash of a random 128-bit code. Arkiv is read twice per unlock, so a revocation during the AI call still counts.

The lock: Commands are signed with HMAC-SHA256 over a one-time nonce from the board, which sends back a signed acknowledgement. If the gateway goes quiet for 8 seconds, the board relocks. If Wi-Fi stays stuck for 60 seconds, it restarts, and it always comes back locked.

The front end uses React, Motion, Arc components installed through the shadcn CLI, and Three.js. The hacky part we like: the 3D padlock has no real screen, so we draw the live webcam, the challenge and the countdown onto a canvas and use it as a texture on the lock's face, while a scripted camera shoots it like a phone commercial. Each access link also cuts a 3D key whose teeth come from the grant's ID. Testing on the real board found a bug PC tests missed: a clock comparison wrapped around and relocked the door right after a valid OPEN. We chose the project, wired the hardware and ran the manual tests.

background image mobile

Join the mailing list

Get the latest news and updates

proofbolt | ETHGlobal