Mohar

Any IoT device signs its own readings, an AI can only add caution, and a chain keeps the record.

Mohar

Created At

ETHGlobal Mumbai

Project Description

Mohar is a method that makes any IoT device verifiable. Today a device's reading reaches the people who rely on it through someone's server, and they take that server's word. Mohar removes the server from the trust path. The device has its own name on ENS, holds its own key, builds and signs its own reports, and sends them straight to a public chain through the Ethereum alternative mempool, with no backend, no custodial signer and no relayer. A 0G model gives a second opinion on every report, but it can only make the device more careful: it can never clear a hold, and if 0G is unreachable the device stops safely instead of guessing. Every decision is logged to 0G Storage with its request ID and can be replayed against the chain.

Our demo device is a prepaid electricity meter. A Raspberry Pi Pico plays the meter's pulse output, and an ESP8266 does everything else on real hardware: it counts pulses, runs fixed checks, asks 0G, signs, and reports to a ledger that keeps credit, arrears and inspection holds. Swap the pulse input for any sensor and the rest stays. The meter is simulated, nothing measures real electricity, and nothing disconnects a supply.

How it's Made

Firmware (C++ on an ESP8266, PlatformIO): Keccak-256, a custom hash-based one-time signature (Winternitz w=16, 67 chains, a Merkle tree of 256 keys, 2,400-byte signatures), an RLP encoder that builds the EIP-8141 frame transaction itself, and TLS 1.2 to a public RPC. Before signing, the chip saves its intent to flash so a power cut can never reuse a one-time key; we pulled the power three times mid-signing to prove it. A stack-overflow bug that caused resets was found by measuring free stack, and fixed.

Contracts: MoharAccount and QuotaPaymaster in Yul (signature check in 89,161 of the 90,000 validation gas allowed), MachineLedger in Solidity. A frame transaction runs four frames: account verifies, paymaster approves, ledger records, paymaster settles. Ethereum Foundation track: the paymaster reads its own quota storage, which the canonical mempool refuses (StorageReadNonSender); the ERC-8421 alternative mempool admitted the same bytes and mined them on the public devnet. We built a local copy of the devnet and sidecar to test admission rules before funds arrived.

ENS: ENSv2 on Sepolia, with a fleet registry, a Permissioned Resolver and Enhanced Access Control roles. meter-001.mohar.eth holds the ledger, paymaster, key root and log pointer; the dashboard finds everything from the name, and a maintenance key can edit only its own record.

0G: qwen3.8-flash on 0G Private Computer, chosen after testing 19 scenarios five times each, called by the device itself with a strict RUN or INSPECT allowlist. Episode logs go to 0G Storage and replay against the chain. Dashboard: Vite, React, TypeScript and viem, plus a three.js entry page.

background image mobile

Join the mailing list

Get the latest news and updates