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

Leaderboard page should display Top 10 Accounts by balance for each coin #55

Open
gthoma17 opened this issue Nov 8, 2021 · 2 comments
Labels
enhancement New feature or request P1 P1 Page: Leaderboard

Comments

@gthoma17
Copy link
Contributor

gthoma17 commented Nov 8, 2021

Business/User Value: As an Explorer of Diem I want to who owns the most coins so that I don't have to use a CLI to get this info

Acceptance Criteria

GIVEN I am on the Leaderboard page
THEN I see a table with the Top 10 accounts ordered by balance for each coin

DESIGN NOTES
The tables should display:

  • Rank
  • Address (as a link)
  • Amount

DEV NOTES

  • Just do XUS for now
  • The query to get this data currently takes way too long.
    • Consider creating a view to simplify the query
    • Also consider adding an index on balance to improve query performance
    • Here's the queries we tried:
accounts_balances(limit: 10, order_by: {balance: desc}, where: {currency: {_eq: "XUS"}}) {
    address
    balance
    currency
    timestamp
    version
  }
realtime_account_balances(limit: 10, order_by: {balance: desc}, where: {currency: {_eq: "XUS"}}) {
    account
    balance
    blockchain_timestamp
    currency
    indexer_timestamp
    version
  }
@gthoma17 gthoma17 added Page: Leaderboard enhancement New feature or request P1 P1 labels Nov 16, 2021
@gthoma17 gthoma17 changed the title Secondary index pages should display Top 10 Accounts by balance Secondary index pages should display Top 10 Accounts by balance for each coin Nov 17, 2021
@gthoma17 gthoma17 changed the title Secondary index pages should display Top 10 Accounts by balance for each coin Leaderboard page should display Top 10 Accounts by balance for each coin Nov 30, 2021
@gthoma17
Copy link
Contributor Author

gthoma17 commented Dec 3, 2021

Opened a PR for indexer https://github.com/diem/operations/pull/2633

@gthoma17
Copy link
Contributor Author

topAccounts.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 P1 Page: Leaderboard
Projects
None yet
Development

No branches or pull requests

1 participant