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

Why is "Balance Distribution" showing shares instead of balances? #1545

Open
lukaw3d opened this issue Sep 16, 2024 · 5 comments · May be fixed by #1572
Open

Why is "Balance Distribution" showing shares instead of balances? #1545

lukaw3d opened this issue Sep 16, 2024 · 5 comments · May be fixed by #1572

Comments

@lukaw3d
Copy link
Member

lukaw3d commented Sep 16, 2024

https://explorer.dev.oasis.io/testnet/consensus/validators/oasis1qpz97gfrvj5xzx8jx7x9zweeq0rcf2q6jg4a09qz
explorer dev oasis io_testnet_consensus_validators_oasis1qpz97gfrvj5xzx8jx7x9zweeq0rcf2q6jg4a09qz

https://testnet.nexus.prd.oasis.io/v1/consensus/validators/oasis1qpz97gfrvj5xzx8jx7x9zweeq0rcf2q6jg4a09qz

        "active_balance": "11519491447527",
        "active_balance_24": "11643393355099",
        "active_shares": "10186532790671",
        "debonding_balance": "224688870953",
        "debonding_shares": "224688870953",
        "num_delegators": 4,
        "self_delegation_balance": "11308549910208",
        "self_delegation_shares": "10000000000000"
@buberdds
Copy link
Contributor

buberdds commented Sep 17, 2024

UX wise we prob need Don answer here, other than that it was discussed in Figma

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 17, 2024

@donouwens

@donouwens
Copy link
Collaborator

Based on Andy's input shares are more accurate and actually accumulate to 100%. The initial idea from me was to show shares in a tooltip rather than showing both though.

@lukaw3d
Copy link
Member Author

lukaw3d commented Sep 18, 2024

Balances will still accumulate to 100%. And ratios should still be equally accurate (active_balance = active_shares*inaccurate_value; self_delegation_balance = self_delegation_shares*inaccurate_value).

@Andrew7234 how can balance inaccuracies occur? Is it just: if indexing is 10 days behind, both balances will be approximately 2.5% / 365 * 10 = 0.068% too low?

@Andrew7234
Copy link

For calculating self delegations (or any user's staked balance with a validator) we end up rounding the balance to the nearest base unit. In practice this is a very small error since 1 rose = 10^9 base units, so it shouldn't make much of a difference to use shares/balance for percentage calculations.

I initially liked the idea of using shares since Nexus tracks those explicitly, and they don't change as often due to epoch staking rewards. But I agree that the 'rose balance' should take precedence over the 'shares'. I like Don's suggestion of showing the balance by default and displaying shares in the tooltip/hover, does that sound ok?

@buberdds buberdds linked a pull request Oct 15, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants