Live biometric prediction markets on Arc. Heart rate belt → iPhone → smart contract settlement.
Biometric Prediction Markets on Arc
A real-time prediction market platform where spectators bet on live athlete
performance using verifiable physiological data. Heart rate, HRV, steps, pace,
and cadence stream from a BLE chest strap and iPhone sensors through a relay
app to an onchain settlement layer — turning every race, workout, or
competition into a live trading floor.
Use cases: Crowd-sourced sports analytics, live event engagement, performance
forecasting, and biometric research. Spectators take positions on whether an
athlete's heart rate crosses a threshold, HRV drops under stress, or pace
holds over an interval. Markets resolve deterministically from sensor data —
no oracle trust assumptions.
Architecture: A Polar-compatible BLE chest strap transmits heart rate
measurements including RR intervals to an iOS relay app (Swift, CoreBluetooth,
CoreMotion). The app computes sliding-window HRV metrics (SDNN, RMSSD)
on-device and uploads telemetry batches to a Node.js backend. The backend
stores samples in Supabase, publishes snapshots to Chainlink CRE, and resolves
settlement queries. A Solidity prediction market contract on Arc handles
market creation, binary AMM trading, and USDC-collateral payouts. The frontend
(TypeScript, Vite, SVG) renders live telemetry, a real-time HRV distribution
bell curve, and trading interfaces — all settled with sub-second deterministic
finality.
Technical Architecture
The data pipeline begins at a Bluetooth Low Energy chest strap broadcasting
Heart Rate Measurement characteristics (0x2A37), including beat-to-beat RR
intervals at 1/1024s resolution. An iOS relay app (Swift, CoreBluetooth)
parses the BLE payload, extracts BPM and RR intervals, computes RMSSD and SDNN
over a 30-second sliding window using Gaussian statistics, and queues samples
with elapsed-millisecond timestamps into a durable on-device store.
CoreMotion's CMPedometer runs in parallel, capturing steps, cadence, and pace.
A background upload worker batches samples over HTTPS to a Node.js backend
with exponential backoff and network-aware retry.
The backend (TypeScript, Vite, ws) ingests telemetry into Supabase, maintains
a session registry, and publishes snapshots to a Chainlink CRE telemetry
receiver contract. Settlement resolution queries the nearest sample to a
target elapsed time and evaluates threshold comparisons for any signal type.
On Arc (chain 5042002, EVM-compatible), a Solidity 0.8.24 PredictionMarket
contract implements a constant-product binary AMM with USDC collateral
(6-decimal ERC-20 at 0x3600...0000). Market lifecycle: create, seed liquidity,
take YES/NO positions, close, request settlement, fulfill via operator,
claim. Gas paid natively in USDC at ~$0.01/tx with deterministic sub-second
finality.
The frontend renders live SVG telemetry charts and a vertical Gaussian KDE
distribution of RR intervals that reshapes in real time as data streams in.

