iotaledger / iotaledger/firefly

[Feature request]: Display the live count of votes needed to reach quorum in Governance

Open
#7,644 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
478
Forks
100
PR merge metrics
No merged PRs in 30d

Description

### Task description

Implement fields in the overview of a governance proposal that display:
- the number of votes that determine the quorum at the current milestone during counting
- the number of total votes that have currently been counted

Display both as a number and percentage value of the circulating supply.

Highlight if the proposal has reached the quorum (green color percentage) or is below the quorum (red color percentage)

Display it as part of the "proposal information."

![image](https://github.com/iotaledger/firefly/assets/77154511/74a19bd7-9d0f-4215-bc84-78fdfac880b6)

### Requirements

**For IOTA Firefly:**

To calculate the votes that determine the quorum:

**Calculate the maximum possible votes at a milestone:**
- (number of milestones passed) * (circulating supply in micros/1000)
- circulating supply is taken from the API endpoint: https://api.stardust-mainnet.iotaledger.net/api/supply/v1/circulating, which is configured in IOTA, so it needs to be calculated * 1.000.000
take the result and calculate 5% of it (our current quorum)

To calculate the live count of votes, combine the counted votes for all options of a proposal, including "Abstain."

**For Shimmer Firefly:**

To calculate the votes that determine the quorum:

**Calculate the maximum possible votes at a milestone:**
- (number of milestones passed) * (1,813,620,509,061,360/1000)
take the result and calculate 5% of it (our current quorum)

To calculate the live count of votes, combine the counted votes for all options of a proposal, including "Abstain."

As we may want to change the quorum in the future, we could think about how to update the quorum percentage without creating a new Firefly release. It could also be helpful to create an endpoint for this.

### Creation checklist

- [X] I have assigned this task to the correct people
- [X] I have added the most appropriate labels
- [ ] I have linked the correct milestone and/or project

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.