-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
add the link to specific queries on the source links #13916
Comments
Hi @nloureiro, |
Yes, that's correct. The idea is to give users the ability to verify the numbers on the most easy form possible |
Hey @Code-Hacker26! Thanks for the help. Let me try to help outline this... we have four (4) homepage metrics: Value locked in DeFi
Value protecting Ethereum Dune Analytics:
CoinGecko:
We then multiply those together to get the total $ securing the network. Average transaction cost AND Transactions in the last 24h
const mostRecentDate = data.reduce((latest, item) => {
const itemDate = new Date(item.date)
return itemDate > new Date(latest) ? item.date : latest
}, data[0].date) ^ Finds the const mostRecentData = data.filter(
(item) =>
item.date === mostRecentDate &&
[TXCOSTS_MEDIAN_USD, TXCOUNT].includes(item.metric_key)
) ^ Grabs most recent data for transaction costs and counts, assigns to let totalTxCount = 0
let weightedSum = 0
mostRecentData.forEach((item) => {
if (item.metric_key !== TXCOSTS_MEDIAN_USD) return
const txCountItem = mostRecentData.find(
(txItem) =>
txItem.metric_key === TXCOUNT && txItem.origin_key === item.origin_key
)
if (!txCountItem) return
totalTxCount += txCountItem.value
weightedSum += item.value * txCountItem.value
})
// The weighted average of txcosts_median_usd, by txcount on each network (origin_key)
const weightedAverage = totalTxCount ? weightedSum / totalTxCount : 0
This produces the "Average transaction cost" metrics, spanning the L2's available from that endpoint. Hope this helps summarize how/where the metrics come from. Any help organizing this info to present to users (cc: @nloureiro) would be most appreciated! Assigning you =) |
Hi @wackerow, Best regards, |
@nloureiro @wackerow, I've submitted the PR with updates to the four links in the homepage metrics section. Please review it and let me know if you have any suggestions or changes. Thank you! |
Describe the bug
when ever is possible we should link to the specific pages/queries on the big numbers on the homepage
example: the link for dune analytics should go to a dashboard and not the homepage
To reproduce
Expected behavior
change the source links
Screenshots
No response
Desktop (please complete the following information)
No response
Smartphone (please complete the following information)
No response
Additional context
No response
Would you like to work on this issue?
The text was updated successfully, but these errors were encountered: