OneDataAnalystPieChart eth stake
Updated 2022-09-05Copy 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
35
36
›
⌄
WITH ethprice as (
select hour::date as date, avg (price) as usdprice
from ethereum.core.fact_hourly_token_prices
where symbol ='WETH'
group by 1),
--// Staking Transactions //
stakewise as (
select 'Stakewise' as platform,
origin_from_address AS Staker,
event_inputs:value/1e18 as Volume,
Volume*usdprice as USD_Volume
,tx_hash
from ethereum.core.fact_event_logs t1
join ethprice t2 on t1.block_timestamp::date = t2.date
where origin_to_address = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A')
and origin_function_signature in ('0x4a58db19','0x3a4b66f1','0x040dee8a')
),
---------------------------------
stkr as (
select 'stkr' as platform,
origin_from_address,
event_inputs:value/1e18 as Volume,
Volume*usdprice as USD_Volume
,tx_hash
from ethereum.core.fact_event_logs t1 join ethprice t2 on t1.block_timestamp::date = t2.date
where origin_to_address = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670')
and origin_function_signature in ('0x9fa65c56','0xeb834a2c')
and event_inputs:from = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670')
),
---------------------------------
Cream as (
select 'Cream' as platform,
origin_from_address,
event_inputs:value/1e18 as Volume,
Volume*usdprice as USD_Volume
Run a query to Download Data