Skip to content

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.

License

Notifications You must be signed in to change notification settings

V00D00-child/proxy-polls

Repository files navigation

ProxyPolls 🗳️

Node Version Solidity Version

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.

Insipiration

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:

  1. If we allow people to delegate their presidential votes, who will they delegate their vote to?(Elon Musk, or Kim Kardashian:grin:)
  2. Is voting on-chain more efficient than the current way the US does voting?
  3. Can we tokenize voter registration cards?

Development todo list

  1. Create a Voter registration contract using Soulbound tokens
  2. Update the PresidentialElection contract to use the Voter registration contract before voting
  3. Update PresidentialElection contract to use the real-world time for voting to close with Chainlink
  4. Create a dapp to allow users to register and vote on-chain

Features

  • 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

Start local geth node

npm run node

Testing

npm run test

Compiling contracts

npm run build

Deploying contract to a local node

Follow the steps below to deploy the contracts to a local node.

Voting-delegatable contracts

npm run deploy:voting

ERC-4337 Account Abstraction contracts

npm run deploy:aa

Deploy all contracts

npm run depoly:all

Run ERC-4337 Bundler(Transeptor)

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!

About

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.

Topics

Resources

License

Stars

Watchers

Forks