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

Snapshot implementation - Vote calculation #745

Closed
rossneilson opened this issue Mar 25, 2022 · 1 comment
Closed

Snapshot implementation - Vote calculation #745

rossneilson opened this issue Mar 25, 2022 · 1 comment
Assignees
Milestone

Comments

@rossneilson
Copy link
Collaborator

Instead of using current total locked tokens we instead need to find the snapshotted total at proposal creation time as this is how snapshot operates.

  • Get proposal snapshot ID
  • Get voting power of user for snapshot id (has a function)
  • Need to investigate how we find total voting power for all users at snapshot ID (after brief search I could not find out how)

Screenshot 2022-03-25 at 16 18 24

We will use snapshotREPGuild for now to test this.

@rossneilson rossneilson added this to the v1.0.13 milestone Mar 25, 2022
@MiltonTulli MiltonTulli moved this to In Progress in Sprints Apr 4, 2022
@MiltonTulli MiltonTulli self-assigned this Apr 4, 2022
@rossneilson
Copy link
Collaborator Author

rossneilson commented Apr 5, 2022

For the calculation of (userPower / totalLocked) to get % power we have to treat SnapshotGuild and SnapshotRepGuild differently. Or we need to add another method to the contract.

SnapshotGuild implements snapshot on guild contract level as the token is ERC20

  • votingPowerOfAt()
  • totalLockedAt()

SnapshotRepGuild implements snapshot on the token level as the token is not ERC20.
We only have votingPowerOfAt() right now but an issue will be made and implemented to add support for totalLockedAt()

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

No branches or pull requests

2 participants