Inspiration
When a cyclone hits the Tamil Nadu coast, fishing families stop earning the moment the warning goes up. Boats stay ashore, nets and engines get damaged, and the catch does not come back for weeks. Relief and insurance still run on claim forms, damage surveys and paperwork, so money usually arrives after the hardest days. Cyclone Michaung (December 2023) flooded Chennai and Pulicat. Cyclone Fengal (November–December 2024) crawled along the coast and crossed near Puducherry, hitting Cuddalore. In October 2025, SEEDS, Howden India and New India Assurance launched an off-chain parametric cyclone pilot for 2,500 families in Cuddalore, paying on wind speed and distance. That showed the idea works in our state. We wanted to make the trigger transparent, automatic and auditable by anyone, and to pay part of the money before landfall.
What it does
Kadal Kaval is a relief pool that pays without a claim:
- Pool. Families, NGOs, panchayats and CSR donors fund an on-chain escrow in a test stablecoin (mUSDC). Each policy is linked to a registered fishing harbour (Chennai Kasimedu, Pulicat, Cuddalore, Nagapattinam, Rameswaram in the demo).
- Oracle. India Meteorological Department best-track points (via NOAA IBTrACS) are checked by an AI sanity layer, then EIP-712 signed and posted on-chain. Spoofed or implausible readings (for example, a storm "moving" at 188 km/h) are held back before signing, and the contract has its own speed backstop.
- Trigger. The contract computes a fixed-point haversine distance from each storm fix to each harbour. If the centre is within a tier's radius and wind is above its threshold, every active policy at that harbour is paid as a top-up: once per tier per storm, never twice, capped at the highest tier reached. If the pool runs short, the shortfall is recorded on-chain and anyone can settle it later.
- Early relief. Every step, an AI nowcast predicts the storm at +12 h and +24 h with a threat score per storm. Above 60% threat, the pool opens an early-relief tranche: a 10% advance before landfall so families can secure boats and nets, deducted from any later payout.
- Explanations. Every payout, every early advance and every no-payout is explained in plain Tamil and English.
- Dashboard. A React + Leaflet map replays real storms step by step: harbour distances, nowcast cone, alerts, payout feed, decisions, policies, risk pricing and an impact panel, with a guided tour, large-text mode and a Tamil toggle.
Replaying real storms through the contracts (fictional members): Michaung paid 4 Chennai and Pulicat members a 30 mUSDC advance about 9 hours before the trigger, then 120 mUSDC more at the 50% tier (600 total). Fengal paid 8 members a 30 mUSDC early advance and Cuddalore its 15% tier (the storm passed 56 km away at 40 kt), 330 mUSDC. Together: 930 mUSDC, matched exactly by an end-to-end test.
Live on Polygon Amoy testnet. The contracts are deployed on Amoy (chain 80002). Signed by the oracle key, the Michaung replay paid 600 mUSDC on-chain and the Fengal replay 330 mUSDC, 930 in total, identical to the local replay. Contract: https://amoy.polygonscan.com/address/0xe1780950C453FdFea2c88462bD7d0c42CD7F89B3 (transaction links in the README).
How we built it
- Smart contracts (Solidity 0.8, Hardhat, OpenZeppelin 5): StormOracle (EIP-712 typed signatures, signer role, nonce replay protection, ordered observations, future-time and speed limits, pause), KadalPool (harbours, policies, tier table, top-up payouts, early-relief tranche, shortfall accounting, premiums and grants, AccessControl, Pausable, ReentrancyGuard), GeoMath (fixed-point haversine accurate to metres at 1–300 km), MockUSDC.
- AI (Python, scikit-learn): IBTrACS North Indian Ocean loader; anomaly checks with learned thresholds and IMD-vs-JTWC multi-source agreement; a blended nowcast (gradient-boosted trees + ridge regression on a persistence baseline) evaluated on held-out 2022–24 seasons; historical-burn risk pricing per harbour; Tamil/English explanation templates shared byte-for-byte with the web app.
- Relayer: replay.py signs and submits fixes and nowcasts with web3.py.
- Web: React 18 + Vite + Leaflet/OpenStreetMap, ethers v6, with a live mode (local Hardhat chain) and a static demo mode (recorded replay).
- Testing: 165 automated tests: 79 Hardhat (including fuzz/property tests and an end-to-end Michaung + Fengal replay), 59 pytest (including Hypothesis), 27 vitest, plus a Playwright end-to-end flow test. Contract coverage 100% lines, 84.7% branches; AI coverage 94%.
- Process: an MVP, then six improvement rounds (testing, refactor and security, AI, UX, impact, hardening), then a testnet deployment. ## Challenges we ran into
- Geometry on-chain. Solidity has no floats. We wrote fixed-point sin/cos/asin and checked the haversine against a float reference on 300 global pairs.
- Fair top-ups. Our first payout logic let a new payout consume a top-up reserved for earlier unpaid shortfalls. We fixed it and added a regression test.
- Honest AI. The nowcast beats persistence on held-out 2022–24 seasons, but the 2018–21 validation confidence interval includes zero. We report that rather than hide it.
- Basis risk. Fengal was mostly a rain disaster; a wind-and-distance trigger paid only a small amount. We show the no-payouts and explain them.
- Testnet gas. Public faucets mostly need captchas or accounts. We found a no-signup faucet and stretched two drips across the deployment and both storm replays.
Accomplishments that we're proud of
- A full claim-free flow on real storm data, with early relief before landfall.
- Deployed and working on a public testnet, matching the local replay to the token.
- 165 green tests, 100% contract line coverage, and a written threat model.
- Every decision, including every no-payout, explained in Tamil and English. ## What we learned
- Basis risk is the core product question. Of 31 North Indian Ocean storms (1990–2025) that came within 300 km of a covered harbour at 34 kt or more, our tier table would have paid on 16 (51.6%).
- A pool cannot run on premiums alone: with no reserve it runs short in 63% of bootstrapped 10-year histories, with a 0.5× cover seed reserve 3.4%. Premium is about Rs 938 a year for a fictional Rs 10,000 family cover.
- A small blended model beats persistence: track error 59.0 vs 66.1 km at +12 h and 125.8 vs 143.7 km at +24 h.
What's next for Kadal Kaval
- A rainfall and storm-surge tier to cut basis risk; a per-harbour threat score for early relief.
- Multiple independent oracle signers (k-of-n) on live IMD bulletins, with a dispute window.
- Batch or Merkle-based payouts; native-speaker review of the Tamil text with fishing cooperatives.
- A pilot with an NGO or panchayat through a licensed insurer under the IRDAI regulatory sandbox. Until then, run it as a grant-funded relief fund, not insurance. ## Track alignment Primary: Climate Data & Environmental Monitoring. Kadal Kaval turns authoritative climate data (IMD best tracks via NOAA IBTrACS) into verifiable on-chain events: AI cross-checks sources and flags anomalies before data is signed, a nowcast turns monitoring into early action, and the contract makes the link from data to relief auditable. Secondary fit: climate finance (on-chain adaptation funding with rule-based disbursement).
Data credits
- NOAA NCEI IBTrACS v04r01, North Indian Ocean (public domain): Michaung and Fengal tracks and nowcast training data.
- India Meteorological Department (RSMC New Delhi) via IBTrACS: official wind and pressure used for triggers. JTWC via IBTrACS: cross-check only.
- OpenStreetMap contributors (ODbL): map tiles. Software: OpenZeppelin, Hardhat, scikit-learn, React, Vite, Leaflet, ethers, web3.py.
- All members, names and amounts are fictional. mUSDC is a test token with no value.
AI-assistance disclosure
This project was built with substantial help from an AI assistant (Hark), directed and reviewed by me. It helped write the contracts, the Python AI service and the dashboard, generate tests, run analyses, draft the README and this story, and draft the Tamil text, which still needs native-speaker review. The demo voiceover is synthetic text-to-speech. The in-product AI is classical machine learning trained on IBTrACS; the explanations are deterministic templates. All numbers can be reproduced from the repository.
Built With
- ethers
- github
- hardhat
- javascript
- leaflet.js
- node.js
- openstreetmap
- openzeppelin
- playwright
- polygon
- python
- react
- scikit-learn
- solidity
- vite
- web3.py
Log in or sign up for Devpost to join the conversation.