{"id":25628460,"url":"https://github.com/sudoferraz/daofitnessselection","last_synced_at":"2025-11-13T09:03:44.386Z","repository":{"id":90246504,"uuid":"425066664","full_name":"sudoFerraz/DAOFitnessSelection","owner":"sudoFerraz","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-17T09:50:06.000Z","size":1445,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-17T10:30:58.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sudoFerraz.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":"2021-11-05T19:45:50.000Z","updated_at":"2024-05-17T09:50:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"b984c267-daf2-4153-97a1-859d93f6dc30","html_url":"https://github.com/sudoFerraz/DAOFitnessSelection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudoFerraz%2FDAOFitnessSelection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudoFerraz%2FDAOFitnessSelection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudoFerraz%2FDAOFitnessSelection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sudoFerraz%2FDAOFitnessSelection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sudoFerraz","download_url":"https://codeload.github.com/sudoFerraz/DAOFitnessSelection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240219903,"owners_count":19767204,"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":[],"created_at":"2025-02-22T18:33:01.372Z","updated_at":"2025-11-13T09:03:39.332Z","avatar_url":"https://github.com/sudoFerraz.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Video Explanation\n\nhttps://www.youtube.com/watch?v=DFz1Y8BRxhk\nUnfortunately the microphone level came out very low on editing, please put your volume on max to hear something :)\n\n## Description\n\nRetirementDAO is a project to exemplify the use of the biased roulette selection\nalgorithm (also known as [Fitness proportionate selection](https://en.wikipedia.org/wiki/Fitness_proportionate_selection)used in genetic algorithms) in the context of a web3 protocol;\n\nIt was created for the GlobalDAOHackaton 2021 as a POC to exemplify a new mechanism\nfor token gated DAOs\n\nThe roulette selection is used on the action of picking a random winner that \nwould be granted access to the DAO, on this example, we apply it into a context\nwhere the amount of staked tokens of a participant is equivalent to it's level of\nfitness;\n\n### Random number generation and normalization\n\nWe retrieve the random number from ChainlinkVRF https://docs.chain.link/docs/chainlink-vrf/,\nwhich is then transformed to fit into the subset between 0 and 1. Improving the\nnormalization of the random number transformation is a hard problem on-chain,\nas we can't ensure a uniform distribution when dividing by 10**18 with solidity truncated\ndivisions.\n\n### Possible applications\n\nA certain participant staked tokens in turn, is equivalent to how many ETH\nhas been locked from a certain address. Note that a participant cannot withdraw\nETH back or through the form of a SuperToken being streamed constantly to the contract\nfrom a specific address.\n\nWhen a participant is selected through the biased roulette selection, he earns\nthe right of minting a new NFT(RetiredNFT), which is the gateway token of RetirementDAO,\nwho controls the treasury.\n\nThe RetirementDAO treasury could then, redistribute all ETH received into a staking pool in aave,\nand share all returns from it equally between RetiredNFT holders through a stream like\ndegen_dogs (https://github.com/markcarey/degendogs) did.\n\nWith a fitness function being based on how many certain tokens are staked or that\na person has ownership of, such selection does not include any\nincentives for over-time participantion on a DAO or a Protocol, for this reason,\none could consider creating a new ERC20 for issuance within the \"staking\" action,\nwhich therefore would enable the opportunity of a compound mechanism that would incentivise\ntime of participation.\nAfter a participant stakes ETH in the protocol, on every new draw round, it's \nweight ('fitness') is compounded by a fixed factor, increasing it's fitness\nover-time and incentivizing participation.\n\n##### Token Gated Daos:\n  \n  Could incentivise the contribution into the DAO, by minting ERC20 tokens to\n  contributors that stake such tokens and are counted as an equivalent of fitness\n  weights. \n\n  Contributions by itself could be considered as PRs in a github repo like gitvern\n  is doing (https://github.com/gitvern/) or as a ticket bought to a concert or \n  championship or a POAP, also worth to mention that it could be CRED from sourceCred protocol\n\n\n\n\n\n## Future Contributions to this example\n\n - Enter pension system\n   - [x] Send burneable ERC20 to the auction house to pool tokens\n   - [x] Burn tokens sent to be staked\n   - [ ] Auction house needs to buy tokens from aave pool\n   - [x] Auction house creates a ticket inside the auction house for person who burned the ERC20 \n   - [ ] Auction house creates a new draw round every 24 hours\n   - [x] Auction house calculates selectedParticipant based on the genetic algorithm and the previous ERC20 sent\n   - [x] Auction house mints a new RetiredNFT for selectedParticipant\n   - [ ] RetiredNFT owner has the stream from wETH sent to the auction house pooled treasury\n   - [ ] Auction house compounds ticket size created on participation\n\n\n\nFarm:\n- Stake Tokens\n- Unstake Tokens\n- Issue Tokens.\n- Add Allowed Tokens\n- Get ETH Value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudoferraz%2Fdaofitnessselection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudoferraz%2Fdaofitnessselection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudoferraz%2Fdaofitnessselection/lists"}