Skip to content

a-singh09/shadow-fund

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShadowFund

Privacy-Preserving Decentralized Crowdfunding Platform

Built for the Avalanche Build Hackathon


🎯 Vision

ShadowFund is evolving from a privacy-preserving crowdfunding platform into a comprehensive Privacy Infrastructure as a Service (PIaaS) solution. Using Avalanche's cutting-edge encrypted ERC20 (eERC20) protocol, we enable:

Consumer Platform:

  • Private Donations: Contribution amounts remain encrypted on-chain
  • Anonymous Supporters: Donor identities can stay confidential
  • Transparent Campaigns: Public campaign goals and progress without revealing individual contributions
  • AI-Powered Insights: Intelligent campaign optimization and donor matching

Enterprise & NGOs Infrastructure:

  • Custom L1 Deployment: Dedicated Avalanche subnets with pre-configured privacy features
  • Cross-Chain Privacy: Multi-L1 encrypted transfers and unified key management
  • White-Label Solutions: Branded privacy platforms for enterprises
  • Compliance-Ready: Enterprise & NGOs-grade privacy with regulatory compliance tools

πŸš€ What We're Building

Consumer Platform Features

πŸ” Privacy-First Architecture

  • Integration with Avalanche's native eERC20 protocol
  • Encrypted donation amounts using homomorphic encryption
  • Zero-knowledge proof verification for all transactions
  • Private balance management for campaign creators

πŸ“Š Campaign Management

  • Create campaigns with public metadata (title, description, deadline)
  • Track donations through encrypted transaction hashes
  • Withdrawal management with privacy preservation
  • Real-time campaign analytics without exposing amounts

πŸ€– AI-Powered Features

  • Intelligent campaign optimization recommendations
  • Smart donor matching based on encrypted preferences
  • Automated fraud detection and risk assessment
  • Predictive analytics for campaign success

🎨 Intuitive User Experience

  • Multi-step campaign creation wizard
  • Seamless wallet integration with eERC20 registration
  • Real-time form validation and error handling
  • Responsive design built with React and Tailwind CSS

Enterprise & NGOs Infrastructure Services

🏒 Privacy Infrastructure as a Service (PIaaS)

  • Custom Avalanche L1 deployment with pre-configured eERC20
  • Dedicated validator sets for enterprise security
  • White-label privacy platform deployment
  • Enterprise & NGOs-grade compliance and audit tools

🌐 Multi-Chain Privacy Solutions

  • Cross-L1 encrypted transfer protocols
  • Unified privacy key management across chains
  • Enterprise & NGOs-grade key recovery and backup systems
  • Seamless multi-chain campaign deployment

πŸ”§ Developer & Integration Tools

  • Universal eERC20 deployment toolkit
  • Cross-chain privacy bridge infrastructure
  • Enterprise & NGOs SDK for custom integrations
  • Compliance framework for regulated industries

Technical Innovation

Smart Contract Architecture

SimpleCampaignFactory.sol    β†’ Campaign creation and management
SimpleCampaign.sol          β†’ Individual campaign logic
eERC20 Integration          β†’ Avalanche's encrypted token protocol

Frontend Stack

React + TypeScript          β†’ Modern UI framework
@avalabs/eerc-sdk          β†’ Official eERC20 SDK integration
Wagmi + Viem               β†’ Ethereum wallet connectivity
Shadcn/ui + Tailwind       β†’ Beautiful, accessible components

πŸ—οΈ Project Structure

shadowflow/
β”œβ”€β”€ frontend/              # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # UI components
β”‚   β”‚   β”œβ”€β”€ hooks/         # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ pages/         # Application pages
β”‚   β”‚   └── config/        # Configuration files
β”‚   └── package.json
β”œβ”€β”€ contracts/             # Smart contracts
β”‚   β”œβ”€β”€ contracts/         # Solidity contracts
β”‚   β”œβ”€β”€ script/           # Deployment scripts
β”‚   β”œβ”€β”€ test/             # Contract tests
β”‚   └── foundry.toml      # Foundry configuration

πŸ› οΈ Technology Stack

Frontend

  • Framework: React 18 with TypeScript
  • Styling: Tailwind CSS + Shadcn/ui components
  • Web3: Wagmi v2 + Viem for wallet connectivity
  • Privacy: @avalabs/eerc-sdk for encrypted transactions
  • State: React Query for server state management
  • Routing: React Router v6
  • Forms: React Hook Form with Zod validation

Smart Contracts

  • Language: Solidity ^0.8.20
  • Framework: Foundry for development and testing
  • Network: Avalanche C-Chain (Fuji Testnet)
  • Privacy: Integration with deployed eERC20 protocol
  • Architecture: Factory pattern for campaign deployment

Infrastructure

  • Blockchain: Avalanche Subnet-EVM
  • Privacy Protocol: eERC20 (Encrypted ERC20)
  • Development: Foundry + Avalanche CLI
  • Deployment: Vercel (Frontend) + Avalanche (Contracts)

🚦 Getting Started

Prerequisites

Quick Start

  1. Clone the repository

    git clone <repository-url>
    cd shadowflow
  2. Setup Frontend

    cd frontend
    npm install
    npm run dev
  3. Setup Contracts

    cd contracts
    npm install
    forge build
    forge test
  4. Deploy Contracts (requires AVAX for gas)

    forge script script/DeploySimpleCampaigns.s.sol \
      --rpc-url https://api.avax-test.network/ext/bc/C/rpc \
      --broadcast

Environment Configuration

Frontend (.env)

VITE_WALLET_CONNECT_PROJECT_ID=your_project_id
VITE_CAMPAIGN_FACTORY_ADDRESS=deployed_factory_address

Contracts (.env)

PRIVATE_KEY=your_private_key
AVALANCHE_FUJI_RPC_URL=https://api.avax-test.network/ext/bc/C/rpc

🎯 Hackathon Progress & Roadmap

βœ… Week 1 - Foundation Complete

Smart Contract Foundation

  • SimpleCampaign contract with metadata tracking
  • SimpleCampaignFactory for campaign deployment
  • eERC20 transaction hash registration system
  • Comprehensive test suite with 100% coverage
  • Contracts deployed on Avalanche Fuji testnet

Frontend Application

  • Multi-step campaign creation wizard
  • eERC20 SDK integration and wallet connectivity
  • Real-time form validation and error handling
  • Campaign listing and detail pages
  • Donation interface with privacy features
  • Production-ready frontend deployed

Privacy Integration

  • eERC20 registration flow for new users
  • Private donation functionality using encrypted transfers
  • Balance decryption for campaign creators
  • Transaction hash linking between eERC20 and campaigns
  • End-to-end privacy flow validated

πŸ—ΊοΈ 4-Week Development Roadmap

Week 2: AI Integration & Advanced Features

πŸ€– AI-Powered Platform Enhancement

  • Intelligent campaign optimization engine
  • Smart donor matching algorithms using encrypted preference analysis
  • Automated fraud detection and risk assessment systems
  • Predictive analytics for campaign success probability
  • AI-driven campaign recommendation system

πŸ“Š Advanced Analytics

  • Private metrics dashboard with zero-knowledge proofs
  • Encrypted campaign performance insights
  • Anonymous donor behavior analysis
  • Real-time success prediction models

Week 3: Enterprise & NGOs Infrastructure Development

🏒 Privacy Infrastructure as a Service (PIaaS)

  • Universal eERC20 deployment toolkit for any Avalanche L1
  • Custom L1 subnet deployment automation
  • Enterprise & NGOs-grade validator set configuration
  • White-label platform deployment system
  • Compliance framework for regulated industries

🌐 Multi-Chain Privacy Bridge

  • Cross-L1 encrypted transfer protocol development
  • Unified privacy key management system
  • Enterprise & NGOs-grade key recovery and backup solutions
  • Cross-chain campaign deployment capabilities
  • Multi-L1 state synchronization with privacy preservation

Week 4: Enterprise & NGOs Launch & Market Validation

πŸš€ Go-to-Market Execution

  • Enterprise & NGOs SDK and developer tools release
  • Pilot deployment with 3-5 enterprise customers
  • Partnership agreements with Avalanche ecosystem players

πŸ”§ Production Optimization

  • Performance optimization for enterprise-scale deployments
  • Advanced security audits and penetration testing
  • Scalability testing across multiple L1s
  • Enterprise & NGOs support infrastructure setup
  • Documentation and training materials for enterprise clients

πŸ“ˆ Market Positioning

  • Transform from crowdfunding platform to Privacy Infrastructure provider
  • Establish ShadowFund as the leading PIaaS solution on Avalanche
  • Create competitive moat through first-mover advantage in privacy infrastructure
  • Build foundation for post-hackathon enterprise growth

Post-Hackathon Vision

🌍 Global Privacy Infrastructure Leader

  • Become the standard for privacy-preserving financial applications
  • Expand to multiple blockchain ecosystems beyond Avalanche
  • Enterprise & NGOs adoption across Fortune 500 companies
  • Regulatory partnerships for compliant privacy solutions

πŸ”’ Privacy & Security

Privacy Guarantees

  • Donation Amounts: Encrypted using homomorphic encryption
  • Donor Identity: Optional anonymity with zero-knowledge proofs
  • Campaign Balances: Only creators can decrypt their total funds
  • Transaction History: Public events without revealing amounts

Security Measures

  • Smart Contract Audits: Comprehensive testing and formal verification
  • Frontend Security: Secure key management and encrypted storage
  • eERC20 Integration: Leveraging Avalanche's battle-tested privacy protocol
  • Access Controls: Role-based permissions and multi-signature support

🀝 Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for details on:

  • Code style and standards
  • Pull request process
  • Issue reporting
  • Development setup
  • Testing requirements

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ† Hackathon Submission

Avalanche Build Hackathon - 4-Week Development Plan

  • Team: ShadowFund Development Team
  • Track: Privacy & Infrastructure + Enterprise & NGOs Solutions
  • Demo: Live Demo
  • Contracts: Deployed on Avalanche Fuji Testnet
  • Repository: This repository contains all source code and documentation

Key Innovations & Competitive Advantages

  1. Privacy Infrastructure as a Service (PIaaS) - First-ever enterprise privacy infrastructure platform
  2. Multi-L1 eERC20 Deployment - Universal toolkit for deploying privacy across any Avalanche L1
  3. AI-Powered Privacy Analytics - Intelligent insights while preserving encryption
  4. Cross-Chain Privacy Bridge - Seamless encrypted transfers across multiple L1s
  5. Enterprise & NGOs-Grade Compliance - Regulatory-ready privacy solutions for Fortune 500 companies

Market Transformation Strategy

Week 1: βœ… Privacy crowdfunding platform foundation Week 2: πŸ€– AI integration and advanced analytics Week 3: 🏒 Enterprise & NGOs infrastructure development
Week 4: πŸš€ PIaaS launch and market validation

Post-Hackathon: Transform into $10M+ ARR Privacy Infrastructure company


Built with ❀️ for the Avalanche ecosystem

From privacy-preserving crowdfunding to enterprise Privacy Infrastructure as a Service - powered by Avalanche's eERC20 protocol.