Inspiration

Traditional insurance is broken — slow claims processes, opaque decisions, and payouts that take weeks or months. We asked: what if insurance could pay you automatically, the moment a disaster is verified, with no human in the loop? Farmers losing crops to drought, travelers stranded by flight delays, and families hit by floods all deserve instant relief — not paperwork. That idea became blockPolicy.

What it does

blockPolicy is a decentralized parametric insurance platform built on the Algorand blockchain. Users purchase policies tied to real-world trigger conditions — weather, flight delays, and natural disasters. When the oracle detects the trigger using live data from OpenMeteo, WeatherAPI, OpenSky, and USGS, the smart contract automatically executes the payout on-chain. No claims form. No adjuster. No waiting.

Key features include:

  • 🌧️ Weather policies — payout when rainfall drops below your threshold at your GPS location
  • ✈️ Flight policies — payout when your flight is delayed beyond a set window
  • 🌍 Disaster policies — payout when a seismic or flood event exceeds a magnitude at your region
  • 🔮 Multi-source oracle consensus — 4 independent data APIs cross-checked before any payout fires
  • 🛡️ On-chain KYC — identity documents stored permanently on IPFS via Pinata; only verified users can buy policies
  • 📊 Live Oracle Demo Panel — anyone can paste a Policy App ID and watch live data fetched in real time, then trigger a payout transparently
  • 📜 On-chain audit trail — every policy and payout recorded as Algorand transactions, verifiable on AlgoExplorer
  • 📧 Real-time email notifications — confirmations and payout receipts with on-chain transaction links
  • 🌐 Public Explorer & Dashboard — live ledger of all policies, payouts, and pool balance

How we built it

  • Smart contracts — PyTEAL / Algorand AVM: PolicyContract (create, trigger_payout, expire_policy), LiquidityPool, and OracleRegistry
  • Oracle engine — Node.js + Express backend deployed on Vercel, polling 4 real-world APIs and calling trigger_payout on matching contracts via algosdk
  • Frontend — React + Vite with Lute wallet integration (WalletConnect) for signing transactions directly from the browser
  • KYC system — Document upload (PAN, Aadhaar) stored on IPFS via Pinata with an admin approval flow
  • Persistence — Pinata IPFS used as a distributed database with TTL-based cache and read-merge-write strategy to survive Vercel's stateless serverless model
  • Email — Gmail OAuth2 via Nodemailer for all policy lifecycle notifications

Challenges we ran into

The hardest challenge was Vercel's serverless execution model — multiple warm lambda containers each hold independent in-memory state, so policies written by one container were invisible to another. We architected a Pinata IPFS persistence layer with a 10-second TTL cache refresh and a read-merge-write strategy, so no container can ever overwrite data written by another.

Algorand's transaction model also required careful sequencing — the oracle must be the app creator to authorize trigger_payout. This meant the server creates the contract first, then returns an unsigned payment transaction for the user to fund via their wallet — a two-step atomic flow that took significant design work to get right.

Accomplishments that we're proud of

  • Fully on-chain parametric payouts running live on Algorand Testnet, verifiable on AlgoExplorer
  • Live oracle pulling from 4 independent real-world data sources with consensus logic
  • Complete end-to-end KYC flow with permanent IPFS document storage
  • Real email delivery (not simulated) on every policy lifecycle event
  • Sub-4-second payout finality — from oracle trigger to wallet receipt
  • A public Explorer and Dashboard providing full platform transparency with zero trust assumptions

What we learned

How to architect stateless serverless backends that behave like stateful systems using IPFS as a distributed database. We deepened our understanding of Algorand's AVM — specifically how inner transactions allow a smart contract to push ALGO directly to a beneficiary, trustlessly, with no custodian involved. We also learned that parametric insurance is uniquely suited to blockchain: the trigger condition is objective, the payout is deterministic, and the entire contract fits in immutable on-chain code. And one hard-won lesson: always .trim() your environment variables.

What's next for blockPolicy

  • Mainnet deployment with a real ALGO liquidity pool open to investors
  • Stablecoin payouts — USDC on Algorand so coverage value isn't affected by ALGO price volatility
  • Stronger oracle guarantees — Chainlink or DIA integration for cryptographically signed data feeds
  • DAO governance — token holders vote on threshold parameters, pool risk limits, and new coverage types
  • Policy NFTs — coverage certificates as tradeable Algorand Standard Assets on the NFT ecosystem
  • Mobile app with push notifications triggered the moment a payout lands on-chain

Built With

Share this project:

Updates