Skip to content

AI-powered blockchain donation platform for Seedify Vibecoins Hackathon

Notifications You must be signed in to change notification settings

emlanis/cointribute

Repository files navigation

Cointribute - Smart Charity Platform

AI-powered blockchain donation platform built for Seedify Vibecoins Hackathon on DoraHacks

License: MIT Base Network

Overview

Cointribute is a transparent, AI-vetted charity donation platform built on Base (Ethereum L2). It combines smart contracts, artificial intelligence, and blockchain technology to create trust and transparency in charitable giving.

Key Features

  • πŸ€– Fully Automatic AI Verification: Charities verified and approved in 5-10 seconds
    • AI scores 0-100 using GPT-4
    • Score >= 60 β†’ Automatic approval βœ…
    • Score < 60 β†’ Automatic rejection ❌
  • πŸ“Έ Image Upload & AI Vision Analysis: Charities can upload campaign images
    • Up to 5 images per charity (JPG, PNG, WebP)
    • GPT-4 Vision API analyzes image relevance and quality
    • Social media-style image galleries on all pages
    • Automatic image optimization and processing
  • πŸ”’ Smart Fund Escrow: Donations held securely until release
    • Funds released when goal reached OR deadline passed
    • Transparent fund tracking per campaign
    • Platform fee (2.5%) deducted at release
  • ⏰ Required Campaign Deadlines: All campaigns must set a target deadline
    • Ensures accountability and time-bound goals
    • Automatic fund release on deadline
  • πŸ”— Smart Contract Donations: Transparent, immutable donation tracking
  • 🏒 Multi-Charity Support: Same wallet can register multiple charities
    • 3-month cooldown between registrations
    • Smart anti-spam protection
  • πŸ’Ž Vibe Coins (VIBE): Impact verification tokens rewarding donors
  • 🎨 Impact NFTs: Dynamic NFTs for major contributors
  • πŸ“Š Real-Time Tracking: Live donation flow visualization
  • πŸ† Donor Reputation: Build your philanthropic portfolio

Project Structure

cointribute/
β”œβ”€β”€ contracts/          # Solidity smart contracts (Hardhat)
β”‚   β”œβ”€β”€ contracts/     # Contract source files
β”‚   β”œβ”€β”€ scripts/       # Deployment scripts
β”‚   └── test/          # Contract tests
β”œβ”€β”€ frontend/          # Next.js 14 + TypeScript web app
β”œβ”€β”€ backend/           # Node.js API + AI integration
β”œβ”€β”€ ai-prompts/        # AI prompt documentation
β”œβ”€β”€ docs/              # Additional documentation
└── README.md

Tech Stack

Blockchain

  • Chain: Base (Ethereum L2)
  • Framework: Hardhat
  • Language: Solidity ^0.8.20
  • Standards: ERC20, ERC721, ERC165

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Web3: Wagmi + RainbowKit
  • State: Zustand

Backend

  • Runtime: Node.js + Express
  • Database: PostgreSQL
  • Cache: Redis
  • Storage: IPFS (Pinata)
  • AI: OpenAI API

Integrations

  • Alchemy/QuickNode RPC
  • The Graph Protocol
  • Push Protocol
  • Dune Analytics

Smart Contracts

CharityRegistry.sol

Manages charity registration, verification, and AI vetting scores.

DonationManager.sol

Handles donation processing with smart escrow, automatic fund releases when goal reached or deadline passed, and platform fee collection.

VibeToken.sol

ERC20 governance and reward token with staking capabilities.

ImpactNFT.sol

ERC721 NFTs for high-impact donors with dynamic metadata.

Current Deployment

Network: Base Sepolia Testnet Version: v4.1 - Image Upload & Display System Status: βœ… FULLY OPERATIONAL Last Updated: November 26, 2025

Live Contract Addresses

CharityRegistry:  0x3c921FCB6E75bDD7C0386D14CA5594030D7e6df0
VibeToken:        0x5d1475a5afA0Ac0350a4FA58049E3F0C466d3c47
ImpactNFT:        0x4cf4C4af3c8A2bacE821Ddc720248CEfd3d51213
DonationManager:  0xF2B1F17C3695cea507CE9F1fe76598c834bf3fb2

What's New in v4.0

  • βœ… Smart Fund Escrow - Donations held until goal OR deadline
  • βœ… Dual Release Mechanism - Automatic release when either condition met
  • βœ… Required Deadlines - All campaigns must set a deadline
  • βœ… Transparent Fund Tracking - View held funds per charity
  • βœ… Fully automatic AI verification - No manual approval needed!
  • βœ… 5-10 second approval time - Lightning fast
  • βœ… Multi-charity per wallet - With smart 3-month cooldown
  • βœ… Gas optimized - Only ~343k gas per registration

View CharityRegistry on Basescan β†’ View DonationManager on Basescan β†’

Quick Start

Prerequisites

  • Node.js >= 18
  • pnpm >= 8
  • Docker (optional)

Installation

# Clone repository
git clone https://github.com/emlanis/cointribute.git
cd cointribute

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env

Development

# Terminal 1: Backend (with AI verification)
cd backend
npm run dev

# Terminal 2: Frontend
cd frontend
npm run dev

# Frontend will be available at http://localhost:3000
# Backend API at http://localhost:3001

Testing the System

  1. Register a Charity

  2. Watch AI Verification (in backend terminal)

    • AI analyzes charity
    • Scores 0-100
    • Automatically approves if >= 60
  3. View Results

Deployment to Testnet

# Deploy all contracts to Base Sepolia
cd contracts
npx hardhat run scripts/deploy.js --network baseSepolia

# Update contract addresses in:
# - frontend/lib/contracts/addresses.ts
# - backend/src/config/contracts.ts

# Copy ABIs
cp contracts/artifacts/contracts/CharityRegistry.sol/CharityRegistry.json \
   frontend/lib/contracts/CharityRegistry.json

# Restart services to pick up changes

Deployment

Testnet (Base Sepolia)

cd contracts
pnpm hardhat run scripts/deploy.ts --network base-sepolia

Mainnet (Base)

cd contracts
pnpm hardhat run scripts/deploy.ts --network base-mainnet

Revenue Model

  • 2.5% platform fee on donations
  • Premium charity verification
  • Sponsored placements
  • Vibe Coin staking rewards
  • NFT marketplace royalties
  • Data analytics API

Security

  • OpenZeppelin contracts
  • Multi-sig governance
  • Comprehensive test coverage
  • External audits (planned)

Documentation

Quick Links

Additional Resources

Contributing

This project is built for the Seedify Vibecoins Hackathon. For contributions after the hackathon, please see CONTRIBUTING.md.

License

MIT License - see LICENSE for details.

Hackathon Submission

Event: Seedify Vibecoins Hackathon @ DoraHacks Category: DeFi / Social Impact Built With: AI-assisted development (Vibe Coding)


Built with πŸ’™ using AI-assisted development for the Seedify Vibecoins Hackathon

About

AI-powered blockchain donation platform for Seedify Vibecoins Hackathon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published