CeoChain is a blockchain-based governance platform designed to facilitate transparent and secure voting for CEO selection and board management. The project leverages Solidity smart contracts and Foundry for development and testing.
- Decentralized CEO voting mechanism
- Transparent candidate selection process
- Secure blockchain-based governance
- Immutable voting records
- MakeFile for easy use
The platform manages CEO transitions through a structured, secure voting mechanism:
- Admin receives a list of potential CEO candidates
- Security Constraint: Maximum of 10 candidates allowed
Voting Cycle
- Represents the time/epoch for the voting duration
- Duration: One month
- Each whitelisted voter can cast only one vote per cycle
Administrative Controls
- Admin kicks off the voting cycle and is separate from the voting
- Admin can add or remove voters from the whitelist
- Enables dynamic management of voting participants
Voting Finalisation
- After one month, any user can trigger vote finalization
- System calculates and determines the winning candidate
- Ensures transparent, democratic CEO selection process
- The current CEO had either decided to leave, or perhaps needed to leave their position.
- The company will select a person to be the admin, who is external to the vote.
- Even before the cycle begins, employees (potential voters) can apply to become voters.
- The admin will start a voting cycle when the company decides to do so.
- The voters now have 30 days to cast their votes.
- Upon the end of the cycle anyone can call finalise vote.
- The new CEO is selected.
- Admin - Manages the system. The admin is separate to the voting system so there is no bias. The admin cannot apply to the whitelist and cannot vote. The admin is the only address that can initiate a new voting cycle and approve or remove voters.
- Board Members - These are the board members of the company. They can vote as same as anyone else. In case of a tie in the vote, to settle the tie, we will calculate the results only by the board for these candidates.
- Voters - Employees at the company. These addresses are users who will apply to become voters, after the admin approves them. They can cast votes.
- Users - Can apply to become voters. They can also finalise a cycle.
- Foundry
- Solidity 0.8.25
- forge-std
- OpenZeppelin Contracts
Clone the repo to your local machine
git clone https://github.com/JJScar/CeoChain.git
Install dependencies
make install
Compile
make build
See tests
make test
Deploy Anvil local Blockchain
make anvil
Deploy the CeoChain Contract
make deploy
ONLY ADMIN Initialise Vote
make initiateVote
ONLY ADMIN Approve User To Whitelist
make approveToWhitelist
ONLY ADMIN Remove User from Whitelist
make removeFromWhitelist
Apply to get whitelisted
make applyToWhitelist
Cast Vote
make castVote
Finalise Vote Cycle
make finaliseVote