ProxyPolls is a decentralized voting platform built on Web3 technology. It enables users to create and manage revocable Counterfactual Delegations, allowing them to delegate their votes to trusted individuals. Take control of your voting power with ProxyPolls and participate in shaping the future of politics.
The inspiration for ProxyPolls idea came from the upcoming US 2024 presidential election. It would be cool to run a social experiment in crypto land where you have presidential voting on-chain. Trying to answer 3 questions:
- If we allow people to delegate their presidential votes, who will they delegate their vote to?(Elon Musk, or Kim Kardashian:grin:)
- Is voting on-chain more efficient than the current way the US does voting?
- Can we tokenize voter registration cards?
- Create a Voter registration contract using Soulbound tokens
- Update the PresidentialElection contract to use the Voter registration contract before voting
- Update PresidentialElection contract to use the real-world time for voting to close with Chainlink
- Create a dapp to allow users to register and vote on-chain
- Voting basic (vote for a candidate)
- Voting delegation (delegatee can vote on behalf of delegator)
- Revocable voting delegation (delegator can revoke delegation)
- Voting basic with time limit (voting expires after a certain time) - In progress
- Voting delegation with time limit (voting delegation expires after a certain time) - In progress
- Voter registration (voter must register before voting) - In progress
npm run node
npm run test
npm run build
Follow the steps below to deploy the contracts to a local node.
npm run deploy:voting
npm run deploy:aa
npm run depoly:all
We can use use .env.sample
to create .env file with your MNEMONIC
and BENEFICIARY
.
MNEMONIC
: and is set to the default seed phrase of hardhat accounts. The first account of the hardhat accounts is used as the bundler signer.BENEFICIARY
: is set to the second account of the hardhat accounts.
Then, we can fund the bundler signer account with some ETH:
npm run fund 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Finally, we can run the ERC-4337 Bundler(Transeptor)
npm run bundler
The Bundler will start running on http://localhost:3000/rpc.
Happy building!