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

Add endpoint for netAmount, bTokenRate #176

Closed
4 tasks
dongsam opened this issue Feb 13, 2022 · 0 comments · Fixed by #184
Closed
4 tasks

Add endpoint for netAmount, bTokenRate #176

dongsam opened this issue Feb 13, 2022 · 0 comments · Fixed by #184
Assignees
Milestone

Comments

@dongsam
Copy link
Contributor

dongsam commented Feb 13, 2022

Summary

Add endpoint for netAmount or bTokenRate

Problem Definition

The netAmount is information that changes from moment to moment depending on staking, validator, liquidstaking dependence, we you need to decide whether to temporarily store and deliver kv for endpoint in endblock or calculate and deliver every time.

-> we decided to calculate directly every request on the endpoint

Proposal

add states endpoint

  • squad/liquidstaking/v1beta1/states
  • squad query liquidstaking states

endpoint example

{
  "net_amount_state": {
    "mint_rate": "0.998998080878542686",
    "btoken_total_supply": "500000000",
    "net_amount": "500501461.985080192496888896",
    "total_del_shares": "500499999.000000000000000000",
    "total_liquid_tokens": "500499999",
    "total_remaining_rewards": "1458.985080192496888896",
    "total_unbonding_balance": "0",
    "proxy_acc_balance": "4"
  }
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@dongsam dongsam self-assigned this Feb 13, 2022
@dongsam dongsam added this to the v1.0 milestone Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant