A blockchain-based e-voting system for local government elections in Ukraine, leveraging Zero-Knowledge Proofs and decentralized storage.
zkHolos is a prototype implementation of a privacy-preserving e-voting system that aims to provide secure, transparent, and verifiable elections for local government in Ukraine. The system uses blockchain technology, Zero-Knowledge Proofs (ZKPs), and decentralized storage to ensure the integrity and privacy of votes.
- Secure voter registration and eligibility verification using ZKPs
- Privacy-preserving vote casting using Zero-Knowledge Proofs
- Region-based voting with privacy protection
- Transparent vote counting and result verification
- Smart contract-based election management
- Comprehensive testing suite with workflow tests
- Candidate status management (activation/deactivation)
- Election phase control (start, pause, resume, complete)
- Voter eligibility updates with ZKP verification
- Solidity (Smart Contracts)
- Hardhat (Development Environment)
- OpenZeppelin (Smart Contract Libraries)
- TypeScript (Testing and Deployment Scripts)
- circom (Zero-Knowledge Proof Circuits)
- snarkjs (ZKP Generation and Verification)
- Node.js (v16 or later)
- npm (v7 or later)
- Hardhat
- circom (for ZKP circuit compilation)
- Clone the repository:
git clone https://github.com/ihbobul/zkHolos.git cd zkHolos- Install dependencies:
npm install- Compile contracts and circuits:
# Compile Solidity contracts npx hardhat compile # Setup ZKP circuits npm run setup:circuitsThe project includes comprehensive test suites:
# Run all tests npx hardhat test # Run specific test suites npx hardhat test test/ElectionSystem.test.ts npx hardhat test test/ZKPIntegration.test.ts npx hardhat test test/ZKPWorkflow.test.ts # Run workflow test ./scripts/runWorkflow.shThe system uses Zero-Knowledge Proofs for:
- Voter eligibility verification
- Privacy-preserving vote casting
- Region-based voting verification
ZKP circuits are located in the circuits/ directory:
VoterEligibility.circom: Circuit for voter eligibility verification
Scripts for ZKP operations are in scripts/circuits/:
generateProof.ts: Generate ZK proofsverifyProof.ts: Verify ZK proofssetupCircuit.ts: Set up and compile circuits
The system consists of five main smart contracts:
VotingContract.sol: Handles the core voting functionalityVoterRegistration.sol: Manages voter registration and eligibilityElectionManager.sol: Coordinates between voting and registration contractsZKPVerifier.sol: Handles Zero-Knowledge Proof verificationVoterEligibilityVerifier.sol: Verifies voter eligibility proofs
- All contracts are audited and follow best practices
- Access control is implemented using OpenZeppelin's Ownable
- Reentrancy protection is in place
- Time-based constraints for election phases
- Privacy protection using Zero-Knowledge Proofs
- Secure voter eligibility verification
- Protection against double voting
- Region-based voting restrictions
- ✅ Blockchain Layer Implementation
- ✅ Zero-Knowledge Proofs Integration
- 🔄 Decentralized Storage Integration
- 🔄 Frontend Development
- Fork the repository
- Create your feature branch
- Commit your changes using conventional commit messages
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This is a prototype implementation and is not intended for production use without proper security audits and regulatory compliance.