mirror of
https://github.com/FlipsideCrypto/fsc-evm.git
synced 2026-02-06 15:36:43 +00:00
merge
This commit is contained in:
commit
ccba2ea23f
@ -1,128 +1,168 @@
|
||||
chain,eid
|
||||
abstract,30324
|
||||
animechain,30372
|
||||
ape,30312
|
||||
aptos,30108
|
||||
arbitrum,30110
|
||||
arbitrum_nova,30175
|
||||
astar,30210
|
||||
astar_zkevm,30257
|
||||
aurora,30211
|
||||
avalanche,30106
|
||||
bob,30279
|
||||
bahamut,30363
|
||||
base,30184
|
||||
beam,30198
|
||||
berachain,30362
|
||||
bevm,30317
|
||||
bsc,30102
|
||||
bitlayer,30314
|
||||
blast,30243
|
||||
bouncebit,30293
|
||||
canto,30159
|
||||
celo,30125
|
||||
codex,30323
|
||||
concrete,30366
|
||||
conflux_espace,30212
|
||||
coredao,30153
|
||||
corn,30331
|
||||
cronos,30359
|
||||
cronos_zkevm,30360
|
||||
cyber,30283
|
||||
degen,30267
|
||||
dexalot,30118
|
||||
dfk_chain,30115
|
||||
dm2_verse,30315
|
||||
dos_chain,30149
|
||||
ebi,30282
|
||||
edu,30328
|
||||
ethereum,30101
|
||||
etherlink,30292
|
||||
fantom,30112
|
||||
flare,30295
|
||||
flow_evm,30336
|
||||
fraxtal,30255
|
||||
fuse,30138
|
||||
glue,30342
|
||||
gnosis,30145
|
||||
goat,30361
|
||||
gravity,30294
|
||||
gunz,30371
|
||||
harmony,30116
|
||||
hedera,30316
|
||||
hemi,30329
|
||||
homeverse,30265
|
||||
horizen_eon,30215
|
||||
hubble,30182
|
||||
hyperevm,30367
|
||||
initia,30326
|
||||
ink,30339
|
||||
iota,30284
|
||||
japan_open_chain,30285
|
||||
kaia,30150
|
||||
kava,30177
|
||||
lens,30373
|
||||
lightlink,30309
|
||||
linea,30183
|
||||
lisk,30321
|
||||
loot,30197
|
||||
lyra,30311
|
||||
manta_pacific,30217
|
||||
mantle,30181
|
||||
masa,30263
|
||||
merlin,30266
|
||||
meter,30176
|
||||
metis,30151
|
||||
mode,30260
|
||||
moonbeam,30126
|
||||
moonriver,30167
|
||||
morph,30322
|
||||
movement,30325
|
||||
nibiru,30369
|
||||
okx,30155
|
||||
optimism,30111
|
||||
orderly,30213
|
||||
otherworld_space,30341
|
||||
peaq,30302
|
||||
plume,30370
|
||||
plume,30318
|
||||
polygon,30109
|
||||
polygon_zkevm,30158
|
||||
rari_chain,30235
|
||||
reya,30313
|
||||
rootstock,30333
|
||||
sanko,30278
|
||||
scroll,30214
|
||||
sei,30280
|
||||
shimmer,30230
|
||||
skale,30273
|
||||
solana,30168
|
||||
soneium,30340
|
||||
sonic,30332
|
||||
sophon,30334
|
||||
story,30364
|
||||
subtensor_evm,30374
|
||||
superposition,30327
|
||||
swell,30335
|
||||
ton,30343
|
||||
taiko,30290
|
||||
telosevm,30199
|
||||
tenet,30173
|
||||
tiltyard,30238
|
||||
tron,30420
|
||||
unichain,30320
|
||||
vana,30330
|
||||
viction,30196
|
||||
worldchain,30319
|
||||
x_layer,30274
|
||||
xchain,30291
|
||||
xdc,30365
|
||||
xpla,30216
|
||||
xai,30236
|
||||
zircuit,30303
|
||||
zora,30195
|
||||
inevm,30234
|
||||
opbnb,30202
|
||||
re.al,30237
|
||||
zklink,30301
|
||||
zksync_era,30165
|
||||
chain,eid
|
||||
abstract,30324
|
||||
animechain,30372
|
||||
ape,30312
|
||||
apexfusionnexus,30384
|
||||
aptos,30108
|
||||
arbitrum,30110
|
||||
arbitrum_nova,30175
|
||||
astar,30210
|
||||
astar_zkevm,30257
|
||||
aurora,30211
|
||||
avalanche,30106
|
||||
bahamut,30363
|
||||
base,30184
|
||||
bb1,30234
|
||||
beam,30198
|
||||
berachain,30362
|
||||
bevm,30317
|
||||
bitlayer,30314
|
||||
bl4,30337
|
||||
bl5,30338
|
||||
blast,30243
|
||||
bob,30279
|
||||
botanix,30376
|
||||
bouncebit,30293
|
||||
bsc,30102
|
||||
camp,30381
|
||||
canto,30159
|
||||
celo,30125
|
||||
codex,30323
|
||||
concrete,30366
|
||||
conflux_espace,30212
|
||||
converge,30400
|
||||
coredao,30153
|
||||
corn,30331
|
||||
cronos,30359
|
||||
cronos_zkevm,30360
|
||||
cyber,30283
|
||||
degen,30267
|
||||
dexalot,30118
|
||||
dfk_chain,30115
|
||||
dinari,30385
|
||||
dm2_verse,30315
|
||||
doma,30393
|
||||
dos_chain,30149
|
||||
ebi,30282
|
||||
edu,30328
|
||||
eon,30215
|
||||
ethereal,30391
|
||||
ethereum,30101
|
||||
etherlink,30292
|
||||
fantom,30112
|
||||
flare,30295
|
||||
flow_evm,30336
|
||||
fraxtal,30255
|
||||
fuse,30138
|
||||
gatelayer,30389
|
||||
glue,30342
|
||||
gnosis,30145
|
||||
goat,30361
|
||||
gravity,30294
|
||||
gunz,30371
|
||||
harmony,30116
|
||||
hedera,30316
|
||||
hemi,30329
|
||||
homeverse,30265
|
||||
horizen_eon,30215
|
||||
hubble,30182
|
||||
humanity,30382
|
||||
hyperevm,30367
|
||||
inevm,30234
|
||||
initia,30326
|
||||
injectiveevm,30394
|
||||
ink,30339
|
||||
intain,30152
|
||||
iota,30284
|
||||
islander,30330
|
||||
japan_open_chain,30285
|
||||
kaia,30150
|
||||
katana,30375
|
||||
kava,30177
|
||||
lens,30373
|
||||
lightlink,30309
|
||||
linea,30183
|
||||
lisk,30321
|
||||
loot,30197
|
||||
lyra,30311
|
||||
manta_pacific,30217
|
||||
mantle,30181
|
||||
masa,30263
|
||||
merlin,30266
|
||||
meter,30176
|
||||
metis,30151
|
||||
mode,30260
|
||||
monad,30390
|
||||
moonbeam,30126
|
||||
moonriver,30167
|
||||
morph,30322
|
||||
movement,30325
|
||||
mp1,30331
|
||||
nexera,30395
|
||||
nibiru,30369
|
||||
nova,30175
|
||||
og,30388
|
||||
okx,30155
|
||||
opbnb,30202
|
||||
openledger,30392
|
||||
optimism,30111
|
||||
orderly,30213
|
||||
otherworld_space,30341
|
||||
peaq,30302
|
||||
pgn,30218
|
||||
plasma,30383
|
||||
plume,30318
|
||||
plumephoenix,30370
|
||||
polygon,30109
|
||||
polygon_zkevm,30158
|
||||
rari_chain,30235
|
||||
rarible,30235
|
||||
real,30237
|
||||
reya,30313
|
||||
rootstock,30333
|
||||
sanko,30278
|
||||
scroll,30214
|
||||
sei,30280
|
||||
shimmer,30230
|
||||
shrapnel,30148
|
||||
silicon,30379
|
||||
skale,30273
|
||||
solana,30168
|
||||
somnia,30380
|
||||
soneium,30340
|
||||
sonic,30332
|
||||
sophon,30334
|
||||
space,30341
|
||||
stable,30396
|
||||
story,30364
|
||||
subtensor_evm,30374
|
||||
sui,30378
|
||||
superposition,30327
|
||||
swell,30335
|
||||
swimmer,30114
|
||||
tac,30377
|
||||
taiko,30290
|
||||
telosevm,30199
|
||||
tenet,30173
|
||||
tiltyard,30238
|
||||
tomo,30196
|
||||
ton,30343
|
||||
tron,30420
|
||||
unichain,30320
|
||||
vana,30330
|
||||
viction,30196
|
||||
worldchain,30319
|
||||
x_layer,30274
|
||||
xai,30236
|
||||
xchain,30291
|
||||
xdc,30365
|
||||
xlayer,30274
|
||||
xpla,30216
|
||||
zircuit,30303
|
||||
zkatana,30257
|
||||
zkevm,30158
|
||||
zklink,30301
|
||||
zksync,30165
|
||||
zksync_era,30165
|
||||
zkverify,30386
|
||||
zora,30195
|
||||
|
||||
|
@ -32,4 +32,7 @@ core,USDC,1,S*USDC,0xa4151b2b3e269645181dccf2d426ce75fcbdeca9,0x2f6f07cdcf358894
|
||||
core,USDT,2,S*USDT,0x900101d06a7426441ae63e9ab3b9b0f63be145f1,0x45f1a95a4d3f3836523f5c83673c797f4d4d263b
|
||||
gnosis,USDC,1,S*USDC,0x2a22f9c3b484c3629090feed35f17ff8f88f76f0,0xb1eead6959cb5bb9b20417d6689922523b2b86c3
|
||||
gnosis,ETH,13,S*ETH,0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1,0xe9aba835f813ca05e50a6c0ce65d0d74390f7de7
|
||||
ink,USDC,1,S*USDC,0xf1815bd50389c46847f0bda824ec8da914045d14,0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590
|
||||
ink,USDC,1,S*USDC,0xf1815bd50389c46847f0bda824ec8da914045d14,0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590
|
||||
somnia,USDC.e,1,S*USDC.e,0x28bec7e30e6faee657a03e19bf1128aad7632a00,0xcb97465bc1bff20fb788ccf29b409513789b6eae
|
||||
somnia,USDT,2,S*USDT,0x67b302e35aef5eee8c32d934f5856869ef428330,0xafe47bac47f2d9cdc0254a487c7b51ccb6c2b065
|
||||
somnia,WETH,13,S*WETH,0x936ab8c674bcb567cd5deb85d8a216494704e9d8,0xfb9e0b64bf68b2e1e478838b8722eace2ad5cd02
|
||||
|
@ -20,7 +20,7 @@
|
||||
github_actions.workflow_dispatches(
|
||||
'FlipsideCrypto',
|
||||
'{{ vars.GLOBAL_PROJECT_NAME.lower() }}' || '-models',
|
||||
'dbt_run_streamline_decoded_logs_history.yml',
|
||||
'dbt_run_streamline_decoder_history.yml',
|
||||
NULL
|
||||
)
|
||||
{% endset %}
|
||||
|
||||
@ -19,7 +19,48 @@
|
||||
'MAIN_GHA_SCHEDULED_SCORES_CRON': '25 5 * * *',
|
||||
'DECODER_SL_CONTRACT_ABIS_REALTIME_PRODUCER_BATCH_SIZE': 50,
|
||||
'DECODER_SL_CONTRACT_ABIS_REALTIME_WORKER_BATCH_SIZE': 50,
|
||||
'MAIN_OBSERV_EXCLUSION_LIST_ENABLED': true
|
||||
'MAIN_OBSERV_EXCLUSION_LIST_ENABLED': true,
|
||||
'CURATED_DEFI_DEX_SWAPS_RECENCY_EXCLUSION_LIST': ['uniswap-v3','sushiswap-v1','sushiswap-v2'],
|
||||
'CURATED_DEFI_DEX_LP_ACTIONS_RECENCY_EXCLUSION_LIST': ['uniswap-v3','sushiswap-v1','sushiswap-v2'],
|
||||
'CURATED_DEFI_BRIDGE_RECENCY_EXCLUSION_LIST': ['celer_cbridge-v1','symbiosis-v1','synapse-v1','l2_standard_bridge-v1'],
|
||||
'CURATED_DEFI_DEX_SWAPS_CONTRACT_MAPPING': {
|
||||
'uniswap': {
|
||||
'v3': {
|
||||
'uni_v3_pool_created': '0xffcd7aed9c627e82a765c3247d562239507f6f1b'
|
||||
}
|
||||
},
|
||||
'sushiswap': {
|
||||
'v1': {
|
||||
'uni_v2_pair_created': '0xc35dadb65012ec5796536bd9864ed8773abc74c4'
|
||||
},
|
||||
'v2': {
|
||||
'uni_v3_pool_created': '0x0be808376ecb75a5cf9bb6d237d16cd37893d904'
|
||||
}
|
||||
}
|
||||
},
|
||||
'CURATED_DEFI_BRIDGE_CONTRACT_MAPPING': {
|
||||
'celer_cbridge': {
|
||||
'v1': {
|
||||
'bridge': '0x841ce48f9446c8e281d3f1444cb859b4a6d0738c'
|
||||
}
|
||||
},
|
||||
'l2_standard_bridge': {
|
||||
'v1': {
|
||||
'bridge': '0x4200000000000000000000000000000000000010'
|
||||
}
|
||||
},
|
||||
'symbiosis': {
|
||||
'v1': {
|
||||
'bridge': '0xb8f275fbf7a959f4bce59999a2ef122a099e81a8'
|
||||
}
|
||||
},
|
||||
'synapse': {
|
||||
'v1': {
|
||||
'token_bridge': '0x432036208d2717394d2614d6697c46df3ed69540',
|
||||
'token_bridge_swap': '0x432036208d2717394d2614d6697c46df3ed69540'
|
||||
}
|
||||
}
|
||||
}
|
||||
} %}
|
||||
|
||||
{{ return(vars) }}
|
||||
|
||||
@ -38,7 +38,39 @@
|
||||
'DECODER_SILVER_CONTRACT_ABIS_EXPLORER_NAME': 'somnia',
|
||||
'DECODER_SL_CONTRACT_ABIS_EXPLORER_URL': 'https://mainnet.somnia.w3us.site/api/v2/smart-contracts/',
|
||||
'MAIN_GHA_STREAMLINE_CHAINHEAD_CRON': '9,39 * * * *',
|
||||
'MAIN_GHA_SCHEDULED_SCORES_CRON': '50 5 * * *'
|
||||
'MAIN_GHA_SCHEDULED_SCORES_CRON': '50 5 * * *',
|
||||
'CURATED_DEFI_DEX_SWAPS_CONTRACT_MAPPING': {
|
||||
'quickswap': {
|
||||
'v4': {
|
||||
'pool': '0x0ccff3d02a3a200263ec4e0fdb5e60a56721b8ae'
|
||||
}
|
||||
},
|
||||
'somnex': {
|
||||
'v2': {
|
||||
'uni_v2_pair_created': '0xafd71143fb155058e96527b07695d93223747ed1'
|
||||
},
|
||||
'v3': {
|
||||
'uni_v3_pool_created': '0xdd594374a0fa18cd074ed61288f392ed1ccbaffd'
|
||||
}
|
||||
},
|
||||
'somnia_exchange': {
|
||||
'v2': {
|
||||
'uni_v2_pair_created': '0x6c4853c97b981aa848c2b56f160a73a46b5dccd4'
|
||||
}
|
||||
}
|
||||
},
|
||||
'CURATED_DEFI_BRIDGE_CONTRACT_MAPPING': {
|
||||
'layerzero': {
|
||||
'v2': {
|
||||
'bridge': '0x6f475642a6e85809b1c36fa62763669b1b48dd5b'
|
||||
}
|
||||
},
|
||||
'stargate': {
|
||||
'v2': {
|
||||
'bridge': '0x78add880a697070c1e765ac44d65323a0dcce913'
|
||||
}
|
||||
}
|
||||
}
|
||||
} %}
|
||||
|
||||
{{ return(vars) }}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
|
||||
{# Set up dbt configuration #}
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['gold','chain_stats','curated','phase_4']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
crosschain.chain_stats.ez_{{ vars.GLOBAL_PROJECT_NAME }}_address_metrics
|
||||
@ -0,0 +1,55 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_address_metrics
|
||||
description: '{{ doc("ez_address_metrics_table_doc") }}'
|
||||
columns:
|
||||
- name: address
|
||||
description: '{{ doc("ez_address_metrics_address") }}'
|
||||
- name: n_complex_txn
|
||||
description: '{{ doc("ez_address_metrics_n_complex_txn") }}'
|
||||
- name: n_contracts
|
||||
description: '{{ doc("ez_address_metrics_n_contracts") }}'
|
||||
- name: n_days_active
|
||||
description: '{{ doc("ez_address_metrics_n_days_active") }}'
|
||||
- name: n_txn
|
||||
description: '{{ doc("ez_address_metrics_n_txn") }}'
|
||||
- name: n_bridge_in
|
||||
description: '{{ doc("ez_address_metrics_n_bridge_in") }}'
|
||||
- name: n_bridges
|
||||
description: '{{ doc("ez_address_metrics_n_bridges") }}'
|
||||
- name: n_cex_withdrawals
|
||||
description: '{{ doc("ez_address_metrics_n_cex_withdrawals") }}'
|
||||
- name: net_token_accumulate
|
||||
description: '{{ doc("ez_address_metrics_net_token_accumulate") }}'
|
||||
- name: n_other_defi
|
||||
description: '{{ doc("ez_address_metrics_n_other_defi") }}'
|
||||
- name: n_lp_adds
|
||||
description: '{{ doc("ez_address_metrics_n_lp_adds") }}'
|
||||
- name: n_lp_pools
|
||||
description: '{{ doc("ez_address_metrics_n_lp_pools") }}'
|
||||
- name: n_swap_tx
|
||||
description: '{{ doc("ez_address_metrics_n_swap_tx") }}'
|
||||
- name: n_swaps
|
||||
description: '{{ doc("ez_address_metrics_n_swaps") }}'
|
||||
- name: n_tokens_traded
|
||||
description: '{{ doc("ez_address_metrics_n_tokens_traded") }}'
|
||||
- name: n_nft_collections
|
||||
description: '{{ doc("ez_address_metrics_n_nft_collections") }}'
|
||||
- name: n_nft_mints
|
||||
description: '{{ doc("ez_address_metrics_n_nft_mints") }}'
|
||||
- name: n_nft_buys
|
||||
description: '{{ doc("ez_address_metrics_n_nft_buys") }}'
|
||||
- name: n_nft_ids
|
||||
description: '{{ doc("ez_address_metrics_n_nft_ids") }}'
|
||||
- name: n_nft_lists
|
||||
description: '{{ doc("ez_address_metrics_n_nft_lists") }}'
|
||||
- name: n_votes
|
||||
description: '{{ doc("ez_address_metrics_n_votes") }}'
|
||||
- name: n_stake_tx
|
||||
description: '{{ doc("ez_address_metrics_n_stake_tx") }}'
|
||||
- name: n_restakes
|
||||
description: '{{ doc("ez_address_metrics_n_restakes") }}'
|
||||
- name: n_validators
|
||||
description: '{{ doc("ez_address_metrics_n_validators") }}'
|
||||
- name: net_stake_accumulate
|
||||
description: '{{ doc("ez_address_metrics_net_stake_accumulate") }}'
|
||||
@ -0,0 +1,16 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
|
||||
{# Set up dbt configuration #}
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['gold','chain_stats','curated','phase_4']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
crosschain.chain_stats.ez_{{ vars.GLOBAL_PROJECT_NAME }}_allowlist
|
||||
@ -0,0 +1,11 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_allowlist
|
||||
description: '{{ doc("ez_allowlist_table_doc") }}'
|
||||
columns:
|
||||
- name: blockchain
|
||||
description: '{{ doc("ez_allowlist_blockchain") }}'
|
||||
- name: symbol
|
||||
description: '{{ doc("ez_allowlist_symbol") }}'
|
||||
- name: tracks_asset
|
||||
description: '{{ doc("ez_allowlist_tracks_asset") }}'
|
||||
@ -0,0 +1,16 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
|
||||
{# Set up dbt configuration #}
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['gold','chain_stats','curated','phase_4']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
crosschain.chain_stats.ez_{{ vars.GLOBAL_PROJECT_NAME }}_metrics_daily
|
||||
@ -0,0 +1,73 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_metrics_daily
|
||||
description: '{{ doc("ez_metrics_daily_table_doc") }}'
|
||||
columns:
|
||||
- name: day_
|
||||
description: '{{ doc("ez_metrics_daily_day_") }}'
|
||||
- name: active_users_count
|
||||
description: '{{ doc("ez_metrics_daily_active_users_count") }}'
|
||||
- name: active_quality_users_count
|
||||
description: '{{ doc("ez_metrics_daily_active_quality_users_count") }}'
|
||||
- name: transaction_count
|
||||
description: '{{ doc("ez_metrics_daily_transaction_count") }}'
|
||||
- name: quality_transaction_count
|
||||
description: '{{ doc("ez_metrics_daily_quality_transaction_count") }}'
|
||||
- name: total_fees
|
||||
description: '{{ doc("ez_metrics_daily_total_fees") }}'
|
||||
- name: total_fees_usd
|
||||
description: '{{ doc("ez_metrics_daily_total_fees_usd") }}'
|
||||
- name: quality_total_fees
|
||||
description: '{{ doc("ez_metrics_daily_quality_total_fees") }}'
|
||||
- name: quality_total_fees_usd
|
||||
description: '{{ doc("ez_metrics_daily_quality_total_fees_usd") }}'
|
||||
- name: stablecoin_transfer_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_stablecoin_transfer_volume_usd") }}'
|
||||
- name: in_unit_total_transfer_volume
|
||||
description: '{{ doc("ez_metrics_daily_in_unit_total_transfer_volume") }}'
|
||||
- name: total_transfer_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_total_transfer_volume_usd") }}'
|
||||
- name: in_unit_quality_total_transfer_volume
|
||||
description: '{{ doc("ez_metrics_daily_in_unit_quality_total_transfer_volume") }}'
|
||||
- name: quality_total_transfer_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_quality_total_transfer_volume_usd") }}'
|
||||
- name: cex_withdrawal_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_cex_withdrawal_volume_usd") }}'
|
||||
- name: cex_withdrawal_tx_count
|
||||
description: '{{ doc("ez_metrics_daily_cex_withdrawal_tx_count") }}'
|
||||
- name: cex_unique_withdrawing_addresses
|
||||
description: '{{ doc("ez_metrics_daily_cex_unique_withdrawing_addresses") }}'
|
||||
- name: cex_deposit_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_cex_deposit_volume_usd") }}'
|
||||
- name: cex_deposit_tx_count
|
||||
description: '{{ doc("ez_metrics_daily_cex_deposit_tx_count") }}'
|
||||
- name: cex_unique_depositing_addresses
|
||||
description: '{{ doc("ez_metrics_daily_cex_unique_depositing_addresses") }}'
|
||||
- name: cex_net_flow_usd
|
||||
description: '{{ doc("ez_metrics_daily_cex_net_flow_usd") }}'
|
||||
- name: chain_gross_dex_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_chain_gross_dex_volume_usd") }}'
|
||||
- name: chain_swap_count
|
||||
description: '{{ doc("ez_metrics_daily_chain_swap_count") }}'
|
||||
- name: chain_swapper_count
|
||||
description: '{{ doc("ez_metrics_daily_chain_swapper_count") }}'
|
||||
- name: tvl_usd
|
||||
description: '{{ doc("ez_metrics_daily_tvl_usd") }}'
|
||||
- name: in_unit_tvl
|
||||
description: '{{ doc("ez_metrics_daily_in_unit_tvl") }}'
|
||||
- name: bridge_inbound_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_bridge_inbound_volume_usd") }}'
|
||||
- name: bridge_inbound_addresses
|
||||
description: '{{ doc("ez_metrics_daily_bridge_inbound_addresses") }}'
|
||||
- name: bridge_inbound_tx_count
|
||||
description: '{{ doc("ez_metrics_daily_bridge_inbound_tx_count") }}'
|
||||
- name: bridge_outbound_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_bridge_outbound_volume_usd") }}'
|
||||
- name: bridge_outbound_addresses
|
||||
description: '{{ doc("ez_metrics_daily_bridge_outbound_addresses") }}'
|
||||
- name: bridge_outbound_tx_count
|
||||
description: '{{ doc("ez_metrics_daily_bridge_outbound_tx_count") }}'
|
||||
- name: bridge_gross_volume_usd
|
||||
description: '{{ doc("ez_metrics_daily_bridge_gross_volume_usd") }}'
|
||||
- name: bridge_net_inbound_usd
|
||||
description: '{{ doc("ez_metrics_daily_bridge_net_inbound_usd") }}'
|
||||
@ -0,0 +1,16 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
|
||||
{# Set up dbt configuration #}
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['gold','chain_stats','curated','phase_4']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
crosschain.chain_stats.ez_{{ vars.GLOBAL_PROJECT_NAME }}_protocol_metrics
|
||||
@ -0,0 +1,33 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: chain_stats__ez_protocol_metrics
|
||||
description: '{{ doc("ez_protocol_metrics_table_doc") }}'
|
||||
columns:
|
||||
- name: day_
|
||||
description: '{{ doc("ez_protocol_metrics_day_") }}'
|
||||
- name: protocol
|
||||
description: '{{ doc("ez_protocol_metrics_protocol") }}'
|
||||
- name: n_users
|
||||
description: '{{ doc("ez_protocol_metrics_n_users") }}'
|
||||
- name: n_quality_users
|
||||
description: '{{ doc("ez_protocol_metrics_n_quality_users") }}'
|
||||
- name: n_transactions
|
||||
description: '{{ doc("ez_protocol_metrics_n_transactions") }}'
|
||||
- name: n_quality_transactions
|
||||
description: '{{ doc("ez_protocol_metrics_n_quality_transactions") }}'
|
||||
- name: usd_inflows
|
||||
description: '{{ doc("ez_protocol_metrics_usd_inflows") }}'
|
||||
- name: usd_outflows
|
||||
description: '{{ doc("ez_protocol_metrics_usd_outflows") }}'
|
||||
- name: net_usd_inflow
|
||||
description: '{{ doc("ez_protocol_metrics_net_usd_inflow") }}'
|
||||
- name: gross_usd_volume
|
||||
description: '{{ doc("ez_protocol_metrics_gross_usd_volume") }}'
|
||||
- name: quality_usd_inflows
|
||||
description: '{{ doc("ez_protocol_metrics_quality_usd_inflows") }}'
|
||||
- name: quality_usd_outflows
|
||||
description: '{{ doc("ez_protocol_metrics_quality_usd_outflows") }}'
|
||||
- name: quality_net_usd
|
||||
description: '{{ doc("ez_protocol_metrics_quality_net_usd") }}'
|
||||
- name: quality_gross_usd
|
||||
description: '{{ doc("ez_protocol_metrics_quality_gross_usd") }}'
|
||||
@ -34,6 +34,13 @@ layerzero AS (
|
||||
guid,
|
||||
message_type,
|
||||
'0x' || SUBSTR(SUBSTR(payload, 227, 64), 25) AS to_address,
|
||||
executor_address,
|
||||
executor_fee,
|
||||
dvn_contract_address,
|
||||
dvn_fees,
|
||||
optional_dvns,
|
||||
required_dvns,
|
||||
total_dvn_fees,
|
||||
protocol,
|
||||
version,
|
||||
type,
|
||||
@ -90,6 +97,9 @@ oft_raw AS (
|
||||
utils.udf_hex_to_int(
|
||||
part [1] :: STRING
|
||||
) :: INT AS amount_sent,
|
||||
utils.udf_hex_to_int(
|
||||
part [2] :: STRING
|
||||
) :: INT AS amount_received,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
origin_function_signature,
|
||||
@ -133,6 +143,8 @@ SELECT
|
||||
dst_chain AS destination_chain,
|
||||
coalesce(token_address, contract_address) AS token_address,
|
||||
amount_sent AS amount_unadj,
|
||||
amount_sent AS amount_sent,
|
||||
amount_received AS amount_received,
|
||||
src_chain_id,
|
||||
src_chain,
|
||||
payload,
|
||||
@ -141,6 +153,13 @@ SELECT
|
||||
sender_contract_address,
|
||||
receiver_contract_address,
|
||||
message_type,
|
||||
executor_address,
|
||||
executor_fee,
|
||||
dvn_contract_address,
|
||||
dvn_fees,
|
||||
optional_dvns,
|
||||
required_dvns,
|
||||
total_dvn_fees,
|
||||
l.protocol,
|
||||
l.version,
|
||||
l.type,
|
||||
|
||||
@ -84,12 +84,58 @@ AND modified_timestamp >= (
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
dvn_fees as (
|
||||
|
||||
SELECT
|
||||
tx_hash,
|
||||
event_index,
|
||||
contract_address as dvn_contract_address,
|
||||
decoded_log:fees as dvn_fees,
|
||||
decoded_log:optionalDVNs as optional_dvns,
|
||||
decoded_log:requiredDVNs as required_dvns,
|
||||
reduce(decoded_log:fees, 0, (acc, x) -> acc + x::number) as total_dvn_fees
|
||||
FROM
|
||||
{{ ref('core__ez_decoded_event_logs') }}
|
||||
WHERE
|
||||
event_name = 'DVNFeePaid'
|
||||
and tx_hash in (select tx_hash from raw)
|
||||
{% if is_incremental() %}
|
||||
AND modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(modified_timestamp) - INTERVAL '{{ vars.CURATED_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
executor_fees as (
|
||||
|
||||
SELECT
|
||||
tx_hash,
|
||||
event_index,
|
||||
contract_address as executor_contract_address,
|
||||
decoded_log: "executor" :: STRING AS executor_address,
|
||||
TRY_TO_NUMBER(decoded_log: "fee" :: STRING) AS executor_fee
|
||||
FROM
|
||||
{{ ref('core__ez_decoded_event_logs') }}
|
||||
WHERE
|
||||
event_name = 'ExecutorFeePaid'
|
||||
and tx_hash in (select tx_hash from raw)
|
||||
{% if is_incremental() %}
|
||||
AND modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(modified_timestamp) - INTERVAL '{{ vars.CURATED_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
)
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
raw.tx_hash,
|
||||
raw.event_index,
|
||||
payload,
|
||||
tx_type,
|
||||
nonce,
|
||||
@ -105,6 +151,13 @@ SELECT
|
||||
receiver_contract_address,
|
||||
guid,
|
||||
message_type,
|
||||
executor_address,
|
||||
executor_fee,
|
||||
dvn_contract_address,
|
||||
dvn_fees,
|
||||
optional_dvns,
|
||||
required_dvns,
|
||||
total_dvn_fees,
|
||||
protocol,
|
||||
version,
|
||||
type,
|
||||
@ -119,3 +172,9 @@ FROM
|
||||
LEFT JOIN {{ ref('silver_bridge__layerzero_v2_bridge_seed') }}
|
||||
c2
|
||||
ON dst_chain_id = c2.eid
|
||||
LEFT JOIN executor_fees ef
|
||||
ON raw.tx_hash = ef.tx_hash
|
||||
AND raw.event_index = ef.event_index + 2
|
||||
LEFT JOIN dvn_fees df
|
||||
ON raw.tx_hash = df.tx_hash
|
||||
AND raw.event_index = df.event_index + 1
|
||||
|
||||
@ -122,6 +122,7 @@ bus_driven AS (
|
||||
from_address,
|
||||
dst_receiver_address,
|
||||
b.amount_sent,
|
||||
b.fare,
|
||||
r.origin_from_address,
|
||||
r.origin_to_address,
|
||||
r.origin_function_signature,
|
||||
@ -195,6 +196,7 @@ SELECT
|
||||
from_address,
|
||||
dst_receiver_address,
|
||||
amount_sent,
|
||||
fare,
|
||||
payload,
|
||||
tx_type,
|
||||
nonce,
|
||||
|
||||
@ -117,6 +117,9 @@ bus_raw AS (
|
||||
utils.udf_hex_to_int(
|
||||
part [1] :: STRING
|
||||
) :: INT AS ticket_id,
|
||||
utils.udf_hex_to_int(
|
||||
part [2] :: STRING
|
||||
) :: INT AS fare,
|
||||
regexp_substr_all(SUBSTR(DATA, 195), '.{64}') AS passenger_raw,
|
||||
utils.udf_hex_to_int(
|
||||
passenger_raw [1] :: STRING
|
||||
@ -162,6 +165,7 @@ SELECT
|
||||
amount_sent,
|
||||
bus_dst_id,
|
||||
ticket_id,
|
||||
fare,
|
||||
asset_id,
|
||||
A.asset AS asset_name,
|
||||
A.address AS asset_address,
|
||||
|
||||
@ -40,6 +40,13 @@ layerzero AS (
|
||||
4
|
||||
) AS message_type_2,
|
||||
'0x' || SUBSTR(SUBSTR(payload, 233, 64), 25) AS to_address,
|
||||
executor_address,
|
||||
executor_fee,
|
||||
dvn_contract_address,
|
||||
dvn_fees,
|
||||
optional_dvns,
|
||||
required_dvns,
|
||||
total_dvn_fees,
|
||||
m.protocol,
|
||||
m.version,
|
||||
m.type,
|
||||
@ -90,6 +97,9 @@ oft_raw AS (
|
||||
utils.udf_hex_to_int(
|
||||
part [1] :: STRING
|
||||
) :: INT AS amount_sent,
|
||||
utils.udf_hex_to_int(
|
||||
part [2] :: STRING
|
||||
) :: INT AS amount_received,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
origin_function_signature,
|
||||
@ -133,6 +143,7 @@ SELECT
|
||||
dst_chain,
|
||||
dst_chain_id_oft,
|
||||
amount_sent,
|
||||
amount_received,
|
||||
payload,
|
||||
tx_type,
|
||||
nonce,
|
||||
@ -140,6 +151,13 @@ SELECT
|
||||
receiver_contract_address,
|
||||
message_type,
|
||||
message_type_2,
|
||||
executor_address,
|
||||
executor_fee,
|
||||
dvn_contract_address,
|
||||
dvn_fees,
|
||||
optional_dvns,
|
||||
required_dvns,
|
||||
total_dvn_fees,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
origin_function_signature,
|
||||
|
||||
@ -0,0 +1,240 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
tags = ['silver_dex','defi','dex','lp_actions','curated']
|
||||
) }}
|
||||
|
||||
WITH evt AS (
|
||||
|
||||
SELECT
|
||||
l.block_number,
|
||||
l.block_timestamp,
|
||||
l.tx_hash,
|
||||
l.event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
l.contract_address AS pool_address,
|
||||
token0_address AS token0,
|
||||
token1_address AS token1,
|
||||
topic_0,
|
||||
topic_1,
|
||||
topic_2,
|
||||
topic_3,
|
||||
DATA,
|
||||
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS segmented_data,
|
||||
p.protocol,
|
||||
p.version,
|
||||
p.type,
|
||||
CONCAT(
|
||||
p.protocol,
|
||||
'-',
|
||||
p.version
|
||||
) AS platform,
|
||||
CONCAT(
|
||||
l.tx_hash :: STRING,
|
||||
'-',
|
||||
l.event_index :: STRING
|
||||
) AS _log_id,
|
||||
l.modified_timestamp
|
||||
FROM
|
||||
{{ ref('core__fact_event_logs') }}
|
||||
l
|
||||
INNER JOIN {{ ref('silver_dex__quickswap_v4_pools') }}
|
||||
p
|
||||
ON l.contract_address = p.pool_address
|
||||
WHERE
|
||||
topic_0 IN (
|
||||
'0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde',
|
||||
--mint
|
||||
'0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c' --burn
|
||||
)
|
||||
AND tx_succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND l.modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(modified_timestamp) - INTERVAL '{{ vars.CURATED_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
AND l.modified_timestamp >= SYSDATE() - INTERVAL '{{ vars.CURATED_LOOKBACK_DAYS }}'
|
||||
{% endif %}
|
||||
),
|
||||
mint AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
'Mint' AS event_name,
|
||||
pool_address,
|
||||
token0,
|
||||
token1,
|
||||
CONCAT('0x', SUBSTR(topic_1, 27, 40)) AS owner_address,
|
||||
utils.udf_hex_to_int(
|
||||
topic_2
|
||||
) :: FLOAT AS bottom_tick,
|
||||
utils.udf_hex_to_int(
|
||||
topic_3
|
||||
) :: FLOAT AS top_tick,
|
||||
CONCAT('0x', SUBSTR(segmented_data [0] :: STRING, 25, 40)) AS sender_address,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [1] :: STRING
|
||||
) :: FLOAT AS liquidity_amount,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [2] :: STRING
|
||||
) :: FLOAT AS amount0,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [3] :: STRING
|
||||
) :: FLOAT AS amount1,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
platform,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
evt
|
||||
WHERE
|
||||
topic_0 = '0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde' --mint
|
||||
),
|
||||
burn AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
'Burn' AS event_name,
|
||||
pool_address,
|
||||
token0,
|
||||
token1,
|
||||
CONCAT('0x', SUBSTR(topic_1, 27, 40)) AS owner_address,
|
||||
utils.udf_hex_to_int(
|
||||
topic_2
|
||||
) :: FLOAT AS bottom_tick,
|
||||
utils.udf_hex_to_int(
|
||||
topic_3
|
||||
) :: FLOAT AS top_tick,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [0] :: STRING
|
||||
) :: FLOAT AS liquidity_amount,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [1] :: STRING
|
||||
) :: FLOAT AS amount0,
|
||||
utils.udf_hex_to_int(
|
||||
segmented_data [2] :: STRING
|
||||
) :: FLOAT AS amount1,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
platform,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
evt
|
||||
WHERE
|
||||
topic_0 = '0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c' --burn
|
||||
),
|
||||
all_actions AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
event_name,
|
||||
pool_address,
|
||||
bottom_tick AS tick_lower,
|
||||
top_tick AS tick_upper,
|
||||
token0,
|
||||
token1,
|
||||
owner_address,
|
||||
sender_address AS sender,
|
||||
owner_address AS receiver,
|
||||
liquidity_amount AS liquidity_amount_unadj,
|
||||
amount0 AS amount0_unadj,
|
||||
amount1 AS amount1_unadj,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
platform,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
mint
|
||||
UNION ALL
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
event_name,
|
||||
pool_address,
|
||||
bottom_tick AS tick_lower,
|
||||
top_tick AS tick_upper,
|
||||
token0,
|
||||
token1,
|
||||
owner_address,
|
||||
owner_address AS sender,
|
||||
origin_from_address AS receiver,
|
||||
liquidity_amount AS liquidity_amount_unadj,
|
||||
amount0 AS amount0_unadj,
|
||||
amount1 AS amount1_unadj,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
platform,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
burn
|
||||
)
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
event_name,
|
||||
pool_address,
|
||||
tick_lower,
|
||||
tick_upper,
|
||||
token0,
|
||||
token1,
|
||||
origin_from_address AS liquidity_provider,
|
||||
owner_address,
|
||||
sender,
|
||||
receiver,
|
||||
liquidity_amount_unadj,
|
||||
amount0_unadj,
|
||||
amount1_unadj,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
platform,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
all_actions qualify(ROW_NUMBER() over (PARTITION BY _log_id
|
||||
ORDER BY
|
||||
modified_timestamp DESC)) = 1
|
||||
@ -0,0 +1,84 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'pool_address',
|
||||
tags = ['silver_dex','defi','dex','curated']
|
||||
) }}
|
||||
|
||||
WITH contract_mapping AS (
|
||||
{{ curated_contract_mapping(
|
||||
vars.CURATED_DEFI_DEX_SWAPS_CONTRACT_MAPPING
|
||||
) }}
|
||||
WHERE
|
||||
protocol = 'quickswap'
|
||||
AND version = 'v4'
|
||||
),
|
||||
pools AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
l.contract_address,
|
||||
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS segmented_data,
|
||||
LOWER(CONCAT('0x', SUBSTR(topics [1] :: STRING, 27, 40))) AS token0_address,
|
||||
LOWER(CONCAT('0x', SUBSTR(topics [2] :: STRING, 27, 40))) AS token1_address,
|
||||
CONCAT('0x', SUBSTR(segmented_data [0] :: STRING, 25, 40)) AS pool_address,
|
||||
m.protocol,
|
||||
m.version,
|
||||
m.type,
|
||||
CONCAT(
|
||||
m.protocol,
|
||||
'-',
|
||||
m.version
|
||||
) AS platform,
|
||||
'Pool' AS event_name,
|
||||
CONCAT(
|
||||
tx_hash :: STRING,
|
||||
'-',
|
||||
event_index :: STRING
|
||||
) AS _log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
{{ ref('core__fact_event_logs') }}
|
||||
l
|
||||
INNER JOIN contract_mapping m
|
||||
ON l.contract_address = m.contract_address
|
||||
WHERE
|
||||
topics [0] = '0x91ccaa7a278130b65168c3a0c8d3bcae84cf5e43704342bd3ec0b59e59c036db' --Pool
|
||||
AND tx_succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(modified_timestamp) - INTERVAL '{{ vars.CURATED_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
AND modified_timestamp >= SYSDATE() - INTERVAL '{{ vars.CURATED_LOOKBACK_DAYS }}'
|
||||
{% endif %}
|
||||
)
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
contract_address,
|
||||
event_index,
|
||||
event_name,
|
||||
token0_address,
|
||||
token1_address,
|
||||
pool_address,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
pools qualify(ROW_NUMBER() over (PARTITION BY pool_address
|
||||
ORDER BY
|
||||
modified_timestamp DESC)) = 1
|
||||
@ -0,0 +1,125 @@
|
||||
{# Get variables #}
|
||||
{% set vars = return_vars() %}
|
||||
{# Log configuration details #}
|
||||
{{ log_model_details() }}
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
tags = ['silver_dex','defi','dex','curated']
|
||||
) }}
|
||||
|
||||
WITH swaps AS (
|
||||
|
||||
SELECT
|
||||
l.block_number,
|
||||
l.block_timestamp,
|
||||
l.tx_hash,
|
||||
l.event_index,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
l.contract_address,
|
||||
regexp_substr_all(SUBSTR(DATA, 3, len(DATA)), '.{64}') AS segmented_data,
|
||||
CONCAT('0x', SUBSTR(topics [1] :: STRING, 27, 40)) AS sender,
|
||||
CONCAT('0x', SUBSTR(topics [2] :: STRING, 27, 40)) AS recipient,
|
||||
utils.udf_hex_to_int(
|
||||
's2c',
|
||||
segmented_data [0] :: STRING
|
||||
) :: FLOAT AS amount0_unadj,
|
||||
utils.udf_hex_to_int(
|
||||
's2c',
|
||||
segmented_data [1] :: STRING
|
||||
) :: FLOAT AS amount1_unadj,
|
||||
utils.udf_hex_to_int(
|
||||
's2c',
|
||||
segmented_data [2] :: STRING
|
||||
) :: FLOAT AS sqrtPriceX96,
|
||||
utils.udf_hex_to_int(
|
||||
's2c',
|
||||
segmented_data [3] :: STRING
|
||||
) :: FLOAT AS liquidity,
|
||||
utils.udf_hex_to_int(
|
||||
's2c',
|
||||
segmented_data [4] :: STRING
|
||||
) :: FLOAT AS tick,
|
||||
token0_address,
|
||||
token1_address,
|
||||
pool_address,
|
||||
p.platform,
|
||||
p.protocol,
|
||||
p.version,
|
||||
p.type,
|
||||
'Swap' AS event_name,
|
||||
CONCAT(
|
||||
l.tx_hash :: STRING,
|
||||
'-',
|
||||
l.event_index :: STRING
|
||||
) AS _log_id,
|
||||
l.modified_timestamp
|
||||
FROM
|
||||
{{ ref('core__fact_event_logs') }}
|
||||
l
|
||||
INNER JOIN {{ ref('silver_dex__quickswap_v4_pools') }}
|
||||
p
|
||||
ON p.pool_address = l.contract_address
|
||||
WHERE
|
||||
topics [0] :: STRING = '0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67' --Swap
|
||||
AND tx_succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND l.modified_timestamp >= (
|
||||
SELECT
|
||||
MAX(modified_timestamp) - INTERVAL '{{ vars.CURATED_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
AND l.modified_timestamp >= SYSDATE() - INTERVAL '{{ vars.CURATED_LOOKBACK_DAYS }}'
|
||||
{% endif %}
|
||||
)
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
event_name,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
pool_address,
|
||||
recipient,
|
||||
sender,
|
||||
tick,
|
||||
liquidity,
|
||||
token0_address,
|
||||
token1_address,
|
||||
amount0_unadj,
|
||||
amount1_unadj,
|
||||
CASE
|
||||
WHEN amount0_unadj > 0 THEN ABS(amount0_unadj)
|
||||
ELSE ABS(amount1_unadj)
|
||||
END AS amount_in_unadj,
|
||||
CASE
|
||||
WHEN amount0_unadj < 0 THEN ABS(amount0_unadj)
|
||||
ELSE ABS(amount1_unadj)
|
||||
END AS amount_out_unadj,
|
||||
CASE
|
||||
WHEN amount0_unadj > 0 THEN token0_address
|
||||
ELSE token1_address
|
||||
END AS token_in,
|
||||
CASE
|
||||
WHEN amount0_unadj < 0 THEN token0_address
|
||||
ELSE token1_address
|
||||
END AS token_out,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
_log_id,
|
||||
modified_timestamp
|
||||
FROM
|
||||
swaps qualify(ROW_NUMBER() over(PARTITION BY _log_id
|
||||
ORDER BY
|
||||
modified_timestamp DESC)) = 1
|
||||
@ -514,6 +514,54 @@ WHERE
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
quickswap_v4 AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
event_name,
|
||||
liquidity_provider,
|
||||
sender,
|
||||
receiver,
|
||||
pool_address,
|
||||
token0,
|
||||
token1,
|
||||
NULL AS token2,
|
||||
NULL AS token3,
|
||||
NULL AS token4,
|
||||
NULL AS token5,
|
||||
NULL AS token6,
|
||||
NULL AS token7,
|
||||
amount0_unadj,
|
||||
amount1_unadj,
|
||||
NULL AS amount2_unadj,
|
||||
NULL AS amount3_unadj,
|
||||
NULL AS amount4_unadj,
|
||||
NULL AS amount5_unadj,
|
||||
NULL AS amount6_unadj,
|
||||
NULL AS amount7_unadj,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
TYPE,
|
||||
_log_id AS _id,
|
||||
modified_timestamp AS _inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver_dex__quickswap_v4_pool_actions') }}
|
||||
|
||||
{% if is_incremental() and 'quickswap_v4' not in vars.curated_fr_models %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ vars.CURATED_COMPLETE_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
dackie AS (
|
||||
SELECT
|
||||
block_number,
|
||||
@ -994,6 +1042,11 @@ all_pools AS (
|
||||
FROM
|
||||
quickswap_v2
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
quickswap_v4
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
||||
@ -372,6 +372,45 @@ WHERE
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
quickswap_v4 AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
contract_address,
|
||||
pool_address,
|
||||
'0x' AS pool_id,
|
||||
NULL AS pool_name,
|
||||
NULL AS fee,
|
||||
NULL AS tick_spacing,
|
||||
token0_address AS token0,
|
||||
token1_address AS token1,
|
||||
NULL AS token2,
|
||||
NULL AS token3,
|
||||
NULL AS token4,
|
||||
NULL AS token5,
|
||||
NULL AS token6,
|
||||
NULL AS token7,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
type,
|
||||
_log_id AS _id,
|
||||
modified_timestamp AS _inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver_dex__quickswap_v4_pools') }}
|
||||
|
||||
{% if is_incremental() and 'quickswap_v4' not in vars.CURATED_FR_MODELS %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ vars.CURATED_COMPLETE_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
poolcreated_evt_v3 AS (
|
||||
SELECT
|
||||
block_number,
|
||||
@ -1135,6 +1174,11 @@ all_pools AS (
|
||||
FROM
|
||||
quickswap_v2
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
quickswap_v4
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
||||
@ -168,6 +168,45 @@ WHERE
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
quickswap_v4 AS (
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
pool_address AS contract_address,
|
||||
'0x' AS pool_id,
|
||||
event_name,
|
||||
amount_in_unadj,
|
||||
amount_out_unadj,
|
||||
token_in,
|
||||
token_out,
|
||||
sender,
|
||||
recipient AS tx_to,
|
||||
event_index,
|
||||
platform,
|
||||
protocol,
|
||||
version,
|
||||
type,
|
||||
_log_id,
|
||||
modified_timestamp AS _inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver_dex__quickswap_v4_swaps') }}
|
||||
|
||||
{% if is_incremental() and 'quickswap_v4' not in vars.CURATED_FR_MODELS %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) - INTERVAL '{{ vars.CURATED_COMPLETE_LOOKBACK_HOURS }}'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
),
|
||||
|
||||
woofi AS (
|
||||
SELECT
|
||||
block_number,
|
||||
@ -1526,6 +1565,11 @@ all_dex AS (
|
||||
FROM
|
||||
quickswap_v2
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
quickswap_v4
|
||||
UNION ALL
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
||||
160
models/doc_descriptions/chain_stats/ez_address_metrics.md
Normal file
160
models/doc_descriptions/chain_stats/ez_address_metrics.md
Normal file
@ -0,0 +1,160 @@
|
||||
{% docs ez_address_metrics_table_doc %}
|
||||
|
||||
## What
|
||||
|
||||
User-level aggregated metrics for the indicated EVM blockchain including transaction activity, DeFi interactions, staking behavior, NFT activity, and governance participation. Captures comprehensive on-chain behavior patterns for individual addresses across various protocol categories and activity types.
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_address %}
|
||||
|
||||
Unique address (wallet address) - primary identifier for all aggregated metrics
|
||||
|
||||
Example: '0x1234567890abcdef1234567890abcdef12345678'
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_complex_txn %}
|
||||
|
||||
Number of non-native-transfer transactions initiated by the user + number of bridge transactions
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_contracts %}
|
||||
|
||||
The number of different contracts that the user transacts with
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_days_active %}
|
||||
|
||||
Number of days with initiated transactions + CEX withdrawals + inbound bridge transfers
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_txn %}
|
||||
|
||||
Number of transactions + CEX withdrawals + inbound bridge transfers
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_bridge_in %}
|
||||
|
||||
Number of inbound bridge transfers
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_bridges %}
|
||||
|
||||
Total number of bridge transactions (both inbound and outbound) executed by this address
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_cex_withdrawals %}
|
||||
|
||||
Number of withdrawals from a centralized exchange
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_net_token_accumulate %}
|
||||
|
||||
Number of token transfers received / (number of token transfers received + number of token transfers sent)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_other_defi %}
|
||||
|
||||
Any non-swap, non-LP transactions with events like borrow, lend, etc.
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_lp_adds %}
|
||||
|
||||
Number of non-swap transfers to a liquidity pool
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_lp_pools %}
|
||||
|
||||
Number of unique liquidity pools this address has provided liquidity to
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_swap_tx %}
|
||||
|
||||
Number of swaps
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_swaps %}
|
||||
|
||||
Total number of individual swap operations (may differ from n_swap_tx if transactions contain multiple swaps)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_tokens_traded %}
|
||||
|
||||
Number of distinct tokens swapped
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_nft_collections %}
|
||||
|
||||
Number of NFT contracts traded
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_nft_mints %}
|
||||
|
||||
Number of NFTs minted
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_nft_buys %}
|
||||
|
||||
Number of buys of any NFTs
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_nft_ids %}
|
||||
|
||||
Number of distinct NFTs bought or sold
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_nft_lists %}
|
||||
|
||||
Number of NFTs listed
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_votes %}
|
||||
|
||||
Number of staking transactions (liquid stake or delegation)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_stake_tx %}
|
||||
|
||||
Number of staking transactions (liquid stake or delegation)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_restakes %}
|
||||
|
||||
Number of restakes
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_n_validators %}
|
||||
|
||||
Number of validators staked to OR liquid stake providers
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_address_metrics_net_stake_accumulate %}
|
||||
|
||||
Number of stakes / (number of stakes + number of unstakes)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
31
models/doc_descriptions/chain_stats/ez_allowlist.md
Normal file
31
models/doc_descriptions/chain_stats/ez_allowlist.md
Normal file
@ -0,0 +1,31 @@
|
||||
{% docs ez_allowlist_table_doc %}
|
||||
|
||||
## What
|
||||
|
||||
Verified tokens for the indicated EVM blockchain. Appended with a tracks asset column that indicates ETH, BTC, USD, or is an alt coin
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_allowlist_blockchain %}
|
||||
|
||||
The name of the blockchain
|
||||
|
||||
Example: 'Arbitrum'
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_allowlist_symbol %}
|
||||
|
||||
The symbol of the token
|
||||
|
||||
Example: 'ETH', 'BTC', 'USDC'
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_allowlist_tracks_asset %}
|
||||
|
||||
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
|
||||
|
||||
Example: 'ETH', 'BTC', 'USD'
|
||||
|
||||
{% enddocs %}
|
||||
212
models/doc_descriptions/chain_stats/ez_metrics_daily.md
Normal file
212
models/doc_descriptions/chain_stats/ez_metrics_daily.md
Normal file
@ -0,0 +1,212 @@
|
||||
{% docs ez_metrics_daily_table_doc %}
|
||||
|
||||
## What
|
||||
|
||||
Daily aggregated metrics for the indicated EVM 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).
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_day_ %}
|
||||
|
||||
The date in YYYY-MM-DD format - all stats are aggregated at the daily level
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_active_users_count %}
|
||||
|
||||
Number of origin_from_address (Externally Owned Accounts EOAs) that submitted a transaction
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_active_quality_users_count %}
|
||||
|
||||
Number of EOAs with a Flipside score of 4 or higher that submitted a transaction
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_transaction_count %}
|
||||
|
||||
Number of transactions submitted by any origin_from_address (EOA)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_quality_transaction_count %}
|
||||
|
||||
Number of transactions submitted by EOAs with a Flipside score of 4 or higher
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_total_fees %}
|
||||
|
||||
Total transaction fees paid, denominated in Ether (ETH)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_total_fees_usd %}
|
||||
|
||||
USD denominated total transaction fees paid (converting ETH to USD via ETH price)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_quality_total_fees %}
|
||||
|
||||
Total transaction fees paid by EOAs with a Flipside score of 4 or higher, denominated in Ether (ETH)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_quality_total_fees_usd %}
|
||||
|
||||
USD denominated total transaction fees paid by EOAs with a Flipside score of 4 or higher (converting ETH to USD via ETH price)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_stablecoin_transfer_volume_usd %}
|
||||
|
||||
Value of all stablecoin transfers for any reason (USD)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_in_unit_total_transfer_volume %}
|
||||
|
||||
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)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_total_transfer_volume_usd %}
|
||||
|
||||
Value of all token transfers for any reason (direct, swap, liquidity deposit, staking, etc.), denominated in USD accepting price effects
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_in_unit_quality_total_transfer_volume %}
|
||||
|
||||
Value of all token transfers FROM EOAs with a Flipside score of 4 or higher for any reason, denominated in ETH
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_quality_total_transfer_volume_usd %}
|
||||
|
||||
Value of all token transfers FROM EOAs with a Flipside score of 4 or higher for any reason, denominated in USD
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_withdrawal_volume_usd %}
|
||||
|
||||
Value of central exchange token withdrawals (USD)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_withdrawal_tx_count %}
|
||||
|
||||
Number of central exchange token withdrawal transactions
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_unique_withdrawing_addresses %}
|
||||
|
||||
Number of unique addresses that withdrew from a central exchange
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_deposit_volume_usd %}
|
||||
|
||||
Value of central exchange token deposits (USD)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_deposit_tx_count %}
|
||||
|
||||
Number of central exchange token deposit transactions
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_unique_depositing_addresses %}
|
||||
|
||||
Number of unique addresses that deposited to a central exchange
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_cex_net_flow_usd %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_chain_gross_dex_volume_usd %}
|
||||
|
||||
USD value of token sell volume on Decentralized Exchanges (DEXs) protocols
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_chain_swap_count %}
|
||||
|
||||
Number of swap transactions on Decentralized Exchanges (DEXs) protocols
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_chain_swapper_count %}
|
||||
|
||||
Number of unique EOAs that have submitted a swap transaction on Decentralized Exchanges (DEXs) protocols
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_tvl_usd %}
|
||||
|
||||
Total Value Locked - USD value of tokens locked in smart contracts. INCLUDES borrowed tokens, liquid staking, and staking
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_in_unit_tvl %}
|
||||
|
||||
Total Value Locked in ETH denominated terms to reduce price effects
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_inbound_volume_usd %}
|
||||
|
||||
Value of bridge inflows, denominated in USD
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_inbound_addresses %}
|
||||
|
||||
Number of unique addresses receiving a bridge inflow
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_inbound_tx_count %}
|
||||
|
||||
Number of bridge inflow transactions
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_outbound_volume_usd %}
|
||||
|
||||
Value of bridge outflows, denominated in USD
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_outbound_addresses %}
|
||||
|
||||
Number of unique addresses sending a bridge outflow
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_outbound_tx_count %}
|
||||
|
||||
Number of bridge outflow transactions
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_gross_volume_usd %}
|
||||
|
||||
Value of bridge outflows, denominated in USD
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_metrics_daily_bridge_net_inbound_usd %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
92
models/doc_descriptions/chain_stats/ez_protocol_metrics.md
Normal file
92
models/doc_descriptions/chain_stats/ez_protocol_metrics.md
Normal file
@ -0,0 +1,92 @@
|
||||
{% docs ez_protocol_metrics_table_doc %}
|
||||
|
||||
## What
|
||||
|
||||
Daily aggregated protocol-level metrics for the indicated EVM 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.
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_day_ %}
|
||||
|
||||
The date in YYYY-MM-DD format - all stats are aggregated at the daily level
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_protocol %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_n_users %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_n_quality_users %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_n_transactions %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_n_quality_transactions %}
|
||||
|
||||
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
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_usd_inflows %}
|
||||
|
||||
USD value of tokens sent INTO this protocol from all other addresses/protocols/contracts (excludes transfers within the same protocol)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_usd_outflows %}
|
||||
|
||||
USD value of tokens sent FROM this protocol to all other addresses/protocols/contracts (excludes transfers within the same protocol)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_net_usd_inflow %}
|
||||
|
||||
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)
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_gross_usd_volume %}
|
||||
|
||||
Total USD volume calculated as inflows plus outflows
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_quality_usd_inflows %}
|
||||
|
||||
USD value of token inflows from quality addresses with Flipside score >= 4
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_quality_usd_outflows %}
|
||||
|
||||
USD value of token outflows to quality addresses with Flipside score >= 4
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_quality_net_usd %}
|
||||
|
||||
Quality USD inflows minus quality USD outflows. Price effects may apply similar to net_usd_inflow
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
{% docs ez_protocol_metrics_quality_gross_usd %}
|
||||
|
||||
Total quality USD volume calculated as quality inflows plus quality outflows
|
||||
|
||||
{% enddocs %}
|
||||
|
||||
@ -73,6 +73,50 @@ sources:
|
||||
schema: core
|
||||
tables:
|
||||
- name: dim_dates
|
||||
- name: crosschain_chain_stats
|
||||
database: crosschain
|
||||
schema: chain_stats
|
||||
tables:
|
||||
- name: ez_arbitrum_allowlist
|
||||
- name: ez_avalanche_allowlist
|
||||
- name: ez_base_allowlist
|
||||
- name: ez_bob_allowlist
|
||||
- name: ez_boba_allowlist
|
||||
- name: ez_bsc_allowlist
|
||||
- name: ez_ethereum_allowlist
|
||||
- name: ez_ink_allowlist
|
||||
- name: ez_optimism_allowlist
|
||||
- name: ez_polygon_allowlist
|
||||
- name: ez_arbitrum_address_metrics
|
||||
- name: ez_avalanche_address_metrics
|
||||
- name: ez_base_address_metrics
|
||||
- name: ez_bob_address_metrics
|
||||
- name: ez_boba_address_metrics
|
||||
- name: ez_bsc_address_metrics
|
||||
- name: ez_ethereum_address_metrics
|
||||
- name: ez_ink_address_metrics
|
||||
- name: ez_optimism_address_metrics
|
||||
- name: ez_polygon_address_metrics
|
||||
- name: ez_arbitrum_metrics_daily
|
||||
- name: ez_avalanche_metrics_daily
|
||||
- name: ez_base_metrics_daily
|
||||
- name: ez_bob_metrics_daily
|
||||
- name: ez_boba_metrics_daily
|
||||
- name: ez_bsc_metrics_daily
|
||||
- name: ez_ethereum_metrics_daily
|
||||
- name: ez_ink_metrics_daily
|
||||
- name: ez_optimism_metrics_daily
|
||||
- name: ez_polygon_metrics_daily
|
||||
- name: ez_arbitrum_protocol_metrics
|
||||
- name: ez_avalanche_protocol_metrics
|
||||
- name: ez_base_protocol_metrics
|
||||
- name: ez_bob_protocol_metrics
|
||||
- name: ez_boba_protocol_metrics
|
||||
- name: ez_bsc_protocol_metrics
|
||||
- name: ez_ethereum_protocol_metrics
|
||||
- name: ez_ink_protocol_metrics
|
||||
- name: ez_optimism_protocol_metrics
|
||||
- name: ez_polygon_protocol_metrics
|
||||
- name: abis_silver
|
||||
database: "{{ target.database }}"
|
||||
schema: silver
|
||||
|
||||
Loading…
Reference in New Issue
Block a user