Closed alejandroRbit closed 2 months ago
@Keith-CY @Kirl70 We can make a similar chart like the one above with some little changes. Proposal here.
@Keith-CY @Kirl70 We can make a similar chart like the one above with some little changes. Proposal here.
LGTM
PR: https://github.com/nervosnetwork/ckb-explorer/pull/1534
curl --location --request GET 'https://ckb-explorer-api.staging.layerview.io/api/v1/statistics/ckb_hodl_waves' \
--header 'Content-Type: application/vnd.api+json' \--header 'Accept: application/vnd.api+json'
{"data":{"id":"1","type":"statistic","attributes":{"ckb_hodl_waves":{"latest_day":"152030773.52948624","updated_at":1702957156,"total_supply":"40852833513.19522553","day_to_one_week":"103991882.93154158","over_three_years":"19539412295.26189161","one_week_to_one_month":"455724216.73713526","six_months_to_one_year":"19610055191.11351636","one_year_to_three_years":"23338728323.07790978","one_month_to_three_months":"816836356.02697056","three_months_to_six_months":"2220316233.84348105"}}}}%
The API is ready, we may start the UX @Sven-TBD
Okay. The front-end work of issue has been delegated to @zmcNotafraid , coz it's not a high priority work, and Mingchang finished the backend
Do we still need a UI for this one as well? Something like the color for the Chart
BackendPR: https://github.com/nervosnetwork/ckb-explorer/pull/1622 https://github.com/nervosnetwork/ckb-explorer/pull/1629 https://github.com/nervosnetwork/ckb-explorer/pull/1853 https://github.com/nervosnetwork/ckb-explorer/pull/1908 FrontendPR: https://github.com/Magickbase/ckb-explorer-frontend/pull/254 https://github.com/Magickbase/ckb-explorer-frontend/pull/385
In above chart, we needs to calcuate every day's different time range live cell's capacity as
numerator.To get the ratio, we use every day's tip dao's C_i
as denominator.But from the chart we can see, the all time range ratio's sum is less than 100%. So which dao's column should we use as denominator?
In above chart, we needs to calcuate every day's different time range live cell's capacity as numerator.To get the ratio, we use every day's tip dao's
C_i
as denominator.But from the chart we can see, the all time range ratio's sum is less than 100%. So which dao's column should we use as denominator?
Based on the distribution mentioned at https://github.com/Magickbase/ckb-explorer-public-issues/issues/424#issuecomment-1963158081
dao.c
includes total live cells
, unclaimed dao rewards
, burned to treasury
.
dao.s
includes unclaimed dao rewards
, burned to treasury
The chart is about live_cells_in_app / total_live_cells
, so the denominator should be total live cells
, which is dao.c - dao.s
block_0: #<OpenStruct c_i=3360000145238488200, ar_i=10000000000000000, s_i=35209330473, u_i=504120308900000000>
block_1: #<OpenStruct c_i=3360000290476976400, ar_i=10000000104789669, s_i=65136000891, u_i=504120308900000000>
- - -
block_0's live_cell_outputs in database capacity: 3360000000000000000
block_0_live_cells_capacity = [c_i] - [s_i] = 3360000110029157727
block_1's live_cell_outputs in database capacity: 0
block_1_live_cells_capacity = [c_i] - [s_i] = 3360000225340975509
---
But block 1 only have 1 tx that with no cell_outputs, so why it increase capacity?
https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0023-dao-deposit-withdraw/0023-dao-deposit-withdraw.md#calculation
C_i : C_{i-1} + p_i + s_i
After research, we can't directly get live cell ouputs capacity from dao field.So we use our explorer's data as taotal live cell capacity.
I recently wrote this article (https://www.nervos.org/knowledge-base/surprisingly_secondary_issuance_is_not_inflationary) in which I try to explain how the loss of coins affects the total spendable CKBytes over time. As a result of this article, I think it would be interesting for the community to have a chart in the CKB explorer that shows the liquidity of the network but taking into account how this liquidity moves over time. For example, we could display how many CKBytes have been moved in the last year, how many CKBytes have not been moved for X years, etc. In fact, Glassnode has similar charts like "Hold Wave" and "Hodled or lost coins" (we don't have to call it the same way, we simply show the temporalities and let the reader draw his own conclusions. It doesn't have to be the same either, it's just an example):
Thanks to NervosDAO we can better identify and represent saving behaviors in the network compared to Bitcoin, but I think adding temporalities would add a richer and more nuanced view of network liquidity, especially to liquid CKBs that are not in the DAO, i.e. those CKBytes with transactional priorities. CKB economic model is richly nuanced and this type of chart can help community members understand it better. I also think it would be a good complement and contextualizes this other chart: https://explorer.nervos.org/charts/liquidity.
Some reference articles on this topic: Bitcoin Data Science (Pt. 1): HODL Waves Bitcoin Data Science (Pt. 2): The Geology of Lost Coins Bitcoin Data Science (Pt. 3): Dust & Thermodynamics A Primer on Bitcoin Investor Sentiment and Changes in Saving Behavior