A decentralized grant management system built on Ethereum with Solidity, Hardhat, TypeScript & JavaScript.
Enables community-driven funding of ideas through token-based governance, voting mechanisms, and transparent fund distribution.
Demo Live - coming soon...
- Submit and vote for ideas in the DAO
- Community-driven grant distribution
- ERC20 Governance Token with snapshot support
- Transparent voting and funding rounds
- Complete lifecycle management: idea submission → voting → funding → completion
- Smart Contracts: Solidity, OpenZeppelin
- Development: Hardhat, Node.js, Typescript
- Frontend: JavaScript, Ethers.js
- Blockchain: Ethereum / EVM-compatible networks
- Create Idea → 2. Pending → 3. Voting → 4. WonVoting → 5. Funded → 6. Completed
# Clone repository
git clone https://github.com/Tenyokj/DAO-Grant-System.git
cd dao-grant-system
# Install dependencies
npm install
# Compile contracts
npx hardhat compile
# Run tests
npx hardhat test
# Run deploy script
# You can choose between 'localhost' and 'hardhat' networks to deploy
npx hardhat run scripts/DGS/deploy.ts --network localhost Deploy contracts in this order:
- GovernanceToken
- IdeaRegistry
- VotingSystem
- FundingPool
- GrantManager
Configure relationships after deployment:
await ideaRegistry.authorizeUpdater(await grantManager.getAddress(), true)
await votingSystem.setGrantManager(await grantManager.getAddress())
await fundingPool.setGrantManager(await grantManager.getAddress())
await token.setMinter(await grantManager.getAddress(), true)Mint initial tokens and approve deposits for FundingPool as needed.
await ideaRegistry.createIdea(
"Project Title",
"Detailed project description...",
"https://github.com/project" # Optional
)# Approve token spending
await governanceToken.approve(votingSystemAddress, voteAmount)
# Cast vote
await votingSystem.vote(roundId, ideaId, voteAmount)await grantManager.distributeFunds(roundId)# Run all tests
npx hardhat test
# Run specific test file
npx hardhat test test/VotingSystem.test.jsTests cover token minting, idea lifecycle, voting, funding, and end-to-end integration.
- Access Control: Ownable + authorized updaters
- Reentrancy Protection: VotingSystem & FundingPool
- Input Validation: Titles, descriptions, amounts, addresses
- State Consistency: Lifecycle steps cannot be skipped, double actions prevented
- Fixed grant amount per round
- No delegated or quadratic voting yet
- Basic tie-breaking (first idea wins)
- No automated snapshot creation (manual for now)
Planned improvements include dynamic grant amounts, delegated voting, advanced voting mechanisms, and automated snapshots.
- Fork the repo
- Clone locally
- Install dependencies:
npm install - Compile contracts:
npx hardhat compile - Run tests:
npx hardhat test - Deploy contracts
npx hardhat run scripts/DGS/deploy.ts --network localhost - Make pull requests with clear descriptions
MIT License - see LICENSE file for details
Version: 1.2.1 Author: Tenyokj