Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Subscan issues #4861

Open mochet opened 1 year ago

mochet commented 1 year ago

A list of issues found with Subscan so far:

  1. Circulating issuance number appears to be wrong. It appears to not be calculating the vested amount correctly. image image

  2. Balance History chart is not available or not populated

  3. Charts section includes some broken charts (https://joystream.stg.subscan.io/tools/charts)

    • Daily Holder
    • Daily Average Block Time
    • Daily Native Token Circulating Supply
    • Daily Vesting Schedule
  4. Charts section includes some charts that don't apply to Joystream (https://joystream.stg.subscan.io/tools/charts)

    • Treasury Available Income
    • Treasury Expenses
  5. Fees are in wrong units. Appear to show fees in $HAPI rather than $JOY

  6. Distribution information includes Democracy and Election pallets which are not on Joystream image

  7. Inflation rate appears to be wrong--shows 4.22% but is supposedly around 1.1%

  8. reward points are only tracked since era 956 and are missing for the first 239 days.

  9. the daily vesting release is incorrect https://joystream.stg.subscan.io/tools/charts?type=vesting_release It states 551 kJOY release each day until 10th Dec and 306 kJOY after that. But actually it should be around 1 MJOY each day until 10th Dec and 820 kJOY after that.

traumschule commented 1 year ago

reward points are only tracked since era 956 and are missing for the first 239 days.

mochet commented 1 year ago

reward points are only tracked since era 956 and are missing for the first 239 days.

You mentioned this on Discord but when I click on that link, I can go to page 38 which shows reward points from era 85: https://joystream.stg.subscan.io/era?address=j4STQtK3EE3BqcNiwzW5UxN9mBiTcEQosL113JQTXzTJFU8C6&page=38

traumschule commented 1 year ago

Not sure what you are looking at. Following your link there are -. :) era85

mochet commented 1 year ago

Not sure what you are looking at. Following your link there are -. :) era85

oh sorry, I didn't properly read what the problem was when you shared it. Will add it to the list

chrlschwb commented 1 year ago
  1. timestamp extrinsics do not appear. https://joystream.stg.subscan.io/extrinsic?address=&module=timestamp&call=all&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=2001&endBlock=

  2. the daily vesting release is incorrect. https://joystream.stg.subscan.io/tools/charts?type=vesting_release It states 551 kJOY release each day until 10th Dec and 306 kJOY after that. But actually it should be around 1 MJOY each day until 10th Dec and 820 kJOY after that.

mochet commented 1 year ago
  1. timestamp extrinsics do not appear. https://joystream.stg.subscan.io/extrinsic?address=&module=timestamp&call=all&result=all&signedChecked=signed%20only&startDate=&endDate=&startBlock=&timeType=date&version=2001&endBlock=

You can get timestamp extrinsics to show by changing sign filter from signed only to all: https://joystream.stg.subscan.io/extrinsic?address=&module=timestamp&call=all&result=all&signedChecked=all&startDate=&endDate=&startBlock=&timeType=date&version=2001&endBlock=

  1. the daily vesting release is incorrect. https://joystream.stg.subscan.io/tools/charts?type=vesting_release It states 551 kJOY release each day until 10th Dec and 306 kJOY after that. But actually it should be around 1 MJOY each day until 10th Dec and 820 kJOY after that.

will add this to the list

carlhong commented 1 year ago

Hi, @mochet we have fixed most issues mentioned above. As for issue 7, we will look into it and customize the inflation rate soon. As for issue 8, we can only sync 120 era for now, thus no data for previous eras. As for vesting related issue, we've re-synced corresponding data, please check again.

yakio commented 1 year ago

The issue 7 has been updated!

mochet commented 1 year ago

On the main page, when clicking Large transfers, no transfers will show.

yakio commented 1 year ago

On the main page, when clicking Large transfers, no transfers will show.

Thank you for your careful testing and feedback. After our investigation, we found that this is not a bug. This list shows transfers with a real-time value of more than 100,000 USD. There is no qualifying data for now.

bedeho commented 1 year ago

The circulating supply is not accurate

Screenshot 2023-09-15 at 10 13 15

Compare to CMC profile

Screenshot 2023-09-15 at 10 14 09

If you want to see how it is computed and do a comparison with what you are doing, please consult calculateCirculatingSupply function at this link: https://github.com/DzhideX/status-endpoint-joystream/blob/9f72f34f4cb23f5a4d3c85960a640cca3094d5a4/src/joyApi.ts#L385

cuckooemm commented 1 year ago

The circulating supply is not accurate

Screenshot 2023-09-15 at 10 13 15

Compare to CMC profile

Screenshot 2023-09-15 at 10 14 09

If you want to see how it is computed and do a comparison with what you are doing, please consult calculateCirculatingSupply function at this link: https://github.com/DzhideX/status-endpoint-joystream/blob/9f72f34f4cb23f5a4d3c85960a640cca3094d5a4/src/joyApi.ts#L385

I have two questions

bedeho commented 1 year ago

@cuckooemm Hey, so, I think we will try to just simplify this, we have started an issue to fix this, hopefully very soon.

https://github.com/Joystream/status-endpoint-joystream/issues/45

chrlschwb commented 1 year ago

The API result for https://joystream.api.subscan.io/api/scan/transfers is incorrect. Or am I somehow doing it wrong? Specifically, the total value from the results is different from the values in the UI https://joystream.stg.subscan.io/transfer

parameters used

{
    "row": 11,
    "page": 1,
    "include_total":true,
    "address":"j4WoRUngU6YgJ7ucn1MpMQCxKZsk2MsQtWJu39r3eQjNQayV4",
    "direction":"received"
}

API result

{
    "code": 0,
    "message": "Success",
    "generated_at": 1695132307,
    "data": {
        "count": 12,
        "total": {
            "JOY": {
                "sent": "0",
                "received": "110.68046444225732",
                "total": "110.68046444225732"
            }
        },
        "transfers": [...
        ]
    }
}

But result here shows that total received is 1,739,000 JOY.

cuckooemm commented 1 year ago

The API result for https://joystream.api.subscan.io/api/scan/transfers is incorrect. Or am I somehow doing it wrong? Specifically, the total value from the results is different from the values in the UI https://joystream.stg.subscan.io/transfer

parameters used

{
    "row": 11,
    "page": 1,
    "include_total":true,
    "address":"j4WoRUngU6YgJ7ucn1MpMQCxKZsk2MsQtWJu39r3eQjNQayV4",
    "direction":"received"
}

API result

{
    "code": 0,
    "message": "Success",
    "generated_at": 1695132307,
    "data": {
        "count": 12,
        "total": {
            "JOY": {
                "sent": "0",
                "received": "110.68046444225732",
                "total": "110.68046444225732"
            }
        },
        "transfers": [...
        ]
    }
}

But result here shows that total received is 1,739,000 JOY.

We have fixed this issue, thanks for the feedback

bedeho commented 12 months ago

Hey @cuckooemm, we have now cleaned up the implementation of this routine, here is the new implementation, but output is still the same as before.

https://github.com/Joystream/status-endpoint-joystream/blob/master/src/joyApi.ts#L403

It is now also heavily documented.

If you want to read methodology, read background issue: https://github.com/Joystream/status-endpoint-joystream/blob/master/src/joyApi.ts#L403

bedeho commented 11 months ago

I think one clear distinction between what we are doing and what is going on in Subscan is that tokens that are used for nomination/validation are counted as circulating by us, since they are basically available for sale on market with very short time latency, while you are counting it as not circulating.

Screenshot 2023-09-26 at 22 35 13

bedeho commented 11 months ago

It seems this is in conflict with what CMC & Coingecko does for example, look at Polkadot for example.

CMC Screenshot 2023-09-26 at 22 41 50

Coingecko Screenshot 2023-09-26 at 22 42 30

Subscan

Screenshot 2023-09-26 at 22 42 05

yakio commented 11 months ago

Hi @bedeho,

In general, it is true that Subscan's approach to calculating circulation differs from the methods employed by CMC/Coingecko. However, our calculation method has received recognition from Substrate ecosyste, and it is deemed to be more suitable for the Substrate ecosystem. Nevertheless, we are very open to adapting our circulation calculation method to align with the characteristics of the Joystream network, as this is indeed a crucial data point.

Regarding the slow progress, there may have been some misunderstandings. Upon seeing the issue, our team assumed that further development should proceed after the issue is merged. This misunderstanding may have caused a delay. Following the merger of this issue, we have initiated the development plan again and anticipate releasing a new test version for your team to test today. If the new version proves to be suitable for your team, we are ready to proceed with the official release and announce it to the community! I am eagerly looking forward to this moment.

cuckooemm commented 11 months ago

circulating supply has been updated