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

Token stats calculated incorrectly #569

Open
christroutner opened this issue Mar 23, 2020 · 1 comment
Open

Token stats calculated incorrectly #569

christroutner opened this issue Mar 23, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@christroutner
Copy link

This issue was first reported by a user in the Simple Ledger Protocol Telegram channel:
https://t.me/simpleledger

Token stats are being reported incorrectly.

This is an issue with the current /tokenStats endpoint in rest.bitcoin.com. Here is the query:
https://rest.bitcoin.com/v2/slp/tokenStats/b10677aef051b73e6b170c1c0824da33a3e0680ab5a01cd8d76aa77840fccfb4

It's showing 200,010 tokens in circulation but there is only 100,010, which is reflected accurately on the SLP explorer:
https://simpleledger.info/#token/b10677aef051b73e6b170c1c0824da33a3e0680ab5a01cd8d76aa77840fccfb4

Here is the actual code that gets called. It's a series of queries to SLPDB. There must be an issue in one of the queries where its counting the initial token issuance twice.
https://github.com/Bitcoin-com/rest.bitcoin.com/blob/master/src/routes/v2/services/slpdb.ts#L77-L89

@christroutner christroutner added the bug Something isn't working label Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants