AgriTrustAI

Self‑verified crop marketplace on Celo: mint SBT, claim ENS subname, auction crop NFTs.

AgriTrustAI

Created At

ETHGlobal New Delhi

Project Description

AgriTrustAI is a Self‑verified crop marketplace where farmers and buyers prove humanity, country eligibility, and sanctions checks using zero‑knowledge proofs before they can list, bid, or settle trades. Users complete Self verification in‑app; a successful on‑chain verification mints a non‑transferable “Verified Farmer” SBT on Celo. Verified users can then mint Crop NFTs, create auctions, and settle winning bids. ENS is integrated to make identities portable: verified users can claim an ENS subname (e.g., yourname.agritrustai.eth). The app resolves ENS names and avatars across listings, bids, and profiles, improving trust and UX while still preserving privacy. The dApp pairs identity with practical tools: inventory tracking, AI quality insights, and an IoT dashboard for climate/ethylene/moisture telemetry that informs pricing and bidding. Privacy‑first by design: only the proof outcome is recorded on‑chain; no PII is disclosed. Off‑chain, we store signed metadata and expose only what’s needed for the UX. The verification rules (age ≥ 18, country allowlist, OFAC) are adjustable.

How it's Made

Frontend: Next.js + TypeScript + Tailwind/shadcn UI, Recharts for charts, ethers v6 for wallet/tx. Deployed on Vercel. Global dark theme with a subtle animated green edge glow. Self integration: Offchain SDK builds a disclosure request (age, country, OFAC) and verifies via a Next.js API route. Onchain SDK integration on Celo (testnet 44787): a VerifiedFarmerSBT Solidity contract trusts Self Hub V2 and mints a soulbound credential when the proof succeeds. The app checks SBT ownership to unlock on‑chain actions. ENS integration: Server route mints subnames under a parent ENS name (e.g., agritrustai.eth) using the ENS Registry and Public Resolver, then points the subname to the user’s wallet. The UI resolves ENS primary names and avatars everywhere (fallback to short 0x). Subname claiming is gated by on‑chain SBT ownership on Celo. For demos, ENS writes run on Ethereum Sepolia; SBT lives on Celo testnet. The app handles both chains via per‑feature RPCs. Smart contracts and tooling: Solidity (Hardhat), separate deploy scripts for SBT and NFT, Celo RPC via Ankr/Forno. Optional CropNFT contract stores batch metadata as signed JSON. Data/IoT + AI: a small analytics pass computes risk scores from telemetry (temperature, humidity, moisture, CO₂/ethylene, airflow). A constrained LLM turns anomalies into brief operator tips; if AI fails, numeric summaries render without blocking.

background image mobile

Join the mailing list

Get the latest news and updates