PranaNet

Honest air-quality nodes anyone can run: signed, cross-checked, slashable readings you can verify

PranaNet

Created At

ETHGlobal Mumbai

Project Description

Air-quality readings are easy to fake, and it keeps happening. In 2016, officials in Xi'an stuffed cotton into air monitors; seven were jailed. In Delhi in 2025, officials were accused of spraying water around monitoring stations, and 163 hours of peak Diwali data were reported missing. Whoever is being measured often holds the meter. PranaNet is a democracy of honest air sensors. Anyone can run a node. Each node generates its own key and signs every reading on the device, so nobody downstream, including us, can change it. Operators prove they're unique humans with World ID (at most three nodes each), so nobody can fake a crowd. Every node gets an ENSv2 name with its location cell. Raw readings are public on Arkiv, so anyone can re-check them. Every epoch, each node is compared with its neighbours and the nearest official monitor; three outliers in a row and it's slashed: its stake goes to the reward pool and its ENS name is revoked. Customers, including AI agents paying over x402 on Hedera, buy the cross-checked data, and that revenue pays honest nodes. Cheaters pay the honest. We start in Mumbai, where dust monitoring is legally required at 3,166 construction sites and BMC pays auditors to check sensors by hand. Then Delhi NCR, where the idea began, then any city that argues about its air. No token: rewards come from revenue.

How it's Made

Hardware and firmware: two ESP32 DevKit boards with Sharp GP2Y1014 dust sensors (10k/22k divider into an ADC1 pin) and a DHT22. Each board generates its own secp256k1 key on first boot and keeps it in flash. It signs every reading with the mbedTLS library that ships with the ESP32 core (RFC 6979 deterministic signatures, low-s), plus our own Keccak-256 and recovery-id code. The device packs a 264-byte message (device, epoch, PM2.5, PM10, temp, humidity, nonce, chainId, contract address) and signs it EIP-191 style. A serial self-test proves the device's signature is byte-identical to viem's. Each node gets a one-point calibration against the nearest official monitor when installed.

Contracts (Solidity, Foundry, 51 tests including fork tests against live ENSv2 on Sepolia): Registry, Readings, Stake, RewardPool and DeviceNamer. Readings rebuilds the message, runs ecrecover and rejects replays. Three consecutive neighbour flags slash a node: its stake moves to the reward pool, it's deactivated and its ENS name is revoked in the same transaction.

How each partner helped:

  • ENSv2: every node gets a readable, accountable name like bkc-01.prananet.eth through the ENSv2 UserRegistry and PermissionedResolver, with addr, geohash and status records. Owners can only edit metadata; the network revokes a cheater's name.
  • World ID 4.0: stops one person faking a crowd of sensors. IDKit on the web uses the node's address as the signal; the relayer verifies the proof server-side with the v4 verify API and checks the signal hash; the contract caps each human at 3 nodes. Proof of Human gives uniqueness without revealing identity.
  • Arkiv: every raw reading, device and flag is a public entity on Arkiv (Rabdi testnet), queryable by location cell, node and time, with the signature stored alongside. Readings expire after 3 days, flags after 30, while summaries stay on Sepolia. The website queries Arkiv straight from the visitor's browser and re-verifies signatures there, so nobody has to trust our server.
  • Hedera + x402: AI agents buy the cleaned, cross-checked data per request. The API returns HTTP 402, the agent pays in HBAR through the x402.org facilitator on hedera:testnet, with a hard budget cap and every purchase logged to an HCS topic. A bridge re-checks each payment on the Hedera mirror node, then funds the reward pool on Sepolia, and honest nodes claim from it.

Off-chain: a Node/TypeScript relayer (viem) that can't alter data, only deliver it. It checks signatures and nonces, writes to Arkiv, submits to Sepolia and streams a live feed. A verifier compares each node with the median of its neighbours and the nearest OpenAQ reference station and calls flag() on-chain. Relayer, verifier and API run on Render; the Next.js site (folk-art story with interactive "try to cheat" and tamper demos, plus a live map) runs on Vercel.

Hacky bits: Sepolia contract creation needed about 7x forge's gas estimate, so the deploy script applies a multiplier. Arkiv string columns cap at 128 bytes, so signatures are stored as bytes. The contract's try/catch around the ENS revoke hid an out-of-gas error, so the verifier now sends flag() with a fixed gas limit. And a node that booted in smoky air set its zero point too high and got slashed while honest, so the firmware's baseline can now only move down.

background image mobile

Join the mailing list

Get the latest news and updates