oceanprotocol-archive / DAOBot

Web3 Glue for OceanDAO
6 stars 4 forks source link

Number of $OCEAN in use for voting per round #11

Open AngelaKTE opened 2 years ago

AngelaKTE commented 2 years ago

Problem I'd like to get the number of $OCEAN in use for voting per round to give information about the demand of $OCEAN for OceanDAO voting. Currently, the voting overview only shows

Solution What's missing is the number of $OCEAN in use for voting per round: a) record every wallet and respective number of votes cast (yes + no) per proposal b) sum up the votes cast, but EXCLUDE the number of $OCEAN votes cast by the same wallet for >1 proposal

idiom-bytes commented 2 years ago

Hi Angela,

I have mentioned below what functionality/logic exists that could be leveraged to provide you with the results you are looking for. Due to timelines for R11, I hope you or someone in your team could help deliver this task, otherwise, we will try to do it in the future.

Please clone + submit PR in order to make this process as fast as possible, while providing new functionality for anyone who needs it.

Ticket Overview

The two functions mentioned below, are responsible for collecting all voter information foreach: propsal & round.

calculateProposalSummary(activeProposals, voterScores, proposalScores) https://github.com/oceanprotocol/DAOBot/blob/c45ba901337e8b1b5db36e98f0aafe3d59c88df0/src/gsheets/sync_gsheets_active_proposal_votes_snapshot.js#L55

&

calculateRoundSummary(activeProposals, voterScores, proposalScores) https://github.com/oceanprotocol/DAOBot/blob/c45ba901337e8b1b5db36e98f0aafe3d59c88df0/src/gsheets/sync_gsheets_active_proposal_votes_snapshot.js#L92

calculateRoundSummary in particular, is already doing some of this work, and could be leveraged to calculate [Unique Ocean Voted].

AngelaKTE commented 2 years ago

Thanks, will take it to the research group https://oceanpearl.io/projects/c2b3b1dAaD-governauts-rewards-systems-research

@claudiaHash join us in case you are interested in DAO analytics, pls sign-up here to keep you posted: https://forms.gle/zNNLdi8aUKystz3QA