The Voice Ledger
A Voice First Coffee Supply Chain with Decentralized Oracle Verification of Compliance
What it is
In the case of Ethiopia, smallholder coffee farmers who produce over 90% of the country's top export have been observed to operate almost entirely on trust and paper. Middlemen set prices opaquely, provenance claims are unverifiable, and farmers have no auditable record of what they grew, sold, or were paid. Without documentation, they cannot access trade finance, prove EUDR compliance for European buyers, or dispute unfair settlements. Many are illiterate or lack smartphones, so conventional digital tools exclude them entirely.
Our AI driven solution addresses this by letting farmers register batches, record supply-chain events, and receive payments in their local language (Amharic) through voice calls and Telegram . Every transaction is cryptographically anchored on-chain with a GS1-compliant digital product passport, creating an immutable provenance trail from farm to export. This gives smallholders verifiable ownership of their data, unlocks financing against documented shipments, and removes the information asymmetry that keeps them poor.
How it Works
The Voice Ledger is a full-stack supply chain platform combining a Python backend, Solidity smart contracts, and a Chainlink CRE (Compute Runtime Environment) oracle workflow.
Backend (Python 3.12 / FastAPI):
The core API is built with FastAPI and deployed on Railway. It handles Telegram webhook processing, voice message transcription (OpenAI Whisper), and an AI agent powered by GPT-4o with tool-calling for natural language supply chain operations. Async voice processing uses Celery with a Redis broker. Data lives in Neon PostgreSQL via SQLAlchemy, and documents are indexed in ChromaDB for RAG. Farmer identity follows W3C DID:key and Verifiable Credentials standards using PyNaCl (Ed25519). QR codes are generated with the qrcode library and served to farmers via Telegram after each batch commission.
Smart Contracts (Solidity / Foundry):
Seven contracts deployed on Base Sepolia handle batch tokenization (ERC-721), EPCIS event anchoring, trade settlement, fee distribution, and the ProvenanceDataReceiver that stores DON attestations. Contracts are compiled and deployed with Foundry (forge/cast) with via-IR optimization enabled.
Chainlink CRE Oracle (TypeScript):
A single CRE workflow written in TypeScript with the @chainlink/cre-sdk defines three trigger-handler pairs: (1) a CronTrigger that aggregates supply chain metrics every 5 minutes, (2) a LogTrigger that reacts to on-chain EventAnchored events for reactive compliance, and (3) an HTTPTrigger for on-demand EUDR deforestation attestation. The deforestation spot-check has each DON node independently query Global Forest Watch satellite data (UMD Tree Cover Loss, 30m resolution) and compare it against our API, refusing to attest if results diverge. All floating-point values are integer-scaled before DON consensus to eliminate cross-node IEEE 754 nondeterminism.
Satellite Integration (Global Forest Watch API):
Farm GPS coordinates are converted into GFW geostore polygons. Post-2020 tree cover loss is queried and classified into LOW/MEDIUM/HIGH risk levels against the EUDR December 31, 2020 cutoff.
Supply Chain Standards:
Traceability follows GS1 EPCIS 2.0 with GTIN and GLN identifiers. Digital Product Passports expose real compliance data, not hardcoded values, through REST endpoints.
Infrastructure:
The backend runs on Railway (europe-west4) with auto-deploy on git push. Docker Compose orchestrates local development (Anvil blockchain node, ChromaDB, Voice API, DPP resolver). The frontend is React 19 + Vite + Tailwind deployed on Vercel. IPFS storage uses Pinata for decentralised document pinning.
Key dependencies: FastAPI, Celery, SQLAlchemy, web3.py, OpenAI SDK, python-telegram-bot, HuggingFace Transformers + PyTorch (Amharic ASR), @chainlink/cre-sdk, viem, zod, Foundry (forge/cast).
Links
Created by
- Emmanuel Acho
- Dagmawi Solomon
- Temesgen Berhanu