Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Fixes supply stats on the homepage.
Slack context: https://hiropbc.slack.com/archives/C03TU42NL05/p1730334206249929?thread_ts=1730330803.165729&cid=C03TU42NL05
the explorer is dividing circulatingSupply = total_liquid_supply_ustx / MICROSTACKS_IN_STACKS = 1501825000.29185
by
totalSupplyNumber = unlocked_stx = 1498769444.73627
total_liquid_supply_ustx is taken from /v2/pox
unlocked_stx is taken from api.infoApi.getStxSupply({})
Interestingly, total_stx, taken from api.infoApi.getStxSupply({}), is 1498769444.73627, which is the same as unlocked_stx, as well as less than total_liquid_supply_ustx.
I can see that the response for api.infoApi.getStxSupply({}) has changed. It now includes total_stx_year_2050, which we weren't using before. I will fix that.
The main issue is that we are taking the circulating supply from total_liquid_supply_ustx from /v2/pox, which is returning a number that is higher than the total_stx and unlocked_stx returned from https://api.hiro.so/extended/v1/stx_supply.
It seems like we should use unlocked_stx as the circulating supply and total_stx as total stx. Both are the same so the % unlocked should be 100%.
The API should investigate why total_liquid_supply_ustx taken from /v2/pox is returning a higher #
@matt
@rafael
Issue ticket number and link
Checklist:
Screenshots (if appropriate):