-
Notifications
You must be signed in to change notification settings - Fork 181
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
feat: implement rewards calculator and merge payout history #2482
base: main
Are you sure you want to change the base?
Conversation
- Create tabbed Rewards Calculator page - Move PayoutHistory to Rewards Calculator - Refactor components into Graph, Stats, PayoutList - Add history tab alongside rewards calculator - Update imports and file structure
- Removal of Payouts page - Creation of Rewards & Payouts - Add English & Spanish translation for updated menu item - Ting to review /cn/base.json & pages.json
- Resolve check license - Resolve validate-locales
…ud/polkadot-staking-dashboard into tabbed-rewards-calc
…ud/polkadot-staking-dashboard into tabbed-rewards-calc
Just making a note of next steps; to finalise the Stats that will be displayed at the top of the current Calculator page, both with Staking API enabled and disabled. We can leverage historical data with Staking API to get reward estimations based on historical performance. With the API disabled, we can derive stats based on chain state available on-chain at the current era. Note for Ross: Revise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct in assuming that everything from pages/Payouts
has been duplicated into pages/Rewards
? If so, pages/Payouts
can be deleted.
title={t('rewards.rewardsCalculator')} | ||
tabs={[ | ||
{ | ||
title: t('rewards.calculator'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page can be Overview
. The payout history graph currently present in "Payout History" tab can be displayed at this top of this page, with the new "Projected Rewards" module being displayed below it.
The Payout History tab can then just list historical payout records.
Co-authored-by: Ross Bulat <[email protected]>
Co-authored-by: Ross Bulat <[email protected]>
Co-authored-by: Ross Bulat <[email protected]>
I've just been experimenting with what we have so far and noticed that we should probably include a toggle that factors the average validator commission into the projections table. Otherwise the projections are always going to be around 10% larger than the actual rewards received. |
// Determine label depending if custom balance is active | ||
const balanceLabel = isCustomStake | ||
? t('rewards.customBalance') | ||
: t('rewards.currentStakedBalance') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we remove "Current" from this key? Just "Staked Balance" would suffice here i think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
This PR implements a new Rewards Calculator feature and merges it with the Payout History into a single tabbed interface.
Key changes:
This enhances both reward projection capabilities and historical tracking in a unified interface.
Addresses #1821