mhmCompare native bridge vs Hop bridge
Updated 2022-06-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
›
⌄
with hop_bridge as (
select block_timestamp::date as date, 'hop' as bridge, sum(EVENT_INPUTS:amount/1e18) as eth_amount, count(tx_hash) as total_tx, count(DISTINCT ORIGIN_FROM_ADDRESS) as unique_wallets,
avg(EVENT_INPUTS:amount/1e18) as avg_eth_deposited,
sum(eth_amount) over (order by date) as cum_eth_amount,
sum(total_tx) over (order by date) as cum_total_tx,
sum(unique_wallets) over (order by date) as cum_unique_wallets
from ethereum.core.fact_event_logs
where event_name = 'TransferSentToL2'
and ORIGIN_FUNCTION_SIGNATURE = '0xdeace8f5'
and ORIGIN_TO_ADDRESS = '0xb8901acb165ed027e32754e0ffe830802919727f'
and CONTRACT_ADDRESS = '0xb8901acb165ed027e32754e0ffe830802919727f'
and date >= '2022-01-01'
group by 1,2
), optimism_native_bridge as (
select
block_timestamp::date as date,
'native' as bridge,
sum(eth_value) as eth_amount,
count(from_address) as total_tx,
count(distinct from_address) as unique_wallets,
avg(eth_value) as avg_eth_deposited,
sum(eth_amount) over (order by date) as cum_eth_amount,
sum(total_tx) over (order by date) as cum_total_tx,
sum(unique_wallets) over (order by date) as cum_unique_wallets
FROM ethereum.core.fact_transactions
WHERE (to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' or to_address = '0x52ec2f3d7c5977a8e558c8d9c6000b615098e8fc')
and date >= '2022-01-01'
GROUP BY 1,2
)
select * from hop_bridge
union all
select * from optimism_native_bridge
Run a query to Download Data