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

Improve staking endpoints #1637

Closed
faboweb opened this issue Jul 11, 2018 · 3 comments
Closed

Improve staking endpoints #1637

faboweb opened this issue Jul 11, 2018 · 3 comments
Assignees

Comments

@faboweb
Copy link
Contributor

faboweb commented Jul 11, 2018

Improvement ideas:

  • The new staking endpoints for querying unbonding and redelegation are not really speaking. Can we change them to speaking names?
  • There are now 3 endpoints to query for every candidate. Can we abstract the backend logic to make this more convenient to app developers and provide one endpoint, i.e. GET /stake/{candidate}/delegators/{delegator} that returns an accessible state like { shares: x, unbondingShares: y, redelegatingShares: z }
@faboweb
Copy link
Contributor Author

faboweb commented Jul 12, 2018

Another huge improvement would be transmitting actual token amounts instead for rationals. Each app desired to show a staked amount would need to implement calculating the tokens.

Pulling in @rigelrozanski

@rigelrozanski
Copy link
Contributor

what do you mean by "speaking names" like better names?

There are now 3 endpoints to query for every candidate. Can we abstract the backend logic to make this more convenient to app developers and provide one endpoint, i.e. GET /stake/{candidate}/delegators/{delegator} that returns an accessible state like { shares: x, unbondingShares: y, redelegatingShares: z }

Nice, yeah really into this

Another huge improvement would be transmitting actual token amounts instead for rationals. Each app desired to show a staked amount would need to implement calculating the tokens.

Yeah we could transmit a decimal amount, that's probably the most easily readable/accurate output, additionally and integer is transmittable (which would be the withdrawal amount) however much of the staking logic requires higher degrees of accuracy so we use rationals, probably want to depict those higher levels of accuracy

@fedekunze fedekunze self-assigned this Jul 24, 2018
@fedekunze
Copy link
Collaborator

Check #1010 in Voyager for the proposed refactor

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

No branches or pull requests

3 participants