mirror of
https://github.com/FlipsideCrypto/crosschain-models.git
synced 2026-02-06 13:46:50 +00:00
remove ink
This commit is contained in:
parent
fc492aefc3
commit
8f004f7624
@ -1,37 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['metrics_daily']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
blockchain,
|
||||
A.address AS token_address,
|
||||
A.symbol,
|
||||
CASE
|
||||
WHEN b.token_address IS NOT NULL THEN 'USD'
|
||||
WHEN C.tracks_asset IS NOT NULL THEN C.tracks_asset
|
||||
ELSE 'alt-token'
|
||||
END AS tracks_asset
|
||||
FROM
|
||||
{{ ref('silver__tokens_enhanced') }} A
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
DISTINCT token_address
|
||||
FROM
|
||||
{{ ref('silver__tokens_stablecoins') }}
|
||||
) b
|
||||
ON A.address = b.token_address
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
DISTINCT token_address,
|
||||
tracks_asset
|
||||
FROM
|
||||
{{ ref('silver__tokens_majors') }}
|
||||
) C
|
||||
ON A.address = C.token_address
|
||||
WHERE
|
||||
LOWER(
|
||||
A.blockchain
|
||||
) = 'ink'
|
||||
AND A.is_verified
|
||||
AND a.address is not null
|
||||
@ -1,14 +0,0 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_ink_allowlist
|
||||
description: 'Verified tokens for Ink blockchain. Appended with a tracks asset column that inidicates ETH, BTC, USD, or is an alt coin'
|
||||
|
||||
columns:
|
||||
- name: blockchain
|
||||
description: 'The name of the blockchain (e.g., Arbitrum, Ethereum, etc.)'
|
||||
|
||||
- name: symbol
|
||||
description: 'The symbol of the token (e.g., ETH, BTC, USDC, etc.)'
|
||||
|
||||
- name: tracks_asset
|
||||
description: 'the asset that the token tracks, which can be ETH, BTC, USD, or an alt token. This is used to indicate the primary asset that the token is associated with'
|
||||
@ -1,77 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['metrics_daily']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_date AS day_,
|
||||
A.unique_initiator_count AS active_users_count,
|
||||
A.quality_unique_initiator_count AS active_quality_users_count,
|
||||
A.transaction_count,
|
||||
A.quality_transaction_count,
|
||||
A.total_fees_native AS total_fees,
|
||||
A.total_fees_usd,
|
||||
A.quality_total_fees_native quality_total_fees,
|
||||
A.quality_total_fees_usd,
|
||||
d.stablecoin_transfer_volume_usd,
|
||||
g.in_unit_total_transfer_volume,
|
||||
g.total_transfer_volume_usd,
|
||||
g.in_unit_quality_total_transfer_volume,
|
||||
g.quality_total_transfer_volume_usd,
|
||||
e.withdrawal_volume_usd AS cex_withdrawal_volume_usd,
|
||||
e.withdrawal_txn_count AS cex_withdrawal_tx_count,
|
||||
e.unique_withdrawing_addresses AS cex_unique_withdrawing_addresses,
|
||||
e.deposit_volume_usd AS cex_deposit_volume_usd,
|
||||
e.deposit_txn_count AS cex_deposit_tx_count,
|
||||
e.unique_depositing_addresses AS cex_unique_depositing_addresses,
|
||||
e.net_cex_flow_usd AS cex_net_flow_usd,
|
||||
C.gross_dex_volume_usd AS chain_gross_dex_volume_usd,
|
||||
C.swap_count AS chain_swap_count,
|
||||
C.distinct_swapper_count chain_swapper_count,
|
||||
f.current_tvl AS tvl_usd,
|
||||
(
|
||||
A.total_fees_native / A.total_fees_usd
|
||||
) * f.current_tvl AS in_unit_tvl,
|
||||
b.total_inbound_volume AS bridge_inbound_volume_usd,
|
||||
b.distinct_inbound_addresses AS bridge_inbound_addresses,
|
||||
b.distinct_inbound_transactions AS bridge_inbound_tx_count,
|
||||
b.total_outbound_volume AS bridge_outbound_volume_usd,
|
||||
b.distinct_outbound_addresses AS bridge_outbound_addresses,
|
||||
b.distinct_outbound_transactions AS bridge_outbound_tx_count,
|
||||
b.gross_volume AS bridge_gross_volume_usd,
|
||||
b.net_volume AS bridge_net_inbound_usd
|
||||
FROM
|
||||
{{ ref('stats__ez_activity_metrics_daily') }} A
|
||||
LEFT JOIN {{ ref('stats__ez_bridge_metrics_daily') }}
|
||||
b USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
LEFT JOIN {{ ref('stats__ez_dex_metrics_daily') }} C USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
LEFT JOIN {{ ref('stats__ez_stablecoin_flows_daily') }}
|
||||
d USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
LEFT JOIN {{ ref('stats__ez_cex_flows_daily') }}
|
||||
e USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
LEFT JOIN {{ ref('stats__ez_tvl_chain_metrics_daily') }}
|
||||
f USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
LEFT JOIN {{ ref('stats__ez_transfer_metrics_daily') }}
|
||||
g USING(
|
||||
block_date,
|
||||
blockchain
|
||||
)
|
||||
WHERE
|
||||
LOWER(
|
||||
A.blockchain
|
||||
) = 'ink'
|
||||
@ -1,107 +0,0 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_ink_metrics_daily
|
||||
description: 'Daily aggregated metrics for Ink blockchain including transaction activity, fees, DEX volumes, bridge flows, CEX flows, and TVL data. All metrics are calculated at the daily level (YYYY-MM-DD format) and include both total activity and quality user activity (Flipside score >= 4).'
|
||||
|
||||
columns:
|
||||
- name: day_
|
||||
description: 'The date in YYYY-MM-DD format - all stats are aggregated at the daily level'
|
||||
|
||||
- name: active_users_count
|
||||
description: 'Number of origin_from_address (Externally Owned Accounts EOAs) that submitted a transaction'
|
||||
|
||||
- name: active_quality_users_count
|
||||
description: 'Number of EOAs with a Flipside score of 4 or higher that submitted a transaction'
|
||||
|
||||
- name: transaction_count
|
||||
description: 'Number of transactions submitted by any origin_from_address (EOA)'
|
||||
|
||||
- name: quality_transaction_count
|
||||
description: 'Number of transactions submitted by EOAs with a Flipside score of 4 or higher'
|
||||
|
||||
- name: total_fees
|
||||
description: 'Total transaction fees paid, denominated in Ether (ETH)'
|
||||
|
||||
- name: total_fees_usd
|
||||
description: 'USD denominated total transaction fees paid (converting ETH to USD via ETH price)'
|
||||
|
||||
- name: quality_total_fees
|
||||
description: 'Total transaction fees paid by EOAs with a Flipside score of 4 or higher, denominated in Ether (ETH)'
|
||||
|
||||
- name: quality_total_fees_usd
|
||||
description: 'USD denominated total transaction fees paid by EOAs with a Flipside score of 4 or higher (converting ETH to USD via ETH price)'
|
||||
|
||||
- name: stablecoin_transfer_volume_usd
|
||||
description: 'Value of all stablecoin transfers for any reason (USD)'
|
||||
|
||||
- name: in_unit_total_transfer_volume
|
||||
description: 'Value of all token transfers of any token for any reason, denominated in ETH to reduce price effects (token price changes can be different than fundamental activity changes)'
|
||||
|
||||
- name: total_transfer_volume_usd
|
||||
description: 'Value of all token transfers for any reason (direct, swap, liquidity deposit, staking, etc.), denominated in USD accepting price effects'
|
||||
|
||||
- name: in_unit_quality_total_transfer_volume
|
||||
description: 'Value of all token transfers FROM EOAs with a Flipside score of 4 or higher for any reason, denominated in ETH'
|
||||
|
||||
- name: quality_total_transfer_volume_usd
|
||||
description: 'Value of all token transfers FROM EOAs with a Flipside score of 4 or higher for any reason, denominated in USD'
|
||||
|
||||
- name: cex_withdrawal_volume_usd
|
||||
description: 'Value of central exchange token withdrawals (USD)'
|
||||
|
||||
- name: cex_withdrawal_tx_count
|
||||
description: 'Number of central exchange token withdrawal transactions'
|
||||
|
||||
- name: cex_unique_withdrawing_addresses
|
||||
description: 'Number of unique addresses that withdrew from a central exchange'
|
||||
|
||||
- name: cex_deposit_volume_usd
|
||||
description: 'Value of central exchange token deposits (USD)'
|
||||
|
||||
- name: cex_deposit_tx_count
|
||||
description: 'Number of central exchange token deposit transactions'
|
||||
|
||||
- name: cex_unique_depositing_addresses
|
||||
description: 'Number of unique addresses that deposited to a central exchange'
|
||||
|
||||
- name: cex_net_flow_usd
|
||||
description: 'Net CEX flow (withdrawal_volume_usd - deposit_volume_usd). Note that if activity and price are correlated, this value can be negative even if more tokens are withdrawn than deposited'
|
||||
|
||||
- name: chain_gross_dex_volume_usd
|
||||
description: 'USD value of token sell volume on Decentralized Exchanges (DEXs) protocols'
|
||||
|
||||
- name: chain_swap_count
|
||||
description: 'Number of swap transactions on Decentralized Exchanges (DEXs) protocols'
|
||||
|
||||
- name: chain_swapper_count
|
||||
description: 'Number of unique EOAs that have submitted a swap transaction on Decentralized Exchanges (DEXs) protocols'
|
||||
|
||||
- name: tvl_usd
|
||||
description: 'Total Value Locked - USD value of tokens locked in smart contracts. INCLUDES borrowed tokens, liquid staking, and staking'
|
||||
|
||||
- name: in_unit_tvl
|
||||
description: 'Total Value Locked in ETH denominated terms to reduce price effects'
|
||||
|
||||
- name: bridge_inbound_volume_usd
|
||||
description: 'Value of bridge inflows onto Arbitrum, denominated in USD'
|
||||
|
||||
- name: bridge_inbound_addresses
|
||||
description: 'Number of unique addresses receiving a bridge inflow'
|
||||
|
||||
- name: bridge_inbound_tx_count
|
||||
description: 'Number of bridge inflow transactions'
|
||||
|
||||
- name: bridge_outbound_volume_usd
|
||||
description: 'Value of bridge outflows from Arbitrum, denominated in USD'
|
||||
|
||||
- name: bridge_outbound_addresses
|
||||
description: 'Number of unique addresses sending a bridge outflow'
|
||||
|
||||
- name: bridge_outbound_tx_count
|
||||
description: 'Number of bridge outflow transactions'
|
||||
|
||||
- name: bridge_gross_volume_usd
|
||||
description: 'Value of bridge outflows from Arbitrum, denominated in USD'
|
||||
|
||||
- name: bridge_net_inbound_usd
|
||||
description: 'Value of bridge inflows minus outflows, denominated in USD. Note that if activity and price are correlated, this value can be negative even if more tokens are brought onto chain than off'
|
||||
@ -1,5 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['metrics_daily']
|
||||
) }}
|
||||
{{ get_protocol_metrics_daily('ink') }}
|
||||
@ -1,47 +0,0 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_ink_protocol_metrics
|
||||
description: 'Daily aggregated protocol-level metrics for Ink blockchain including user activity, transaction counts, and token flow data. Combines protocol interaction data with Flipside scoring to distinguish between total activity and quality user activity (Flipside score >= 4). Metrics track inflows, outflows, and user engagement at the protocol level.'
|
||||
|
||||
columns:
|
||||
- name: day_
|
||||
description: 'The date in YYYY-MM-DD format - all stats are aggregated at the daily level'
|
||||
|
||||
- name: protocol
|
||||
description: 'Protocol names including versioning information (e.g. Uniswap v2, v3, etc.). Note: protocol names may not always match protocol names in other tables like dex_volume'
|
||||
|
||||
- name: n_users
|
||||
description: 'Number of unique addresses submitting a transaction that interacts with any protocol contract. Same address can be counted across different protocols, but never more than once within a single protocol'
|
||||
|
||||
- name: n_quality_users
|
||||
description: 'Number of unique quality addresses with Flipside score >= 4 submitting a transaction that interacts with any protocol contract. Same address can be counted across different protocols, but never more than once within a single protocol'
|
||||
|
||||
- name: n_transactions
|
||||
description: 'Number of unique transactions that emit 1 or more events from any protocol contract. Same transaction can be counted across different protocols, but never more than once within a single protocol'
|
||||
|
||||
- name: n_quality_transactions
|
||||
description: 'Number of unique transactions by addresses with Flipside score >= 4 that emit 1 or more events from any protocol contract. Same transaction can be counted across different protocols, but never more than once within a single protocol'
|
||||
|
||||
- name: usd_inflows
|
||||
description: 'USD value of tokens sent INTO this protocol from all other addresses/protocols/contracts (excludes transfers within the same protocol)'
|
||||
|
||||
- name: usd_outflows
|
||||
description: 'USD value of tokens sent FROM this protocol to all other addresses/protocols/contracts (excludes transfers within the same protocol)'
|
||||
|
||||
- name: net_usd_inflow
|
||||
description: 'USD inflows minus outflows. Note: Price effects may cause net USD and token-level net changes to differ in direction (rare but possible with large, fast price changes)'
|
||||
|
||||
- name: gross_usd_volume
|
||||
description: 'Total USD volume calculated as inflows plus outflows'
|
||||
|
||||
- name: quality_usd_inflows
|
||||
description: 'USD value of token inflows from quality addresses with Flipside score >= 4'
|
||||
|
||||
- name: quality_usd_outflows
|
||||
description: 'USD value of token outflows to quality addresses with Flipside score >= 4'
|
||||
|
||||
- name: quality_net_usd
|
||||
description: 'Quality USD inflows minus quality USD outflows. Price effects may apply similar to net_usd_inflow'
|
||||
|
||||
- name: quality_gross_usd
|
||||
description: 'Total quality USD volume calculated as quality inflows plus quality outflows'
|
||||
Loading…
Reference in New Issue
Block a user