Skip to content

mathigertner/condos-dao

Repository files navigation

Condos DAO - Zero-Knowledge Governance Platform

A decentralized autonomous organization (DAO) platform designed for condominium governance with privacy-preserving voting using zero-knowledge proofs.

🏗️ Project Overview

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

🔧 Smart Contracts

  1. DAO.sol - Main governance contract with proposal management and anonymous voting
  2. DAOFactory.sol - DAO deployment factory using minimal proxy pattern (EIP-1167)
  3. SemaphoreDeployer.sol - Semaphore infrastructure deployer
  4. Vault.sol - Treasury management

🛡️ Key Features

  • 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

🏭 EIP-1167 Minimal Proxy Pattern

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

🔐 ZK Voting Process

The system combines whitelist security with complete voting anonymity:

  1. Whitelist Registration: Only whitelisted addresses can register ZK commitments
  2. Identity Generation: Each member generates a secret identity (trapdoor + nullifier) off-chain
  3. Commitment Registration: Members register their commitment linked to their whitelisted address
  4. Merkle Tree: All commitments form a Merkle tree defining valid voters
  5. 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.

🚀 Quick Start

npm install
npx hardhat compile
npx hardhat test

📁 Project Structure

contracts/
├── 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

🛠️ Technology Stack

  • Solidity ^0.8.23
  • Hardhat
  • OpenZeppelin
  • Semaphore Protocol
  • EIP-1167 Minimal Proxy

🎯 Conclusion

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.

⚠️ Security Notice

This is a development version. Please ensure thorough testing and security audits before any mainnet deployment.

About

DAO for condos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •