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

Inaccurate distribution of a nominator's bonded balance among active validators #2125

Open
Juanma0x opened this issue May 10, 2024 · 3 comments
Labels
mentor Introductory tip

Comments

@Juanma0x
Copy link

When a nominator's balance is split among multiple validators, the dashboard shows the same amount for each validator, which is incorrect.

image

@rossbulat rossbulat added the mentor Introductory label May 17, 2024
@rossbulat
Copy link
Collaborator

rossbulat commented May 17, 2024

Thank you for reporting this.

@frankli-dev would you be interested in tackling this issue?

A quick way to reproduce the issue would be to import a read only account that has this scenario where its bonded funds are split among multiple validators. Perhaps @Juanma0x can share the nominator in the screenshot?

The staked amount is displayed from src/library/ListItem/Labels/NominationStatus.tsx. It looks like same activeAccountOwnStake is being used, rather than the amount for the single validator.

My initial thoughts would be to store a Record<validator, ownStake> instead of a single activeAccountOwnStake, which is currently persisted to erasStakers state in src/contexts/Staking/index.tsx.

@rossbulat rossbulat added the tip label May 17, 2024
@Juanma0x
Copy link
Author

Thanks @rossbulat for looking into it.

Because big accounts are more likely to be assigned multiple validators for any given era, you can copy almost any of the "staking whales" and add it as "read-only" account in the Staking Dashboard.

I.e.: 16GMHo9HZv8CcJy4WLoMaU9qusgzx2wxKDLbXStEBvt5274B

@frankli-dev
Copy link
Contributor

Thank you for reporting this.

@frankli-dev would you be interested in tackling this issue?

A quick way to reproduce the issue would be to import a read only account that has this scenario where its bonded funds are split among multiple validators. Perhaps @Juanma0x can share the nominator in the screenshot?

The staked amount is displayed from src/library/ListItem/Labels/NominationStatus.tsx. It looks like same activeAccountOwnStake is being used, rather than the amount for the single validator.

My initial thoughts would be to store a Record<validator, ownStake> instead of a single activeAccountOwnStake, which is currently persisted to erasStakers state in src/contexts/Staking/index.tsx.

@rossbulat Sure. I didn't check my email though. I couldn't see this notification. I will handle this and will create a pr from https://github.com/frankli-polkadot (my github only for staking dashboard contribution)

Will update asap.

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

No branches or pull requests

3 participants