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

(Feature) Delegator Next Reward #43

Merged
merged 8 commits into from
Jun 26, 2019

Conversation

Agupane
Copy link
Contributor

@Agupane Agupane commented Jun 25, 2019

Depends on #42

Description

  • Adds an API for fetch the next LPT reward for a given delegator.
  • Adds support for delegators in the routes

Example:

http://localhost:4040/api/delegators/reward/${delegatorAddress}

{
    "nextReward": "56.325947131421200279402109515691521548958370443531295341423616"
}

Calculation

The next reward is calculated based on:

  • DelegateRewardsForNextRound
  • DelegatorParticipationInBondedStake.

See #39 for details

Adds delegator controller and route
Adds getNextReward controller
Adds id on graphql querys (improves performance)
Removes missed reward calls from getDelegate
Adds getDelegatorNextReward on delegatorService
Fixs protocol.js
@Agupane Agupane requested a review from mariano-aguero June 25, 2019 20:00
@Agupane Agupane self-assigned this Jun 25, 2019
@mariano-aguero mariano-aguero merged commit 4319eb6 into development Jun 26, 2019
@mariano-aguero mariano-aguero deleted the feature/delegator-next-reward branch June 26, 2019 19:43
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 this pull request may close these issues.

2 participants