Skip to content

Improve accuracy of calculation for total voting power #3718

Open
@wpb1

Description

@wpb1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions