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

Improve accuracy of calculation for total voting power #3718

Open
wpb1 opened this issue Nov 11, 2023 · 1 comment
Open

Improve accuracy of calculation for total voting power #3718

wpb1 opened this issue Nov 11, 2023 · 1 comment

Comments

@wpb1
Copy link

wpb1 commented Nov 11, 2023

Problem: It appears that stake, age bonus, dissolve delay bonus, and voting power are all displayed with 2 decimal places. However, the actual calculation is based on a lot more decimal places. Hence, a manual calculation based on the parameters on display does not equal to the voting power that is displayed. In the example below, the manually calculated value is 6342.49 and the displayed value is 6324.62, which is a discrepancy of 23.94 votes. This was enough for the end user who provided this screen capture to question the accuracy of the calculations.

image

Solution: If the voting power result that is displayed is going to have 6 significant figures as shown in the screen capture, then the age bonus and the dissolve delay bonus need to be shown with 6 significant figures as well. Alternatively, if age bonus and dissolve delay bonus are going to be displayed with 3 significant digits, then the voting power result should also have only 3 significant figures. From a more practical perspective, you could display 4 decimal places for age bonus and dissolve delay bonus. Then the rounding discrepancies would only be evident in the largest neurons.

@bitdivine
Copy link
Member

bitdivine commented Nov 11, 2023

Note: I have seen and liked web pages that have a copy button that provides the full value, while normally showing only a summary. It's in quite a few web pages but an example in a page I have open right now is the way GitHub shows an abbreviated hash, but if you click the copy button you get the full hash in the clipboard. Maybe something like that might help. What do you think?

The way GitHub shows commit hashes:
Screenshot from 2023-11-11 12-14-12

Click the copy icon on the left and you get this in your clipboard: 82e3d388986a85a38d41bdf97721bc4e28ec28c0

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

No branches or pull requests

2 participants