{"id":22938895,"url":"https://github.com/hardworking-toptal-dev/voting-dao","last_synced_at":"2025-04-01T19:44:54.473Z","repository":{"id":239257059,"uuid":"785318737","full_name":"hardworking-toptal-dev/Voting-DAO","owner":"hardworking-toptal-dev","description":"Proof of Humanity and anonymous voting feature in Dao","archived":false,"fork":false,"pushed_at":"2024-04-11T16:41:21.000Z","size":3709,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T15:50:05.227Z","etag":null,"topics":["dao","governance","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardworking-toptal-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-11T16:39:03.000Z","updated_at":"2024-09-10T13:27:11.000Z","dependencies_parsed_at":"2024-05-11T03:35:20.724Z","dependency_job_id":null,"html_url":"https://github.com/hardworking-toptal-dev/Voting-DAO","commit_stats":null,"previous_names":["hardworking-toptal-dev/voting-dao"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FVoting-DAO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FVoting-DAO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FVoting-DAO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FVoting-DAO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardworking-toptal-dev","download_url":"https://codeload.github.com/hardworking-toptal-dev/Voting-DAO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246704739,"owners_count":20820610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dao","governance","solidity"],"created_at":"2024-12-14T12:28:50.256Z","updated_at":"2025-04-01T19:44:54.442Z","avatar_url":"https://github.com/hardworking-toptal-dev.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proof of Humanity + Anonymous Voting(WIP)\n## Proof of Humanity and Anonymous Voting feature in Nounish DAO\nWith DAOs rising in popularity a lot of different governance systems have been proposed, developed and tested. Most of them use ER20 token-based voting systems, and with Nouns DAO introducing NFT (ERC721) based voting, increasingly DAOs are adopting the “Nounish” format.\n\nOne down side of the auction based NFT mint is the favoring of ETH whales, who can consistently outbid the competition. This leads to the possibility of a 51% attack. Nouns DAO solves this temporarily with the veto system, but it’s not ideal long term. Recently there have been different ideas of limiting the amount of tokens one person can obtain.\n\nPunk4156 on twitter:\u003cbr/\u003e \n![Screen](/screen.png?raw=true)\n\u003cbr/\u003e As referenced by Punk4156, sybil resistant identity could solve this problem to some degree.\n\nFor this hackathon we’ve decided to create an implementation of the Proof of Humanity protocol used by Kleros. “Proof of Humanity is a system combining webs of trust, with reverse Turing tests, and dispute resolution to create a sybil-proof list of humans.” (https://www.proofofhumanity.id/). We found this to be the best system suitable for the purpose as of today (among others like Gitcoin Passport, Bright ID etc.)\n\nWhen changing the core protocol, we wanted to focus on the voting system. The idea is that one person can own multiple tokens, but can only vote with the power of one.\nThis will need some changes in the NounsDAOLogicV1 contract.\nThe implementation can be found in the github repository.\n\nAnonymous Voting (an experiment):\n\nThe idea of anonymous voting emerged on a lunch break between some members of the Social Nouns team.\n\nWhy would we need anonymous voting?\n\nIn the real world most elections are done privately. Nobody has to share which options the person has voted for. And this system has a reason, you don't always want to share what opinion you have on a certain topic, but you still want to participate. This could be for political, financial or personal reasons. Adding this to the Nouns protocol could be an interesting experiment.\n\nGreat Idea, but what does the implementation look like?\n\nThat's the tricky part. On the blockchain everything is public. My vote and the algorithm that calculates the votes. If I wanted to encrypt the vote, everybody could just recreate the same scenario in an Ethereum test network to decrypt my vote. So how can we solve this?\n\nIntroducing Zero knowledge proofs and anonymous voting by two-round. In 2017 Patrick McCorry created the first implementation of anonymous voting on Ethereum. Using his work, we started to implement our own version of anonymous voting into the Nouns contracts. This leads to a lot of different challenges which are addressed later and inside the readme file on the Github.\n\n\n## Implementation:\nWe have a general dislike for strict rules and predefined systems, so we decided to make both features optional. This changes the creating and voting for proposals a little bit.\nThe new flow of a proposal looks like this:\n![flow](/flow.png?raw=true)\nThere are two folders in this repo: \u003cbr/\u003e\n- nouns-contracts-poh\n- nouns-contracts-poh-anonymousvoting (WIP)\n\nThe nouns-contracts-poh houses the implementation of sybil resistant identity system integration.\nThe nouns-contracts-poh-anonymousvoting houses the merge of Anonymous voting by Patrick McCorry and the nouns daologic.\nThere are a lot of bad design choices, will keep fixing them in the future.\n\n## Problems\n1. There are not many sybil resistance identity systems that are in wide use.\u003cbr/\u003e\n2.There are a number of different organizations working on decentralized ID:\n  - https://www.proofofhumanity.id/\n  - https://community.optimism.io/docs/governance/\n  - https://passport.gitcoin.co/ \n  - https://www.brightid.org/ \n  - https://galxe.com/ \n\n3. Corruption is still possible, even if it gets harder.\u003cbr/\u003e\nAfter using POH and an auction based token offering system it is still possible to obtain over 51% of the issued tokens, so this doesn't fix the problem fundamentally. \n\n4. Gas cost with anonymous voting \u003cbr/\u003e\nThe anonymous voting contract uses elliptic curves to ensure privacy. Ethereum has no native support for this, so the gas costs increase exponentially to the amount of voters.\n\n## Conclusion:\nAll in all it was a lot of fun to participate in this hackathon, discussing these highly theoretical ideas within the team, community and on Twitter (hopefully we will get on some Web3 social soon).\nI hope even if the code is not nearly completed, it still provides a good enough outline.\u003cbr/\u003e\n\nIf you have any questions please ping me or social nouns on twitter:\nOot2k: https://twitter.com/oot2k1 (Dev) \u003cbr/\u003e\nSocial Nouns: https://twitter.com/socialnouns (social nouns team) \u003cbr/\u003e\n\n## References:\nhttps://github.com/Proof-Of-Humanity/Proof-Of-Humanity\nhttps://community.optimism.io/docs/governance/\nhttps://www.ncbi.nlm.nih.gov/pmc/articles/PMC8229461/\nhttps://dash.harvard.edu/bitstream/handle/1/37365632/BINSHARUDIN-DOCUMENT-2020.pdf?sequence=1\u0026isAllowed=y\nhttp://homepages.cs.ncl.ac.uk/feng.hao/files/OpenVote_IET.pdf\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fvoting-dao","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardworking-toptal-dev%2Fvoting-dao","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fvoting-dao/lists"}