hackquest logo

FarmOracle

Empowering Africa’s Smallholder Farmers through AI-driven Insights and Blockchain-Verified Market Access

Videos

Description

FarmOracle: Africa’s Autonomous AI Farming Oracle on the Blockchain

Empowering Africa’s Smallholder Farmers through AI-driven Insights and Blockchain-Verified Market Access

🌍 Introduction

FarmOracle is an innovative, AI-powered autonomous oracle and tokenized farming marketplace designed to revolutionize Africa's $1 trillion agricultural economy. By seamlessly integrating artificial intelligence, blockchain technology, and decentralized finance (DeFi), FarmOracle equips smallholder farmers with real-time actionable intelligence, secure trading mechanisms, and true data ownership.

This platform transforms raw agricultural data into digital assets and verifiable yield tokens, fostering a transparent, self-learning ecosystem. Farmers receive instant alerts via SMS, execute automated smart contract actions, and monetize their yields—while investors access impact-driven yields. Built for resilience, FarmOracle addresses climate vulnerabilities, market inefficiencies, and financial exclusion, aligning with the "Ubuntu" spirit of community-driven progress.

  • Live Demo:

  • API Endpoint:

  • Smart Contract:

🌾 The Problem

Africa's agriculture sector employs over 70% of the continent's workforce and holds immense potential, yet smallholder farmers face systemic barriers that result in staggering losses and perpetuated poverty:

  • Unpredictable Crop Losses: 20–40% of annual yields are destroyed by undetected diseases, pests, and erratic weather patterns, exacerbated by climate change.

  • Market Opacity and Exploitation: Lack of transparent pricing data leads to farmers underselling their produce by up to 30%, trapping them in cycles of low income.

  • Data Exclusion and Ownership Gaps: Farmers generate invaluable insights (e.g., soil health, yield patterns) but are excluded from the value chain, with no control over their data or access to DeFi opportunities.

  • Accessibility Challenges: Limited internet connectivity and crypto literacy hinder adoption of digital tools in rural areas.

These issues contribute to food insecurity for millions and stifle economic growth. FarmOracle tackles these head-on with an autonomous, inclusive solution.

💡 Our Powerful Solution

FarmOracle is a comprehensive, end-to-end platform that operates as a 24/7 autonomous AI oracle, bridging the gap between on-farm realities and blockchain-verified opportunities. It empowers farmers with predictive analytics, automates secure tokenization, and enables seamless market participation—all while ensuring data sovereignty.

Core Value Proposition

  • AI-Driven Autonomy: Intelligent agents monitor, predict, and act in real-time, reducing losses by up to 35%.

  • Blockchain Tokenization: Convert verified yields into NFTs and tokens for premium trading and staking.

  • Inclusive Design: SMS alerts and gasless transactions make it accessible to non-tech-savvy users.

  • Impact Yields: Investors earn 12–18% APY tied to traceable farming outcomes, blending profit with purpose.

System Workflow

Here's a high-level flowchart illustrating how FarmOracle works:

Key Features

  • Predictive Intelligence: Real-time forecasts for weather, prices, and soil health using localized African datasets (e.g., FAO, PlantVillage).

  • Autonomous Agents: LangChain-powered agents that detect issues (94% F1-score via EfficientNetB4) and trigger smart actions.

  • Tokenized Assets: ERC-1155 Yield NFTs and Soil Health certificates for verifiable, tamper-proof trading.

  • Privacy & Security: Zero-Knowledge (ZK) proofs via Semaphore to protect farmer identities.

  • Multilingual & Offline Support: Swahili/French/English interface with React app caching and Twilio SMS integration.

⚙️ How It Works

FarmOracle's architecture is modular and scalable, ensuring reliability in low-resource environments.

1. Autonomous AI Oracle

Powered by LangChain agents and ML models:

  • Plant Disease Detection: predict_plantdoc.py – Analyzes leaf images with EfficientNetB4.

  • Weather & Price Forecasting: predict_weather.py & XGBoost ensembles on NOAA/FAO data.

  • Soil Quality Assessment: predict_soil.py – ML classifiers for NPK analysis.

  • Agent Loop: ai_oracle_agent.py – Ingests data → Predicts → Acts (e.g., SMS: "⚠️ Blight detected—sell in 48hrs") → Learns from blockchain feedback.

2. Blockchain Integration

Deployed on Polygon for low fees and scalability:

  • Smart Contract: AgriMarket.sol – Handles NFT minting, staking pools, and ZK-secured registries.

  • Gasless UX: Web3.js relayer for seamless mobile interactions.

  • Transaction Flow: All actions (e.g., yield tokenization) are on-chain, verifiable via Polygonscan.

3. User Interface & Experience

  • Frontend: React.js + Tailwind CSS – Upload photo → View predictions → Tokenize & trade.

  • Backend: FastAPI (Python) for AI endpoints.

  • Dashboard: Streamlit for real-time analytics and ROI simulations.

Tech Stack Overview

Layer

Technologies

Frontend

React.js, Tailwind CSS, Web3.js

Backend

FastAPI (Python), Uvicorn

AI/ML

TensorFlow, PyTorch, Scikit-learn, XGBoost, OpenCV

Blockchain

Solidity (ERC-1155), Truffle, Ganache, Polygon Testnet

Privacy

Semaphore (ZK Proofs)

Agents

LangChain, Web3.py

Data/Tools

FAO/NOAA APIs, Pandas, NumPy, Twilio, Streamlit

Architecture Diagram

🧑‍🌾 Proven Impact

FarmOracle delivers measurable, sustainable outcomes:

  • Crop Loss Reduction: Up to 35% via early AI detection.

  • Income Boost: 25–40% higher returns from premium, verified sales.

  • Climate Resilience: 90% accurate localized forecasts.

  • Financial Inclusion: Enables 1M+ smallholders to access DeFi without barriers.

  • Data Ownership: On-chain storage ensures farmers control and monetize their insights.

🙏 Acknowledgments

  • Built for the Africa Blockchain Festival Hackathon 2025 (Project Ubuntu).

  • Data sources: FAO, PlantVillage, NOAA.

  • Thanks to the open-source community: LangChain, TensorFlow, Polygon.


FarmOracle: Sowing Seeds of Innovation for Africa's Future. 🌱🚀

Progress During Hackathon

Deployed

Tech Stack

React
Ethers
Web3
Node
Python
Solidity
ensorFlow
FastAPI

Fundraising Status

NA

Team Leader
AAaditya Rawat
Sector
RWAAIDeFi