Search projects, hackathons, sponsors and tech

    ← All projects

    HarvestFi

    HarvestFi: Tokenized harvest forwards unlocking DeFi capital for Ugandan farmers

    Demo

    About

    The Problem Smallholder farmers in Uganda produce high-value cash crops like coffee, vanilla, and maize, but face a critical liquidity trap. Lacking access to traditional bank credit, they are forced to sell their harvest immediately at the time of harvest when market prices are at their lowest, just to cover immediate living and farming expenses. Meanwhile, global impact investors and DeFi users seek real-world yield but lack transparent, accessible, and trustless avenues to deploy capital directly into emerging market agriculture. The Solution HarvestFi bridges this gap by tokenizing future agricultural harvests into Real World Assets (RWAs). We enable farming cooperatives to issue "Harvest Forward Contracts" on-chain. These contracts are funded upfront by global investors using stablecoins (USDC), providing farmers with the working capital they need during the growing season. In return, investors receive a yield-bearing token (e.g., hCOFFEE) that is redeemed for a premium once the physical crop is delivered and sold to a verified off-taker. How It Works The Farmer (Invisible Web3): A cooperative in Uganda uses a simple WhatsApp bot to declare their expected yield (e.g., 1,000kg of Arabica coffee). Using Account Abstraction (ERC-4337), the backend creates a smart wallet for them in the background—no seed phrases or complex crypto knowledge required. They can even upload geotagged photos of their crop via WhatsApp, which are stored on IPFS as immutable proof of the asset. The Investor (DeFi Yield): Global investors browse a sleek Next.js dashboard, review the IPFS-backed farm data, and fund the contract with USDC. Once the funding goal is met, the smart contract instantly routes the USDC to the cooperative's local mobile money wallet (MTN/Airtel) via a fiat off-ramp integration. The Settlement (Trustless Execution): At harvest, the verified off-taker (e.g., a local coffee exporter) purchases the physical crop and deposits the final payment into the smart contract. The contract automatically burns the harvest tokens and distributes the principal plus the agreed-upon yield proportionally to the investors' wallets.

    How it's made

    Architecture & Core Technologies HarvestFi is a full-stack decentralized application bridging traditional agriculture with DeFi. The architecture is divided into three layers: On-chain smart contracts, a Next.js investor dashboard, and a Node.js WhatsApp backend for farmers. Smart Contracts (Base & Foundry) We built the core protocol using Solidity, tested rigorously with Foundry for fast, reliable execution. We deployed to Base (our L2 partner) because its low gas fees and native USDC integration are critical for micro-transactions in emerging markets. The core HarvestPool contract utilizes OpenZeppelin’s ERC20 and ERC20Permit standards to mint yield-bearing harvest tokens and handle gasless approvals, allowing investors to fund contracts without holding ETH for gas. Frontend & Storage (Next.js, Privy, & Pinata) The investor dashboard is built with Next.js and Tailwind CSS. We heavily leveraged Privy (partner tech) to implement Account Abstraction (ERC-4337). Privy allowed us to sponsor gas fees and enable social logins, completely abstracting the blockchain for the end user. For the Real World Asset (RWA) verification, we integrated Pinata (partner tech) to pin geotagged crop photos and cooperative documents to IPFS. The resulting Content Identifiers (CIDs) are stored directly in the smart contract, providing immutable, trustless proof of the underlying physical asset. The "Hacky" & Notable: The WhatsApp-to-Blockchain Bridge The most notable (and slightly hacky) piece of the project is how we solved the farmer UX. Smallholder farmers in Uganda do not use dApp browsers; they use WhatsApp. Instead of forcing them to download a wallet, we built a Node.js backend integrated with the Twilio WhatsApp API. When a farmer sends a text or voice note like "I have 500kg of coffee ready in 60 days", our backend parses the intent using basic NLP. It then generates an EIP-712 typed data payload and uses a backend relayer to execute the transaction on their behalf via Privy. To the farmer, it’s just a chat interface; to the blockchain, it’s a fully signed, gasless smart contract interaction. We essentially turned a WhatsApp chat into a Web3 wallet. Closing the Loop (Mock Off-Ramp) To demonstrate the full financial loop during the hackathon, we built a mock API endpoint simulating a Mobile Money (MTN MoMo/Airtel) fiat off-ramp. This shows judges exactly how the USDC released by the smart contract upon settlement would instantly convert to Ugandan Shillings (UGX) and land directly in the farmer's local mobile money wallet, completing the bridge between DeFi and the real-world economy.