# Preliminary Data, Karma [2022-12-11] ## Request ![](https://i.imgur.com/9RUFItq.jpg) ## Proposals ### Sample Data `proposals.json` ### Chainverse Query ``` match (p:Proposal)-[:HAS_PROPOSAL]-(e:Entity {snapshotId:'gitcoindao.eth'}) with p.title as title, p.startDt as createdDt, e.name as daoName return collect(distinct({ name: title, created: createdDt, daoName: daoName })) limit $limit ``` ## Votes ### Sample Data `votes.json` ### Chainverse Query Need to add vote value. ``` match (w:Wallet)-[vote:VOTED]->(p:Proposal)-[:HAS_PROPOSAL]-(e:Entity {snapshotId:'gitcoindao.eth'}) with w.address as address, p.snapshotId as proposalId, vote.votedDt as created return collect(distinct({ voter: address, proposal_id: proposalId, created: created })) as votes limit $limit ``` ## Delegation Events `delegationEvents.json` ### Chainverse Query Need to clean up token balances. ``` match (w:Wallet)-[vote:VOTED]->(p:Proposal)-[:HAS_PROPOSAL]-(e:Entity {snapshotId:'gitcoindao.eth'}) match (w1:Wallet)-[:DELEGATED]->(d:Delegation)-[:DELEGATED_TO]->(w:Wallet) where not w1.address = w.address with w.address as delegatee, w1.address as delegator, d.newBalance / 18 as newBalance, d.previousBalance / 18 as previousBalance, d.blockTimestamp as created, e.name as daoName limit $limit where newBalance > 0 return collect(distinct({ delegatee: delegatee, delegator: delegator, newBalance: newBalance, previousBalance: previousBalance, created: created, daoName: daoName })) as delegations ``` ## Count Delegates - 192 Excluding people who delegated to themselves -- 63. I did this analysis in a staging enviornment so numbers are not exact. ### Sample File `delegates-eligible_votes.json` ### Chainverse Query ``` match (w:Wallet)-[vote:VOTED]->(p:Proposal)-[:HAS_PROPOSAL]-(e:Entity {snapshotId:'gitcoindao.eth'}) match (w)<-[:DELEGATED_TO]-(d:Delegation)-[:DELEGATED]-(w1:Wallet) where d.blockTimestamp > (timestamp(vote.votedDt) / 1000) with w.address as address, count(distinct(p)) as eligibleProposals, count(distinct(w1)) as representedDelgators order by representedDelgators desc return collect(distinct({ address: address, eligibleProposals: eligibleProposals, representedDelegators: representedDelgators })) ``` ## Enriched Delegates Adding more data from Chainverse that may be helpful for people to evaluate delegates. ### Sample Data `enrichedDelegates.json` ### Chainverse Query ``` match (w:Wallet)-[vote:VOTED]->(p:Proposal)-[:HAS_PROPOSAL]-(e:Entity {snapshotId:'gitcoindao.eth'}) match (w)<-[:DELEGATED_TO]-(d:Delegation)-[:DELEGATED]-(w1:Wallet) where d.blockTimestamp > (timestamp(vote.votedDt) / 1000) with w match (w)-[:HAS_ALIAS]-(ens:Alias) match (w)-[:DONATION]->(grant:Grant) optional match (w)-[:HAS_ALIAS]-(:Alias)-[:HAS_ALIAS]-(twitter:Twitter) optional match (w)-[:HAS_WALLET]-(github:GithubUser) optional match (w)-[:IS_OWNER]->(bounty:GitcoinBounty) optional match (w)-[:CONTRIBUTOR]->(entity:Entity) optional match (w)-[:VOTED]->(proposal:Proposal) optional match (w)-[:AUTHOR]->(article:Article) optional match (w)-[:IS_SIGNER]->(multisig:Wallet) with w.address as address, collect(distinct(ens.name)) as ens_names, collect(distinct(github.handle)) as github_handles, count(distinct(grant)) as gitcoin_grants_supported, count(distinct(bounty)) as gitcoin_bounties_created, count(distinct(entity)) as daoMemberships, count(distinct(proposal)) as totalDaoVotes, count(distinct(article)) as mirrorArticlesWritten, count(distinct(multisig)) affiliatedMultisigs limit 100 return collect(distinct({ address: address, ens_names: ens_names[0..2], github_handles: github_handles, twitter_handles: twitter_handles gitcoin_grants_supported: gitcoin_grants_supported, dao_memberships: daoMemberships, total_dao_votes: totalDaoVotes, mirror_articles_written: mirrorArticlesWritten, affiliated_multisigs: affiliatedMultisigs })) as delegateEnrichment ```