Trustless Insurance Market Using Web2 Connectivity I Nik Erzetic
Thu, Oct 2, 2025, 12:00 AM
In this Flare Builder workshop, developer advocate Nik Erzetic walks through building a trustless insurance market using Flare’s Data Connector (FDC) to bring Web2 weather data onchain. Learn how to connect to the OpenWeather API, create decentralized insurance policies, and resolve payouts automatically based on verifiable offchain data. Nik explains the full smart contract workflow—from policy creation, claiming, and settlement to using JSON API attestations for proof of loss. You’ll see how to integrate coordinates, minimum temperature thresholds, coverage amounts, and premiums into a decentralized application without centralized intermediaries. This step-by-step coding session covers policy lifecycle management, smart contract security patterns, and the technical details of fetching, encoding, and decoding real-world weather data in Solidity. Perfect for blockchain developers looking to connect real-world data to DeFi and Web3 applications. 00:00 Introduction 01:33 Workshop details & quiz info 02:16 Using OpenWeather API 03:01 Insurance market concept 04:55 Policy creation process 05:39 Policy resolution rules 07:11 Decentralization of proof submission 08:09 Flare Data Connector overview 09:13 API requirements & JSON format 12:05 Weather station coordinates 13:32 Minimum temperature data 14:18 Flare Developer Hub & Hardhat starter 15:58 Smart contract structure 17:22 Policy data fields 18:37 Loss criteria & thresholds 19:14 Policy status enum 20:29 Creating a policy 23:44 Claiming a policy 26:59 Security in state updates 27:41 Resolving a policy with proof 29:42 JSON API verification onchain 31:09 Coordinate matching for verification 32:29 Paying out coverage on loss 33:04 Expiring a policy 33:49 Retiring unclaimed policies 35:01 AI signature hack for encoding data 36:58 Transforming API data for Solidity 38:35 Using jq filter for JSON parsing 39:10 Handling floating point numbers in Solidity _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇺🇸 *ETHGlobal New York* This workshop is specifically for ETHGlobal New York, a 3-day hackathon held August 15-17, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! Watch the full ETHGlobal New York 2025 playlist here: https://www.youtube.com/playlist?list=PLXzKMXK2aHh4Xze0ZeSWCSGsw25clPpvZ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ *Follow Flare Network* X: https://x.com/FlareNetworks ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _