Skip to content

Commit

Permalink
Added Internet Computer Metrics (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunny77D authored Dec 16, 2024
1 parent c1eecea commit 922c26c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ with
select
coalesce(price_data.date, defillama_data.date, icp_metrics.date, icp_total_canister_state.date, icp_neuron_funds.date, icp_blocks.date) as date
, total_transactions
, icp_txns
, dau
, txns
, neurons_total -- accounts that are staking ICP
Expand Down
2 changes: 1 addition & 1 deletion models/staging/drift/fact_drift_amm_revenue.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WITH fact_drift_daily_perp_data AS (
SELECT
date
, latest_timestamp
, latest_excess_pnl - LAG(latest_excess_pnl) OVER (ORDER BY date) as total_revenue
, latest_excess_pnl - LAG(latest_excess_pnl, 1, null) OVER (ORDER BY date) as total_revenue
, latest_excess_pnl
FROM
fact_drift_daily_perp_data
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ max_extraction as (
,value:proposals_count::int as total_proposals_count
,value:registered_canisters_count::int as total_registered_canister_count
,value:total_transactions::int as total_transactions
,value:total_update_transactions_till_date::int + value:total_query_transactions_till_date::int as new_total_transactions
-- DQ issues where estimated returns are sometimes >> 1 Trillion
, case
when
Expand All @@ -52,7 +53,8 @@ select
date
, total_transactions
, dau
, total_transactions - LAG(total_transactions, 1, null) OVER (ORDER BY date) as txns
, total_transactions - LAG(total_transactions, 1, null) OVER (ORDER BY date) as icp_txns
, new_total_transactions - LAG(NEW_TOTAL_TRANSACTIONS, 1, null) OVER (ORDER BY date) as txns
, neurons_total
, avg_tps
, avg_blocks_per_second
Expand Down

0 comments on commit 922c26c

Please sign in to comment.