OpenGrano
Incubated · Avalanche Codebase

OpenGrano

Agricultural Finance Protocol — Connecting global capital with Argentine farmers via blockchain

Co-founder & Product Lead / Full-Stack Engineer2022 — 2024

OpenGrano helps small and mid-sized agricultural producers in Argentina’s interior access non-bank financing in exchange for future harvests. Investors anywhere in the world back farming campaigns using crypto; producers receive and repay in local currency. All terms, distributions, and repayments are enforced on-chain via Avalanche.

Impact & outcomes

  • Backed by Avalanche Labs — highlighted by CEO Emin Gün Sirer at #codebase
  • Part of the first cohort of Avalanche Codebase (2024), 15 teams from 30+ countries
  • 3-month residency at Innovation House Belgrano (Buenos Aires)
  • Featured in iProUP and Bichos de Campo; the team was covered by El Cronista, TN, and Infobae
  • Raised pre-seed from Web3 investors
  • Deployed on Avalanche testnet with simulated revenue streams
  • 3 pilot project creators onboarded for mainnet launch
“Learning about Tokenizing Agro Commodities from two founders with a strong connection to underserved agricultural communities.”
— Emin Gün Sirer · Source

Problem

Small and mid-sized agricultural producers in Argentina’s Santa Fe, Córdoba, and Entre Ríos provinces can’t access bank credit to finance their planting campaigns. Traditional ag-finance intermediaries charge rates that eat into margins; smaller producers often don’t qualify at all. At the same time, global capital has no easy on-ramp to back productive farmland. OpenGrano bridges both sides: a producer in Gálvez, Santa Fe can receive financing from an investor in Tokyo — with all terms, distributions, and repayments enforced on-chain. No intermediaries, no correspondent banking.

Overview

Encodes investment terms, vesting schedules, and revenue-sharing directly in Solidity. React dApp for investors, TheGraph subgraph for data indexing, NestJS backend for off-chain coordination.

System Architecture

Four layers: (1) Solidity smart contracts on Avalanche C-Chain managing investment pools and automated distributions; (2) TheGraph subgraph indexing pool activity; (3) NestJS API for identity, notifications, and fiat ramps; (4) React frontend for pool exploration and portfolio tracking.

1

Smart Contract Layer

Factory pattern deploying isolated investment pools as ERC-4626 vaults with custom revenue-sharing logic. Vesting, distribution waterfalls, and governance parameters encoded at deployment.

SolidityHardhatOpenZeppelinEthers.js
2

Data Indexing Layer

TheGraph subgraph indexing deposits, withdrawals, distributions, and parameter changes. Real-time queryable state for frontend and analytics.

TheGraphGraphQLAssemblyScript
3

API & Coordination Layer

NestJS backend for KYC/AML, email notifications, fiat on-ramp integration. Thin coordination layer while all financial logic remains on-chain.

NestJSTypeScriptPostgreSQLRedis
4

Frontend Layer

React dApp with WalletConnect. Browse pools, commit capital, track returns. Portfolio view with real-time TVL and APY data.

ReactTypeScriptTailwindWagmiViem

Gallery

Demos

OpenGrano / TheBadge Official Presentation

OpenGrano 4-Minute Demo

TheBadge Platform Walkthrough

Architecture tradeoffs

  • 1

    On-chain distribution is gas-inefficient for high-frequency payouts. Hybrid approach: on-chain for large monthly batches, off-chain merkle proofs for smaller batches.

  • 2

    Full transparency vs privacy. Chose transparency by default with optional ZK privacy pools for accredited investors.

  • 3

    EVM limits cross-chain revenue. Went all-in on Avalanche instead of multi-chain, with bridge abstraction planned for v2.

Scaling considerations

Factory pattern supports thousands of concurrent pools. Main bottleneck: block gas limits for distributions — mitigated via batched merkle proofs. Target: 10,000+ investors across 500+ pools.

Technologies used

SolidityHardhatReactTypeScriptNestJSTheGraphPostgreSQLAvalancheOpenZeppelinWagmiViem