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

Implement reward estimations for staking a validator #5295

Closed
ManuGowda opened this issue Sep 6, 2023 · 0 comments
Closed

Implement reward estimations for staking a validator #5295

ManuGowda opened this issue Sep 6, 2023 · 0 comments
Assignees
Milestone

Comments

@ManuGowda
Copy link
Contributor

ManuGowda commented Sep 6, 2023

Description

Enable users to estimate the rewards while staking.

Motivation

As a network participant I want to stake tokens for a validator "validator 1", the wallet should provide an ability to get the expected reward for a daily, monthly and yearly.

Additional Information

  • getExpectedValidatorRewards in the dynamic reward module, gives expected reward for a validator for several cases (day, month, year)
  • getExpectedSharedRewards( in the pos module gives the expected shared reward if staking a validator with a particular amount.

To achieve the estimations:

  • call getExpectedValidatorRewards(validator1.address), and expected daily/monthly/yearly reward

  • then call pos.getExpectedSharedRewards(validator1.address, daily/monthly/yearly, myStake = 500) and this gives my expected shared reward

  • Also enable users to sort validators by Validator weight, Commission, Rank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants