A decentralized autonomous organization (DAO) platform designed for condominium governance with privacy-preserving voting using zero-knowledge proofs.
This project implements a complete DAO infrastructure that allows condominium residents to:
- Create and manage proposals
- Vote anonymously using zero-knowledge proofs (ZK)
- Manage financial obligations and debt distribution
- Maintain transparent governance while preserving voter privacy
- DAO.sol - Main governance contract with proposal management and anonymous voting
- DAOFactory.sol - DAO deployment factory using minimal proxy pattern (EIP-1167)
- SemaphoreDeployer.sol - Semaphore infrastructure deployer
- Vault.sol - Treasury management
- Anonymous Voting: Members can vote without revealing their identity using Semaphore ZK proofs
- Role-Based Access: Admin, Proposer, and Member roles with different permissions
- Financial Management: Debt distribution and payment tracking
- Gas Efficient: 96.5% gas savings using minimal proxy pattern for DAO deployment
This project uses the Minimal Proxy Clone pattern (EIP-1167) for extremely gas-efficient DAO deployment:
- How it works: Instead of deploying the full contract code multiple times, it creates lightweight "proxy" contracts that delegate all calls to a single implementation contract
- Gas savings: Each new DAO costs only ~45K gas instead of ~3M gas (96.5% savings)
- Isolated storage: Each DAO operates independently with completely separate storage
- Battle-tested: Used by major protocols like Gnosis Safe and Uniswap
The system combines whitelist security with complete voting anonymity:
- Whitelist Registration: Only whitelisted addresses can register ZK commitments
- Identity Generation: Each member generates a secret identity (trapdoor + nullifier) off-chain
- Commitment Registration: Members register their commitment linked to their whitelisted address
- Merkle Tree: All commitments form a Merkle tree defining valid voters
- Anonymous Voting: Members generate ZK proofs proving membership and preventing double-voting without revealing their identity
Result: Maintains whitelist security while achieving complete voting anonymity.
npm install
npx hardhat compile
npx hardhat testcontracts/
├── DAO.sol # Main governance contract
├── DAOFactory.sol # DAO deployment factory
├── SemaphoreDeployer.sol # ZK infrastructure deployer
└── Vault.sol # Treasury management
test/
└── dao-test.js # Test suite
- Solidity ^0.8.23
- Hardhat
- OpenZeppelin
- Semaphore Protocol
- EIP-1167 Minimal Proxy
Using the EIP-1167 minimal proxy pattern gives this project a major advantage: every condominium DAO can be deployed at a fraction of the normal gas cost, since all clones point to a single audited template while keeping fully independent storage and governance. This means we only need to audit the core logic once, and then hundreds of communities can launch their own DAOs cheaply and safely. For example, instead of each building paying millions of gas units to deploy a full contract, they can create a new DAO instance for around 45k gas, just like how Gnosis Safe or Uniswap deploy vaults and pools at scale. If one community ever needs different governance logic, a new template can be introduced without affecting the existing ones, preserving both efficiency and flexibility.
This is a development version. Please ensure thorough testing and security audits before any mainnet deployment.