Skip to content

Kenny-svg/LocalDAO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocalDAO

LocalDAO is a neighborhood investment platform with on-chain governance and yield distribution workflows on Avalanche Fuji.

Structure

  • frontend/: React + Vite user interface.
  • contract/: Foundry smart contracts.
  • WHITEPAPER.md: canonical whitepaper.

Whitepaper

  • Repo copy: WHITEPAPER.md
  • App-readable page: /whitepaper.html (served from frontend/public/whitepaper.html)

Run Frontend

cd frontend
npm install
npm run dev

Build Frontend

cd frontend
npm run build

Run Contracts

cd contract
forge build
forge test

Application Flow

flowchart TB
    subgraph Factory["LocalDAOFactory"]
        IMPL["LocalDAO Implementation"]
        CREATE["createDAO()"]
        REGISTRY["DAO Registry & Metadata"]
        IMPL --> CREATE
        CREATE --> REGISTRY
    end

    subgraph DAOs["Location DAOs (EIP-1167 Clones)"]
        D1["DAO A"]
        D2["DAO B"]
        D3["..."]
    end

    subgraph Roles["Roles"]
        C["Creator"]
        A["Admins"]
        F["Finance Managers"]
        M["Verified Members"]
        C --> A
        C --> F
        A --> M
    end

    subgraph Investments["Investment Lifecycle"]
        I1["Create Proposal"]
        I2["Vote"]
        I3["Activate or Incomplete"]
        I4["Deposit Yield"]
        I5["Claim Yield"]
        I6["Close / Sweep Unclaimed"]
        I1 --> I2 --> I3 --> I4 --> I5 --> I6
    end

    Factory --> DAOs
    DAOs --> Roles
    DAOs --> Investments
Loading

Investment Lifecycle (State Machine)

stateDiagram-v2
    [*] --> PENDING: createInvestment()

    PENDING --> ACTIVE: activateInvestment()\n(upvotes ≥ fundNeeded, before deadline)
    PENDING --> INCOMPLETE: markInvestmentIncomplete()\n(deadline passed, upvotes < fundNeeded)

    INCOMPLETE --> [*]: withdrawStake() by voters

    ACTIVE --> ACTIVE: depositYield() by Finance Manager
    ACTIVE --> ENDED: closeInvestment()\n(when totalYieldDistributed == totalYieldGenerated)

    ENDED --> [*]: sweepUnclaimedYield() after 90-day grace
Loading

Governance Permissions

flowchart LR
    subgraph Who["Who"]
        Creator["Creator"]
        Admin["Admin"]
        Finance["Finance Manager"]
        Member["Member"]
    end

    subgraph CanDo["Can Do"]
        Pause["Pause/Unpause"]
        AddAdmin["Add/Remove Admins"]
        AddFinance["Add/Remove Finance Leads"]
        AddMember["Add/Verify/Remove Members"]
        CreateInv["Create Investments"]
        Activate["Activate / Mark Incomplete"]
        Extend["Extend Deadline"]
        DepositYield["Deposit Yield"]
        CloseInv["Close Investment"]
        Sweep["Sweep Unclaimed Yield"]
        Vote["Vote (Stake USDC / Downvote)"]
        Claim["Claim Yield / Withdraw Stake"]
    end

    Creator --> Pause
    Creator --> AddAdmin
    Creator --> AddFinance
    Admin --> AddMember
    Admin --> CreateInv
    Admin --> Activate
    Admin --> CloseInv
    Admin --> Sweep
    Finance --> Extend
    Finance --> DepositYield
    Member --> Vote
    Member --> Claim
Loading

Evaluation Alignment

This MVP is optimized for:

  • Technical implementation quality:
    • Factory + DAO contract architecture.
    • Role-based permissions and contract-state checks.
    • Error handling and explorer fallback links.
  • Use of Avalanche technologies:
    • Avalanche Fuji deployment and transaction verification.
  • MVP architecture design:
    • Monorepo with contract/ and frontend/.
    • Shared utilities for contracts, explorer, notifications, and data.
  • UX design:
    • Role-aware action gating.
    • Global notifications.
    • Responsive dialogs and action states.

About

Neighborhood investment platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors