This commit is contained in:
drethereum 2025-11-12 14:32:32 -07:00
commit ccba2ea23f
29 changed files with 1717 additions and 134 deletions

View File

@ -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

1 chain eid
2 abstract 30324
3 animechain 30372
4 ape 30312
5 aptos apexfusionnexus 30108 30384
6 arbitrum aptos 30110 30108
7 arbitrum_nova arbitrum 30175 30110
8 astar arbitrum_nova 30210 30175
9 astar_zkevm astar 30257 30210
10 aurora astar_zkevm 30211 30257
11 avalanche aurora 30106 30211
12 bob avalanche 30279 30106
13 bahamut 30363
14 base 30184
15 beam bb1 30198 30234
16 berachain beam 30362 30198
17 bevm berachain 30317 30362
18 bsc bevm 30102 30317
19 bitlayer 30314
20 blast bl4 30243 30337
21 bouncebit bl5 30293 30338
22 canto blast 30159 30243
23 celo bob 30125 30279
24 codex botanix 30323 30376
25 concrete bouncebit 30366 30293
26 conflux_espace bsc 30212 30102
27 coredao camp 30153 30381
28 corn canto 30331 30159
29 cronos celo 30359 30125
30 cronos_zkevm codex 30360 30323
31 cyber concrete 30283 30366
32 degen conflux_espace 30267 30212
33 dexalot converge 30118 30400
34 dfk_chain coredao 30115 30153
35 dm2_verse corn 30315 30331
36 dos_chain cronos 30149 30359
37 ebi cronos_zkevm 30282 30360
38 edu cyber 30328 30283
39 ethereum degen 30101 30267
40 etherlink dexalot 30292 30118
41 fantom dfk_chain 30112 30115
42 flare dinari 30295 30385
43 flow_evm dm2_verse 30336 30315
44 fraxtal doma 30255 30393
45 fuse dos_chain 30138 30149
46 glue ebi 30342 30282
47 gnosis edu 30145 30328
48 goat eon 30361 30215
49 gravity ethereal 30294 30391
50 gunz ethereum 30371 30101
51 harmony etherlink 30116 30292
52 hedera fantom 30316 30112
53 hemi flare 30329 30295
54 homeverse flow_evm 30265 30336
55 horizen_eon fraxtal 30215 30255
56 hubble fuse 30182 30138
57 hyperevm gatelayer 30367 30389
58 initia glue 30326 30342
59 ink gnosis 30339 30145
60 iota goat 30284 30361
61 japan_open_chain gravity 30285 30294
62 kaia gunz 30150 30371
63 kava harmony 30177 30116
64 lens hedera 30373 30316
65 lightlink hemi 30309 30329
66 linea homeverse 30183 30265
67 lisk horizen_eon 30321 30215
68 loot hubble 30197 30182
69 lyra humanity 30311 30382
70 manta_pacific hyperevm 30217 30367
71 mantle inevm 30181 30234
72 masa initia 30263 30326
73 merlin injectiveevm 30266 30394
74 meter ink 30176 30339
75 metis intain 30151 30152
76 mode iota 30260 30284
77 moonbeam islander 30126 30330
78 moonriver japan_open_chain 30167 30285
79 morph kaia 30322 30150
80 movement katana 30325 30375
81 nibiru kava 30369 30177
82 okx lens 30155 30373
83 optimism lightlink 30111 30309
84 orderly linea 30213 30183
85 otherworld_space lisk 30341 30321
86 peaq loot 30302 30197
87 plume lyra 30370 30311
88 plume manta_pacific 30318 30217
89 polygon mantle 30109 30181
90 polygon_zkevm masa 30158 30263
91 rari_chain merlin 30235 30266
92 reya meter 30313 30176
93 rootstock metis 30333 30151
94 sanko mode 30278 30260
95 scroll monad 30214 30390
96 sei moonbeam 30280 30126
97 shimmer moonriver 30230 30167
98 skale morph 30273 30322
99 solana movement 30168 30325
100 soneium mp1 30340 30331
101 sonic nexera 30332 30395
102 sophon nibiru 30334 30369
103 story nova 30364 30175
104 subtensor_evm og 30374 30388
105 superposition okx 30327 30155
106 swell opbnb 30335 30202
107 ton openledger 30343 30392
108 taiko optimism 30290 30111
109 telosevm orderly 30199 30213
110 tenet otherworld_space 30173 30341
111 tiltyard peaq 30238 30302
112 tron pgn 30420 30218
113 unichain plasma 30320 30383
114 vana plume 30330 30318
115 viction plumephoenix 30196 30370
116 worldchain polygon 30319 30109
117 x_layer polygon_zkevm 30274 30158
118 xchain rari_chain 30291 30235
119 xdc rarible 30365 30235
120 xpla real 30216 30237
121 xai reya 30236 30313
122 zircuit rootstock 30303 30333
123 zora sanko 30195 30278
124 inevm scroll 30234 30214
125 opbnb sei 30202 30280
126 re.al shimmer 30237 30230
127 zklink shrapnel 30301 30148
128 zksync_era silicon 30165 30379
129 skale 30273
130 solana 30168
131 somnia 30380
132 soneium 30340
133 sonic 30332
134 sophon 30334
135 space 30341
136 stable 30396
137 story 30364
138 subtensor_evm 30374
139 sui 30378
140 superposition 30327
141 swell 30335
142 swimmer 30114
143 tac 30377
144 taiko 30290
145 telosevm 30199
146 tenet 30173
147 tiltyard 30238
148 tomo 30196
149 ton 30343
150 tron 30420
151 unichain 30320
152 vana 30330
153 viction 30196
154 worldchain 30319
155 x_layer 30274
156 xai 30236
157 xchain 30291
158 xdc 30365
159 xlayer 30274
160 xpla 30216
161 zircuit 30303
162 zkatana 30257
163 zkevm 30158
164 zklink 30301
165 zksync 30165
166 zksync_era 30165
167 zkverify 30386
168 zora 30195

View File

@ -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
1 chain asset id lpTokenSymbol address oftAddress
32 core USDT 2 S*USDT 0x900101d06a7426441ae63e9ab3b9b0f63be145f1 0x45f1a95a4d3f3836523f5c83673c797f4d4d263b
33 gnosis USDC 1 S*USDC 0x2a22f9c3b484c3629090feed35f17ff8f88f76f0 0xb1eead6959cb5bb9b20417d6689922523b2b86c3
34 gnosis ETH 13 S*ETH 0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1 0xe9aba835f813ca05e50a6c0ce65d0d74390f7de7
35 ink USDC 1 S*USDC 0xf1815bd50389c46847f0bda824ec8da914045d14 0x2f6f07cdcf3588944bf4c42ac74ff24bf56e7590
36 somnia USDC.e 1 S*USDC.e 0x28bec7e30e6faee657a03e19bf1128aad7632a00 0xcb97465bc1bff20fb788ccf29b409513789b6eae
37 somnia USDT 2 S*USDT 0x67b302e35aef5eee8c32d934f5856869ef428330 0xafe47bac47f2d9cdc0254a487c7b51ccb6c2b065
38 somnia WETH 13 S*WETH 0x936ab8c674bcb567cd5deb85d8a216494704e9d8 0xfb9e0b64bf68b2e1e478838b8722eace2ad5cd02

View File

@ -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 %}

View File

@ -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) }}

View File

@ -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) }}

View File

@ -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

View File

@ -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") }}'

View File

@ -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

View File

@ -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") }}'

View File

@ -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

View File

@ -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") }}'

View File

@ -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

View File

@ -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") }}'

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View 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 %}

View 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 %}

View 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 %}

View 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 %}

View File

@ -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