π Inspiration
Smallholder farmers are among the most vulnerable to climate change, yet they often lack access to affordable and transparent crop insurance. Existing systems are slow, prone to fraud, and rarely data-driven. We wanted to build a solution that empowers farmers with trustless, automated insurance using smart contracts and real-time weather data β all without relying on centralized middlemen.
π€ What it does
AgriShield is a decentralized crop insurance platform that helps farmers protect their yields against climate risks like drought and excessive rainfall. It combines:
- Satellite-based weather monitoring
- Smart contract automation
- AI-driven support bot for onboarding and claims
When extreme weather is detected (e.g., no rainfall for 14 days or flooding conditions), a smart contract automatically verifies the event and triggers a payout β no paperwork or intermediaries needed.
π οΈ How we built it
- Smart Contracts: Written in Solidity to define insurance policies and automate payouts.
- Weather Integration: Pulled real-time weather data using Open-Meteoβs API, processed with
jq, and piped into contracts. - AI Agent: Integrated GPT-4o with LangChain to assist users with insurance questions and help submit claims (including images).
- Frontend: Built with React, supporting image upload, markdown chat, and confirmation prompts.
- Decentralized Storage (optional): IPFS or other Web3 storage could be used for storing claim data/images (not finalized).
π§± Challenges we ran into
- Parsing and formatting weather data into smart-contract-readable structures.
- Dealing with floating-point values in Solidity (no native support).
- Integrating base64 image uploads with the AI and smart contract system in a seamless way.
- Designing a UI that feels familiar while interacting with decentralized services and AI.
π Accomplishments that we're proud of
- A fully working prototype that allows farmers to talk to an AI bot, upload field photos, and trigger smart contract interactions.
- Real-time weather monitoring integrated into an on-chain logic path.
- A clean and simple UI that blends advanced tech (AI, blockchain, weather) with a human-centered experience.
π What we learned
- How to bridge off-chain data (like weather) with on-chain logic using oracles and automation.
- Practical strategies for handling vision input with GPT-4o.
- Designing user-friendly AI interfaces in high-stakes domains like insurance.
- Managing async interactions between AI agents, tools, and smart contracts.
π What's next for AgriShield
- Deploy to a testnet/mainnet with verified oracles.
- Add weather-based premium adjustment based on forecast trends.
- Integrate satellite NDVI data for yield detection and smarter payouts.
- Mobile-first UI for field use in low-connectivity areas.
- Partnerships with local cooperatives to expand access and trust.
Log in or sign up for Devpost to join the conversation.