Inspiration
Flood response and wetland carbon both depend on a river reading, a map, and a score. Those three pieces usually live in different systems, so two organizations can cite the same place and still disagree. A carbon claim has the same failure: one wetland snapshot can be described twice and counted twice.
Proof Of Flow is the record that makes that harder. A flood desk and a wetland project open the same city, read the same screen, and optionally commit the same hash.
What it does
Open the live app and press Begin the Iowa City review. The globe flies from orbit to the coordinate. The watershed map draws 3D terrain, animated flowlines, and live USGS gauge pins. Iowa River gauge 05454500 sits inside that window, so the chart, the flood index, and the advisory all cite a real discharge.
Each snapshot then becomes a commitment:
- The app canonicalizes the place, the gauges, and the scores.
- It addresses that document as a raw CIDv1 and hashes it with
keccak256. - A connected wallet can store the hash in
HydroTrustVerifier. A second recording of the same hash reverts. - The contract mints capped dREC stewardship credits only when the flood index is 75 or below, the amount is at most
(100 − risk) × 10, and an hour has passed since the last mint. There is no admin mint.
There is no account. Search, read, export a briefing PDF, and connect a wallet only if you want the hash on-chain.
How the scores are built
Flood vulnerability is three published terms, summed and clamped to 0–100:
$$ F = \mathrm{clamp}!\left(40\,e^{-d/350} + S + Q,\; 0,\; 100\right) $$
- Proximity (0–40). (d) is meters to the nearest mapped stream.
- Slope (0–30). Low relief scores higher. A point in a local depression is penalized further.
- Discharge (0–30). Log scale of the nearest gauge against 50,000 ft³/s. Stage is used if discharge is missing. Stream density is the last resort.
Confidence is high only when a live gauge, elevation samples, and surveyed streams all contributed. It falls to medium or low as those inputs fall back.
Blue carbon uses class rates (salt marsh and mangrove highest, open water much lower). Annual sequestration is wetland area times the class rate. The 0–100 rating saturates near 25 tCO₂e/yr inside the analysis window, and the hectare total stays visible beside the score.
Outside the United States, flowlines and wetlands come from OpenStreetMap. If those services fail, the map falls back to a reproducible downhill flow model and labels it as a model.
How we built it
The workspace is one Next.js app. React Three Fiber draws the globe (NASA day and night imagery, clouds, an atmosphere shader) and flies the camera down to the chosen coordinate. MapLibre renders AWS terrain tiles and animated streams. Turf handles the distance and slope geometry. A hydrography route fans out to USGS instantaneous values, the National Hydrography Dataset, the National Wetlands Inventory, and Overpass, then returns whichever sources answered.
The advisory is plain language from those numbers. With an xAI or OpenAI key, a model writes it from the snapshot. With no key, a deterministic writer uses only the computed figures, so the demo never depends on a model being up.
HydroTrustVerifier.sol is a single Solidity 0.8.24 file. The app computes the CID and the keccak hash locally before a wallet signs. If no contract address is configured, the panel keeps a local commitment and does not invent a transaction hash.
Challenges
Public hydrography services rate-limit and sometimes return 5xx. The route treats each source independently, lists what answered under Data notes, and refuses to hide a good USGS response behind a failed Overpass call. The Vercel function needs a long timeout; maxDuration is 60 seconds.
The harder design problem was making the hash mean one thing. Field order, units, and missing gauges all change the bytes. The snapshot is canonicalized before it is addressed, so two people looking at the same reading produce the same CID.
The other challenge was stopping the chain from overclaiming. The flood index is a screening score for a briefing. dREC is a hackathon stewardship token with a hard cap and a cooldown. The interface says both out loud, next to the equation and next to the hash.
What we learned
A climate number is only useful if someone else can replay it. The live gauge, the mapped stream, the equation, and the content hash have to travel together. The on-chain rule that matters is the refusal: a duplicate snapshot reverts, and stewardship credits stay off when flood risk is high.
Log in or sign up for Devpost to join the conversation.