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

Users SBAT use an API to retrieve from blockscout the leader board information #1527

Closed
4 tasks
aaitor opened this issue Oct 30, 2019 · 1 comment
Closed
4 tasks
Assignees

Comments

@aaitor
Copy link
Contributor

aaitor commented Oct 30, 2019

Expected Behavior

As a user I would need to use an API in GraphQL or RPC format allowing to retrieve the information from Blockscout (Postgresql database) required to draw the leader board page.

That API should retrieve the top X addresses (50 by default) sorted by:

  • Sum of cGLD
  • Sum of cUSD
  • locked-up balance

This calculation requires the usage of:

  • Address multiplier
  • Exchange rate (Contract: SortedOracles.sol, Event: MedianRates

The API will support the following optional parameters:

  • List of addresses. If it's given the calculation will be only be calculated over the list of addresses given. If it's not given the calculation will use all the database addresses.
  • Number of addresses: 50 by default.
  • Sort field (always DESC). Options: cGLD, cUSD, lockedup

This issue depends on

Current Behavior

This API doesn't exist so there is no a way to build a frontend/mobile app to show the leader board in an easy way.

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

4 participants