Tremor Mesh

Residents' phones become a tamper-proof vibration witness: a tremor counts only when many agree.

Tremor Mesh

Created At

ETHGlobal Mumbai

Project Description

Metro lines and redevelopment shake Mumbai's old buildings every day. When residents complain about cracks, the only records belong to someone else: the contractor's site log, the authority's monitor, a spreadsheet. Each can be edited or withheld by one party, and residents' own phone readings get dismissed as "not accurate enough" (MMRC, 2017).

TremorMesh turns the phones residents already own into a shared vibration record that nobody can rewrite, not even us.

SENSE: each flat keeps one phone lying on the floor, running our web app (no install). It filters the motion sensor, computes peak particle velocity (mm/s) and fires only on a sudden change. A phone that is tilted or held in a hand is labelled "handling" and can never count.

AGREE: one phone proves nothing. An event is confirmed only when k registered phones (k = 3 on our demo site) feel it within the same window (2000 ms). A 3-tone sound chirp aligns phone clocks, even offline.

PROVE: the building committee invites each phone with a one-time QR; the phone gets its own ENSv2 subname, and the site rules (k, window, max phones) are public ENS text records. Every reading is signed by a key that never leaves the phone and written straight to Arkiv. Every viewer's browser recomputes the quorum; no server of ours decides anything. A revoked phone's new readings are refused, but what it witnessed before still stands (as-of rule). Confirmed events are sealed as evidence packs on Swarm, with the pack hash on Arkiv. Switch our servers off and a single offline HTML file rebuilds and verifies everything from Arkiv, ENS and Swarm.

MAP (disaster mode): when a stronger quorum detects an earthquake, our companion Android app lets phones mesh over Bluetooth and Wi-Fi with no internet, relaying signed "I'm safe" / "I need help" check-ins and showing who hasn't been heard from; everything syncs to Arkiv when any phone reconnects. Next: using signal strength between phones for relative distances, to show rescuers where someone was last.

Tested live at ETHGlobal Mumbai: 4 phones on a table, 141 readings, 137 refused (79 lone phone, 44 handling, 14 not registered), 1 event confirmed by 3 phones at 23:00:41 and sealed on Swarm. The dashboard can replay that recorded session.

What we claim: a corroborated event in a vibration band at a time, co-signed by registered flats. Not a finding that a legal limit was exceeded, and not geophone-grade.

How it's Made

TypeScript monorepo (npm workspaces): packages/core (pure logic, unit-tested), packages/chain (Arkiv, ENSv2, Swarm), apps/web (Vite web app + Vercel functions). Live at tremor-witness.vercel.app.

Sensing (packages/core): the browser's Generic Sensor API (LinearAccelerationSensor, ~60 Hz). Each axis is band-passed (2 Hz high-pass removes tilt and hand sway, 25 Hz low-pass), integrated to velocity with a second high-pass against drift, and an STA/LTA detector fires on sudden changes. Peak velocity (PPV) and dominant frequency are reported. Handling rejection uses tilt (>15°) and the share of energy below 3 Hz.

Quorum: a pure, deterministic function. Sort valid triggers, slide a window from each anchor, take the first trigger per phone; at least k distinct registered phones means an event. Because it is pure, every dashboard, the offline viewer and the Android app compute the same answer from the same signed data.

Sound sync (hacky part): phone clocks were seconds apart. A phone plays a 3-tone chirp (3/5/7 kHz); the others detect it with a Goertzel filter on the mic and write sync anchors, so readings are aligned to one shared instant with no internet.

Arkiv: every reading is an Arkiv entity written and signed by the phone's own in-browser key, so $creator is the phone itself, with no relayer. Raw triggers expire; confirmed events last longer. The quorum is literally a query over Arkiv, recomputed by every viewer. Invite issue/use is also logged on Arkiv.

ENSv2 (Sepolia): <phone>.<site>.tremorwitness.eth subnames are the registry of who counts. Site rules live in text records (tw.k, tw.window_ms, tw.max_phones, plus tw.dk / tw.dwindow_ms for disaster mode). The as-of rule only counts a reading if the name was registered to its writer both at the claimed time and when Arkiv recorded it, so revocation stops future readings without rewriting the past, and a revoked phone cannot backdate.

Swarm: confirmed events are packed (members, readings, ENS snapshot) and uploaded to Swarm; the keccak hash goes on an Arkiv event entity. The report page and scripts/verify-event.ts check the pack against the hash.

Servers are optional: our Vercel functions only drip test gas, sign invites and register names. A single-file offline viewer reads Arkiv, ENS and Swarm directly.

Disaster Mesh Android app (Kotlin, extensions/disaster-mesh): built on SafeMesh, our earlier GPL-3.0 fork of bitchat-android, for its Bluetooth / Wi-Fi multi-hop mesh. We added site join via the same invite QR (ENS mesh- subnames), a Kotlin port of the quorum checked against 307 shared test vectors, signed check-ins, a roster of who hasn't been heard from, and Arkiv sync on reconnect.

Website: the team's own design, run through a small Preact runtime. AI assistance is documented in docs/AI_USE.md.

background image mobile

Join the mailing list

Get the latest news and updates