Hazard Commons

Rival delivery robots in a 3D Mumbai share one verified hazard map, decided and enforced on 0G.

Hazard Commons

Created At

ETHGlobal Mumbai

Project Description

Quick-commerce companies run fleets of delivery robots and drones from dark stores. When one robot finds an accident, road works or a waterlogged lane, every robot should know, including a rival's. But rivals don't trust each other: an operator could hide reports or post fake ones to slow competitors, and nobody accepts a rival owning the shared map.

Hazard Commons simulates real Bandra West, Mumbai (OpenStreetMap buildings and roads, SUMO traffic, PyBullet rovers and drones) with three fictional operators: ZipKart, MinuteMart and DashKirana. At every checkpoint the robot asks 0G Compute: is this a hazard, is it passable for my body type, do I trust a rival's report, does my verifier confirm or dispute it? Reports are staked on 0G Chain and confirmed only when a different operator's robot or drone verifies them; fake reports are disputed and slashed. Every decision is written to a hash-chained episode log on 0G Storage that anyone can re-verify in the browser.

If 0G is unreachable the robot pulls over (SAFE_STOP). It never fakes a decision with a heuristic, cache or other AI provider.

Agents that pay for themselves: each robot body has its own credit wallet, pays for each 0G call at the Router's real billed cost, switches to a cheaper 0G model when credit runs low, pauses when it runs out, and is refilled with no human: its operator reinvests on-chain earnings (stakes refunded when rivals confirm its reports) through a real Galileo deposit into a ComputeCreditVault contract.

Extras: rovers ask bystanders questions in Hindi or English through speaker and mic at a hazard, interactive order placement with a map pin, disaster injection anywhere on the map, and a replay of a real recorded run.

How it's Made

Sim: Python 3.11, PyBullet bodies (rovers, quadcopter drones, lidar, cameras), SUMO via libsumo for left-hand Mumbai traffic, OpenStreetMap to meshes and a road graph, FastAPI + WebSocket. Three.js + Vite viewer (live and replay), deployed on Vercel.

0G Compute: the OpenAI-compatible 0G Router with model 0gm-1.0-35b-a3b (vision, TEE provider, sealed requests). Checkpoints: CP-H1 hazard photo, CP-H2 route-ahead, CP-V verification, CP-D drone, CP-Q bystander testimony. Every decision card shows the 0G request id, cost and model. Steering, braking and drone stabilisation stay local: 0G is the brain, not the spinal cord.

0G Chain (Galileo): Foundry contracts. HazardRegistry (staked report, verification by a different operator, confirm/reject, slash) and ComputeCreditVault (per-robot compute-credit deposits).

0G Storage: hash-chained per-robot episode batches with evidence frames, uploaded with the official TS SDK. The viewer's Verify log button downloads a root from the 0G indexer and recomputes every sha256 link in the browser with WebCrypto.

Robot wallets: each body's ledger is debited with x_0g_trace.billing.total_cost_usd_micro. Tiers: normal, economy (cheaper qwen2.5-vl-72b for photos, shown as NO TEE), throttled, paused (SAFE_STOP, no model call).

Hacky parts: the 0G testnet Router API was unreachable all weekend, so its billing side is a clearly labelled local stand-in (same /v1/account/balance and 402 shape) that credits robots from real vault deposits and forwards every inference call unchanged to the real 0G Router. PyBullet renders look like toys, so a CC-licensed photo of the hazard type is composited into the frame sent to the vision model (credits in the repo).

Built with Claude Code, using parallel sub-agents per workstream.

background image mobile

Join the mailing list

Get the latest news and updates

Hazard Commons | ETHGlobal