polkadot-cloud/polkadot-staking-dashboard

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

Juanma0x opened this issue · 3 comments

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

image

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.

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

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.