Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guild/Membership statistic - Design Specification #1842

Open
pimato opened this issue Apr 19, 2021 · 4 comments · May be fixed by #2235
Open

Guild/Membership statistic - Design Specification #1842

pimato opened this issue Apr 19, 2021 · 4 comments · May be fixed by #2235

Comments

@pimato
Copy link
Contributor

pimato commented Apr 19, 2021

In order to give the user a rough overview of the state of the Guild and its own membership we need to add a bar at the top of the Guild Overview:
Guild-Overview-Component

Governance Overview Page:
Guild-Overview-Page

  1. Guild
  • Members: Total addresses who locked OMN tokens
  • Total Locked: Show the total amount locked of OMN tokens in the guild contract
  • Total Rewards: Show the total amount of claimed rewards
  1. Your Membership
  • Voting Power: Show the voting weight which is calculated from the amount of total locked OMN tokens by the user.
  • You Locked: Total locked OMN tokens in the guild by the users address
  • Claimable Rewards: Show the total amount of claimable rewards

Figma:
Component - Design Specification

@pimato pimato added the Guild label Apr 19, 2021
@pimato pimato added the UI label Apr 19, 2021
@pimato pimato changed the title Guild Overview Cards Guild Info Sidebar - Design Specification May 12, 2021
@pimato pimato assigned kazuolol and unassigned Mi-Lan Jun 4, 2021
@pimato pimato changed the title Guild Info Sidebar - Design Specification Guild/Membershipt statistic - Design Specification Jul 26, 2021
@pimato pimato changed the title Guild/Membershipt statistic - Design Specification Guild/Membership statistic - Design Specification Jul 26, 2021
@Mi-Lan Mi-Lan linked a pull request Aug 31, 2021 that will close this issue
@Mi-Lan
Copy link
Contributor

Mi-Lan commented Aug 31, 2021

@hexyls Hey men I started working on this issue and wanted to consult with you! Mainly regarding fetching this data:
Looking at contract https://rinkeby.etherscan.io/address/0x8e172c814147d6321dec2ccc10f4220670030dd3#code

  • Members: Total addresses who locked OMN tokens
  • Total Rewards: Show the total amount of claimed rewards
  • Claimable Rewards: Show the total amount of claimable rewards
  1. Members: Not sure how to get this piece of data? I was looking at contract and token vault and I think there is no way to get length of mapping that is used to keep track of balances?
    Screenshot 2021-08-31 at 23 12 56
  2. Total rewards:also not sure how to get.
  3. Claimable rewards also unknown for me

@kadenzipfel
Copy link
Contributor

@hexyls Hey men I started working on this issue and wanted to consult with you! Mainly regarding fetching this data:
Looking at contract https://rinkeby.etherscan.io/address/0x8e172c814147d6321dec2ccc10f4220670030dd3#code

  • Members: Total addresses who locked OMN tokens
  • Total Rewards: Show the total amount of claimed rewards
  • Claimable Rewards: Show the total amount of claimable rewards
  1. Members: Not sure how to get this piece of data? I was looking at contract and token vault and I think there is no way to get length of mapping that is used to keep track of balances?
    Screenshot 2021-08-31 at 23 12 56
  2. Total rewards:also not sure how to get.
  3. Claimable rewards also unknown for me
  1. Yeah, can't grab the length of a mapping unfortunately. I suspect the only way to get this would be to index it in the subgraph
  2. Total rewards would likely be the token balanceOf the contract, but not 100% sure
  3. Seems the easiest method, although probably not the most efficient, would be to grab the proposalIds that the user voted on, then check the rewardsClaimed mapping to see if they've already claimed the reward for that proposal or not, then you can use similar math used in claimMarketValidationProposal to calculate the actual reward amount for each proposalId and add them together

@hexyls
Copy link
Contributor

hexyls commented Sep 1, 2021

@Mi-Lan for a quick hack we can prob fetch all OMN Transfer events being made to the guild contract then fetch the current balances of the senders

@Mi-Lan
Copy link
Contributor

Mi-Lan commented Sep 1, 2021

@hexyls Regarding what data? Because if you are referring to totalLocked, that can be found on guild contract...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants