Inspiration

Every harvest season, millions of tons of agricultural stubble (paddy and wheat straw) are burned in open fields across farming regions. Farmers operate under tight planting deadlines and lack affordable, traceable channels to move straw to biomass facilities. This practice causes catastrophic seasonal air quality crises, dangerous $PM_{2.5}$ spikes, carbon emissions, and severe topsoil nutrient loss.

While bio-pellet plants, biofuel refineries, and green thermal boilers want this biomass, the supply chain is vulnerable to systemic fraud: duplicate weighbridge tickets, fictitious intake receipts, and untracked volume discrepancies that undermine carbon credits and clean energy subsidies.

We built StubbleTrail to solve this trust bottleneck by creating an auditable, tamper-evident digital custody chain from the individual field plot to the processing facility.

What it does

StubbleTrail connects four distinct supply chain roles into a verifiable custody pipeline:

  • Farmer Declaration: Farmers register plots, expected residue volumes, harvest methods, and declare readiness.
  • Collector Logistics: Haulers record pickup quantities, actual event timestamps, and supporting transport evidence.
  • Processor Intake & Pathway: Facilities log weighbridge scale receipts, moisture metrics, and the designated green conversion pathway (e.g., biochar, briquettes, bio-ethanol).
  • Auditor Review & Conflict Engine: Auditors examine custody history. An automated conflict graph flags duplicate weighbridge tickets across batches, byte-identical document re-uploads, and chronology gaps.
  • SoilSafe Advisory: Prevents over-harvesting by calculating site-specific retention recommendations so that soil biodiversity and organic matter are protected.
  • AI Document Extraction: Uses Google Gemini to extract data from physical weighbridge slips and lab reports with human-in-the-loop review.
  • Cryptographic Integrity & Public Proofs: Every transition generates a canonical SHA-256 hash. Approved batches anchor cryptographic commitments to Ethereum Sepolia, accessible to the public via lightweight QR verification.

How we built it

  • Frontend: Next.js (App Router, React 19, TypeScript, Tailwind CSS) delivering responsive workflows for field collectors and desktop audit dashboards.
  • Backend & Storage: Supabase (PostgreSQL with Row-Level Security, transactional versioning, and secure document storage).
  • Cryptographic Event Chain: Canonical JSON serialization and SHA-256 state hashing paired with an interactive in-browser Tamper Lab that demonstrates instant tampering detection.
  • AI Document Parsing: Google Gemini API configured with schema validation, rate limits, and mandatory manual sign-off.
  • Blockchain Registry: Hardhat & Solidity smart contract deployed to Ethereum Sepolia to anchor approved batch fingerprints.
  • Quality Assurance: Vitest and Playwright test suites covering multi-role end-to-end workflows.

Challenges we ran into

  • Moisture Loss vs. Fraud: Agricultural biomass naturally loses moisture in transit. Distinguishing legitimate evaporation from volume theft required flexible tolerance thresholds and structured auditor investigation states.
  • Preventing Automated AI Overrides: Designing the Gemini document parser so that suggestions never auto-overwrite ground-truth measurements without explicit human auditor confirmation.
  • Frictionless Web3 Architecture: Ensuring field operators and farmers do not need crypto wallets or gas tokens to interact with the system, while retaining decentralized cryptographic proof for the public.

Accomplishments that we're proud of

  • Delivering a live, fully deployed, and end-to-end verifiable application.
  • Building the SoilSafe module, demonstrating that genuine sustainable supply chains must protect local soil ecology rather than blindly maximizing biomass extraction.
  • The interactive Integrity Lab, allowing judges and visitors to intentionally tamper with synthetic batch records in real-time and observe the cryptographic chain fail.

What we learned

Scaling the circular bioeconomy is primarily a data trust problem. Without cryptographic accountability and multi-role verification at the collector tier, green supply chains remain vulnerable to greenwashing.

What's next for StubbleTrail

  • IoT Scale Integration: Connecting weighbridge load cells and digital moisture probes via direct serial/MQTT feeds to remove manual entry entirely.
  • Satellite Burn Verification: Integrating satellite thermal hotspot feeds (e.g., NASA FIRMS) to cross-verify that registered plots experienced zero open-field fires during harvest.
  • Carbon Registry Connectors: Direct export plugins for Verra and Gold Standard agricultural residue avoidance carbon accounting methodologies.

Built With

Share this project:

Updates

Submission history