
AutoAid
AutoAid is a decentralized donation platform that utilizes Reactive Smart Contracts (RSCs) to automate real-time fund distribution based on real-world events.
Demo
About
The problem it solves Problem Statement Delayed Fund Distribution: In traditional charity models, donations can take days or weeks to reach those in need due to manual processing and bureaucratic delays. Lack of Transparency & Trust: Donors don’t always know where their money goes, leading to concerns about fraud and mismanagement. Inefficient Fund Allocation: Funds often get distributed too late to have the intended impact (e.g., emergency aid arriving after a disaster has passed). High Transaction Costs & Middlemen: Traditional donations involve banks, payment processors, and intermediaries, adding fees and reducing the amount that reaches the beneficiaries. 💡 Solution: AutoAid AutoAid leverages Reactive Smart Contracts (RSCs) to automate donations, ensuring instant, transparent, and impact-driven fund distribution based on real-world triggers. How AutoAid Works ✅ Automated Fund Release: When a crisis (earthquake, flood, medical emergency) is detected from verified oracles (e.g., Chainlink, Red Cross APIs), the RSC automatically transfers funds to NGOs or affected individuals. ✅ Smart Matching & Recurring Donations: Large donors can commit to matching small donations automatically when a threshold is reached. ✅ Conditional Disbursement for Trust & Security: Funds are only released when NGOs meet predefined milestones (e.g., feeding 500 people). ✅ Fully On-Chain & Transparent: Every transaction is recorded on the blockchain, allowing donors to track exactly how their funds are used. User Interaction and Data Flow 1️⃣ Donor Interaction (Funding the System) The donor connects their wallet (MetaMask, WalletConnect) on the AutoAid website. They select a cause (e.g., disaster relief, education, medical aid). They enter the amount to donate and confirm the transaction. Their funds are sent to an Origin Smart Contract, which holds the donation until an event triggers a release. The donation is recorded on-chain for transparency. 2️⃣ Triggering Events (RSC Activation) AutoAid’s Reactive Smart Contracts (RSCs) monitor real-world data (e.g., earthquakes, verified NGO requests) via oracles (e.g., Chainlink, Red Cross APIs). When a triggering event occurs, the RSC automatically initiates a transaction to transfer funds. The funds move from the Origin Smart Contract to the Destination Smart Contract of the designated NGO or affected users. 3️⃣ Beneficiary Fund Distribution The NGO or beneficiary receives the funds instantly in their Web3 wallet. If a milestone-based approach is used, funds are only released upon meeting predefined goals (e.g., feeding 500 people). A real-time dashboard displays all transactions, ensuring transparency for donors. 4️⃣ Tracking & Verification Donors can track their donations on-chain via AutoAid’s UI. Every fund transfer includes a transaction hash for verification. NGOs upload proof-of-use data (e.g., photos, blockchain receipts) to maintain accountability. The project architecture and development process 📌 Overview of the Solution AutoAid is a decentralized donation platform that utilizes Reactive Smart Contracts (RSCs) to automate real-time fund distribution based on real-world events. 🔑 Core Features ✅ Automated Donations: Funds are released automatically when specific conditions are met (e.g., disaster alerts). ✅ Smart Matching Donations: Large donors can match smaller donations once a threshold is reached. ✅ Conditional Fund Disbursement: Funds are only transferred if NGOs meet milestones (e.g., verified aid deliveries). ✅ On-Chain Transparency: All transactions are public and auditable on the blockchain. 🔧 Development Process 1️⃣ Smart Contract Development (Solidity & Foundry) Implement Origin, RSC, and Destination Contracts. Integrate Chainlink oracles to fetch real-world data. Write unit tests using Foundry & Forge. 2️⃣ Frontend Development (Next.js & TailwindCSS) Build a clean and intuitive UI for donors & NGOs. Implement WalletConnect & MetaMask for easy transactions. Integrate Subgraph/GraphQL for real-time donation tracking. 3️⃣ Backend (Node.js & Express, if needed) Optional backend for storing off-chain NGO data. Manage proof-of-impact uploads (images, receipts). 4️⃣ Deployment & Testing Deploy smart contracts on Base Testnet. Verify RSCs are correctly reacting to oracle triggers. Run end-to-end testing using Foundry & Hardhat. 📌 Key Implementation Details 🔹 Smart Contract Features Donation Mechanism: Users send ETH/Stablecoins to the Origin Contract. Trigger-Based Fund Release: RSC listens for verified emergency alerts before releasing funds. Milestone-Based Disbursement: NGOs only receive funds after meeting impact goals. On-Chain Proof-of-Impact: NGOs submit blockchain-verified reports to maintain transparency. 🔹 UI/UX Features Wallet Authentication: MetaMask, WalletConnect support. Live Donation Tracking: Users can view real-time fund status & transaction hashes. Impact Dashboard: Displays verified NGO activities & fund utilization. Product Integrations Chainlink Oracles Role: Fetch real-world data to trigger donations automatically. Use Cases: Disaster Alerts: Retrieves earthquake, flood, or other emergency data from trusted sources (e.g., Red Cross, NOAA, UN relief data). Currency Conversion: Ensures accurate stablecoin-USD conversion for international donations. NGO Verification: Confirms NGO eligibility before fund disbursement. WalletConnect & MetaMask Role: Enables users to donate funds securely via Web3 wallets. Use Cases: Donors connect wallets to make direct ETH/stablecoin donations. NGOs receive funds in their verified Web3 wallets. Transaction confirmation & tracking. The Graph (Subgraph for Donation Tracking) Role: Indexes blockchain data to provide real-time tracking of donations. Use Cases: Fetch donation history for each donor. Monitor fund distribution status for NGOs. Display milestone-based fund disbursements. IPFS / Arweave (Proof-of-Impact Storage) Role: Stores NGO reports, images, and receipts on decentralized storage. Use Cases: NGOs upload proof-of-use (e.g., feeding people, building shelters). Immutable & censorship-resistant storage. Base Blockchain (Low-Cost Transactions) Role: Ensures low gas fees & fast transactions for donations. Use Cases: Deploys smart contracts on Base Testnet. Minimizes transaction fees for donors & NGOs. High-speed fund transfers. Key differentiators and uniqueness of the project 1️⃣ Automated & Event-Triggered Donations (Powered by RSCs) 🔹 How it's different: Traditional donation platforms require manual approval to release funds. AutoAid leverages Reactive Smart Contracts (RSCs) to automatically release funds when real-world conditions (e.g., disaster alerts) are met. 🔹 Example Use Case: A hurricane warning from the Red Cross API triggers AutoAid’s RSC. Funds are instantly distributed to relief NGOs—no manual intervention needed. 📌 🚀 Unique Advantage: Immediate aid distribution without delays or human bottlenecks. 2️⃣ Milestone-Based Fund Disbursement 🔹 How it's different: Other blockchain charity projects send all funds upfront. AutoAid ensures funds are unlocked gradually based on NGO progress. 🔹 Example Use Case: An NGO requests $50,000 for building shelters. AutoAid only releases 25% initially. The next 25% is unlocked after verified milestones (e.g., 100 families housed). 📌 🚀 Unique Advantage: Reduces fraud risks and ensures accountability. 3️⃣ Transparent & Verifiable Donations (Powered by The Graph + IPFS) 🔹 How it's different: Traditional charity platforms lack transparency—donors don’t always know where their money goes. Existing blockchain solutions track transactions but don’t store proof-of-impact. 🔹 AutoAid's Solution: All donation transactions are publicly indexed using The Graph. NGOs upload proof (images, reports) to IPFS, making them tamper-proof & transparent. 📌 🚀 Unique Advantage: Full donation traceability & verified impact tracking. 4️⃣ AI-Powered NGO & Donation Matching 🔹 How it's different: Most donation platforms require manual donor-NGO matching. AutoAid automates this using AI models trained on NGO performance data. 🔹 Example Use Case: A donor prefers funding disaster relief efforts. AutoAid’s AI algorithm matches them with the most impactful NGOs. 📌 🚀 Unique Advantage: Optimized donation allocation for maximum real-world impact. 5️⃣ Low Transaction Fees (Built on Base) Trade-offs and shortcuts while building 1️⃣ Simplicity vs. Full Decentralization 🔹 Decision: To ensure fast deployment & usability, we store some metadata (e.g., NGO impact reports, donor preferences) off-chain in a PostgreSQL database instead of fully decentralizing it. Critical financial transactions remain 100% on-chain for security and transparency. 🔹 Future Improvement: Migrate off-chain data to Arweave or Ceramic Network for full decentralization. Implement ZK Proofs to validate off-chain data before fund disbursement. 📌 Trade-off: Faster iteration but less decentralization (for now). 2️⃣ Event-Triggered Donations via Oracles 🔹 Decision: Instead of building a custom API for real-world event tracking (e.g., disaster alerts), we quickly integrated Chainlink Oracles for pulling emergency data. However, oracle updates may not be real-time, causing delays in triggering donations. 🔹 Future Improvement: Explore hybrid oracles (e.g., API3, DIA) to fetch disaster alerts in real-time. Allow manual emergency fund release if oracle data is delayed. 📌 Trade-off: Fast oracle integration vs. potential event delays. 3️⃣ Base Chain for Low Fees vs. Cross-Chain Interoperability 🔹 Decision: We chose Base for low gas fees and fast transactions. However, this limits cross-chain donor participation (e.g., Polygon or Ethereum users). 🔹 Future Improvement: Implement LayerZero or Axelar bridges for multi-chain donations. Allow users to donate via multiple networks while keeping fund distribution on Base. 📌 Trade-off: Lower fees vs. limited multi-chain access. 4️⃣ AI Matching for Donors & NGOs (Quick Fixes) 🔹 Decision: We simplified the AI matching model to use basic filtering (NGO category, past impact, donation size) instead of training a complex ML model. This ensured we delivered a working prototype in time for the hackathon. 🔹 Future Improvement: Integrate GPT-based recommendation models for smarter donor-NGO matching. Use on-chain reputation scores for NGO trust validation. Additional Features no