Skip to content

tumutech/aid-fund-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Aid Funding Tracker Smart Contracts

Overview

This repository contains the Solidity smart contracts for a permissioned-chain aid-tracking protocol designed for NGOs and aid organizations worldwide. The protocol enables transparent, accountable, and auditable tracking of aid project funding, expenses, and dispute resolution, leveraging blockchain technology to ensure trust among donors, NGOs, validators, and the community.

Motivation

Aid and NGO fund distribution globally often suffers from a lack of transparency, inefficient reporting, and limited community oversight. This project aims to:

  • Digitize and standardize the tracking of aid and NGO projects and their expenses.
  • Empower NGOs and aid organizations to transparently manage projects and budgets.
  • Enable validators to approve or reject expenses.
  • Allow the community to flag suspicious expenses and participate in dispute resolution.
  • Provide an immutable, auditable record of all transactions and decisions.

Problem Solved

  • Transparency: All project and expense data is on-chain, visible, and auditable by all stakeholders.
  • Accountability: Only authorized NGOs can create projects; only approved collaborators can submit expenses; only validators can approve expenses.
  • Community Oversight: Community members can flag expenses, and a DAO of validators resolves disputes.
  • Automation: Smart contracts enforce rules, roles, and time windows, reducing manual errors and corruption.

Technology Stack

  • Solidity (>=0.8.0): For writing secure, modern smart contracts.
  • OpenZeppelin Contracts: Industry-standard libraries for ERC-721, AccessControl, and security best practices.
  • Hardhat: Development environment for compiling, testing, and deploying contracts.
  • Ethers.js: For contract interaction and deployment scripting.
  • Sepolia Testnet: For public test deployments.

Directory Structure

backend-contracts/
  contracts/              # All Solidity smart contracts
    AccessRoles.sol
    ProjectNFT.sol
    ExpenseTracker.sol
    DisputeResolution.sol
  scripts/                # Deployment and utility scripts
    deploy-sepolia.js
  test/                   # Automated tests
  hardhat.config.js       # Hardhat configuration
  package.json            # Project dependencies and scripts
  README.md               # Project documentation

How to Run

1. Prerequisites

2. Install Dependencies

cd backend-contracts
npm install

3. Configure Environment Variables

Create a .env file in backend-contracts/ with the following:

SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_KEY
DEPLOYER_PRIVATE_KEY=your_private_key_here

4. Compile Contracts

npx hardhat compile

5. Deploy to Sepolia Testnet

npx hardhat run scripts/deploy-sepolia.js --network sepolia

Deployment addresses will be printed to the console.

6. Run Tests

npx hardhat test

Contracts Overview

  • ProjectNFT: ERC-721 NFT representing aid projects, mintable only by authorized NGOs, with on-chain metadata.
  • ExpenseTracker: Maps each project to multiple expenses, allowing collaborators to submit and validators to approve expenses.
  • DisputeResolution: Allows community members to flag expenses and validators to resolve disputes via DAO voting.
  • AccessRoles: Defines all role constants for protocol-wide access control.

Frontend

A frontend dApp for interacting with these contracts will be implemented at a later stage.

License

MIT

About

A decentralized application for tracking, managing, and auditing aid funding projects. Features smart contracts for expense tracking, dispute resolution, and project NFTs, ensuring transparency and accountability in aid distribution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors