Skip to content

Batch delegator rewards #3715

@faboweb

Description

@faboweb

Summary

As a developer
I want to query for the rewards of a delegators delegations per validator in one request
So I don't DDOS my app

Problem Definition

GET /distribution/delegators/{delegatorAddr}/rewards currently serves all rewards for my delegator.
It would be nice if this would show the rewards of that delegator by validator.

AC1

Proposed return struct:

{
  "total": 10.50,
  "rewards": [
    {
      "validator_address": "val_0_address",
      "rewards": "2.0",
    },
    {
      "validator_address": "val_1_address",
      "rewards": "2.0",
    },
    {
      "validator_address": "val_2_address",
      "rewards": "6.50",
    }
  ]
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

@fedekunze

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions