OpenAid

Zero-custody aid procurement & staged settlement eliminating corruption in charity.

OpenAid

Created At

ETHGlobal Mumbai

Project Description

Traditional humanitarian and disaster relief systems suffer from severe opacity, high administrative overhead, and the constant risk of fund misappropriation. In typical charity setups, non-governmental organizations (NGOs) maintain complete, unilateral custody over donated capital. If accounts are compromised, administrators are corrupt, or local officials demand kickbacks, donor funds can be siphoned or misallocated with zero auditability. Furthermore, procurement is often conducted behind closed doors without transparent price discovery, leading to inflated supplier margins, phantom deliveries, and kickback schemes.

OpenAid Protocol (Pravaha) re-architects disaster relief as a trust-minimized, multi-actor state machine deployed on EVM-compatible blockchains. It enforces a strict separation of powers between Donors, NGOs, Suppliers, and Independent Ground Validators.

THE CARDINAL PROTOCOL INVARIANT: No participant—not even the NGO campaign creator, the protocol deployer, or any administrative multisig—shall ever possess the capability to unilaterally withdraw, sweep, redirect, or siphon escrowed funds to an arbitrary address.

Escrowed donor capital can only leave the protocol under two strictly enforced, mutually exclusive mathematical conditions:

  1. Verified Staged Settlement: Payout is released directly to the winning supplier who submitted the lowest valid revealed bid and whose physical delivery manifest was verified by an on-chain validator quorum.
  2. Deterministic Proportional Donor Refund: Payout is returned proportionally to original donors via pull-based withdrawals if a campaign fails to fund, auction reveal fails, no supplier bids, delivery times out, or a challenge is upheld.

CORE LIFECYCLE & WORKFLOW:

  1. Campaign Creation & Sub-Vault Isolation: An NGO defines supply specifications, budget ceilings, and delivery coordinates without touching capital. Multi-item relief drives (e.g., Food $50k vs. Blankets $30k) are partitioned into isolated sub-vaults—a supplier failure in one sub-vault never locks or drains another.
  2. Direct Escrow Funding: Donors deposit USDC directly into immutable smart contract escrow. The NGO’s balance remains strictly zero.
  3. Sealed Commit–Reveal Procurement Auction: Qualified suppliers submit cryptographic bid commitments (keccak256(bidAmount, salt, vendorAddress)), followed by a reveal window. This prevents front-running, bid-sniping, and supplier price-fixing. The lowest valid bid is programmatically awarded the contract.
  4. Physical Delivery & Tamper-Evident Evidence: The winning supplier fulfills the shipment and uploads GPS coordinates, multi-angle photos, and carrier waybills, pinning the root manifest CID to IPFS.
  5. Decentralized Multi-Node Evidence Verification (Chainlink CRE + Gemini AI): A specialized 4-node Decentralized Oracle Network (DON) cross-references carrier tracking APIs (verifying DELIVERED status), checks Haversine spatial geofences (verifying delivery inside the flood zone), and passes waybills to Google Gemini AI for optical character extraction and RFP specification matching.
  6. Sybil-Resistant Validator Quorum (World ID): A dynamic 5-member validator panel drawn from a pool of 14 verified individuals using the Efraimidis-Spirakis weighted sampling algorithm reviews evidence and casts on-chain attestation votes. Beneficiaries submit zero-knowledge Semaphore proofs with anti-replay nullifier tracking.
  7. Two-Stage Payout with Challenge Timelock:
  • Tranche 1 (70%): Released immediately to the supplier upon 3-of-5 validator quorum attestation to cover logistics and fulfillment costs.
  • Challenge Window: A 72-hour timelock window opens during which any participant can submit counter-evidence.
  • Tranche 2 (30%): Released automatically upon challenge window expiry without an active dispute. If a dispute is substantiated, the remaining 30% plus the defaulted vendor's slashed bond are refunded proportionally to original donors.

How it's Made

We built OpenAid Protocol to tackle a frustrating real-world issue: humanitarian aid disappearing into opaque NGO bank accounts. We wanted a system where code—not charity executives—holds custody and programmatically enforces delivery.

The Nitty-Gritty & Architecture: We started in Arc Studio to write and test our core settlement engine (OpenAidEscrow.sol), deploying it directly on Arc Testnet (Chain ID 5042002) with native Circle USDC (0x3600...0000, 6 decimals). The contract enforces a zero-custody invariant: donor capital routes into isolated sub-vaults (e.g., Food $50k vs. Blankets $30k) so one vendor's failure never stalls another's payout. Settlements are split into two stages: 70% immediate release upon 3-of-5 validator quorum attestation to cover vendor costs, and 30% locked behind a 72-hour timelocked challenge window. If a vendor defaults or delivery times out, donors pull back 100% of remaining funds through deterministic proportional math.

Our frontend is a Next.js 14 App Router dashboard built with TypeScript, Tailwind CSS, and Ethers.js v6. Storing itemized bills of quantities and tenders on-chain would cost hundreds in gas, but using AWS or PostgreSQL would recreate the exact centralized point of failure we want to eliminate. We solved this with Arkiv: all tender RFPs, sealed bid commitments, shipping waybills, and audit logs live on Arkiv Rabdi Testnet (Chain ID 7794095) under the openaid.v1.* schema. Arkiv's native expiresAt TTL prunes expired tenders automatically, giving us decentralized queryability without recurring storage gas fees.

How Partner Tech Leveled Us Up:

  • Arc (Circle L1): Allowed us to build institutional-grade escrow with sub-second finality and native 6-decimal USDC accounting without bridging friction.
  • Arkiv Network: Replaced custodial Web2 databases with cryptographically wallet-owned entities and automated state pruning.
  • World ID & IDKit v1.3: Powers our Dynamic Validator Selection via the Efraimidis-Spirakis weighted sampling algorithm (drawing 5 active validators and 3 alternates from a 14-member panel with conflict screening) and enables on-the-ground beneficiaries to generate zero-knowledge Semaphore proofs confirming receipt of aid.
  • Chainlink CRE: Orchestrates our multi-node off-chain evidence pipeline before human reviewers vote, computing 3-of-4 Byzantine Fault Tolerant (BFT) consensus across logistics APIs, spatial geofences, and OCR matching.

Particularly Hacky Things We Did:

  1. The AI-Oracle Handshake: Real disaster aid involves wrinkled paper bills of lading and handwritten carrier waybills. Inside our Chainlink CRE DON simulation, we wrote a specialized node that dispatches the uploaded delivery invoice to Google Gemini AI. Gemini extracts line items, quantities, and carrier stamps, and cross-checks them against the RFP specifications in Arkiv. If a supplier bid 500 blankets but the carrier invoice shows 420, the CRE node catches the discrepancy and fails BFT consensus!
  2. Venue Wi-Fi & PII Defense: To survive spotty hackathon Wi-Fi and automated GitHub Actions CI, we wrote an isomorphic TypeScript adapter for Arkiv with an in-memory deterministic fallback. We baked in a custom client-side regex interceptor (validatePublicSuitability) that screens payloads for PII (names, phone numbers, private keys) and aborts before sensitive data can leak onto the public DB-chain.
  3. Beneficiary Anti-Replay Nullifiers: To prevent bad actors from re-submitting the same delivery proof to drain multiple sub-campaigns, we bound the World ID action hash to keccak256(campaignId, subVaultId, manifestCid) and built an anti-replay shield in our API routes that rejects recycled nullifiers with HTTP 409 Conflict.

Everything is tested and live: 115 automated tests passing across contracts and partner modules, with a live production deployment at pravahaprotocol.vercel.app.

background image mobile

Join the mailing list

Get the latest news and updates