boomer77percentage fees used
Updated 2021-09-30
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
›
⌄
with crv as (select
date_trunc('week', block_timestamp) as block_week,
event_inputs:to::string as users,
event_inputs:value/1e18 as amount_3crv,
tx_id
from ethereum.events_emitted
where
lower(event_inputs:from::string) = ('0xc5bddf9843308380375a611c18b50fb9341f502a')
and lower (contract_address) = ('0x6c3f90f043a72fa612cbac8115ee7e52bde6e490')
and tx_succeeded = 'TRUE'),
fee_claim as (select date_trunc('week', block_timestamp) as block_week,
sum(tx_fee) as claim_fees_eth
from ethereum.transactions
where tx_id in (select distinct tx_id from crv)
group by 1),
total_fee as (select date_trunc('week', block_timestamp) as block_week,sum(tx_fee) as network_fees_eth
from ethereum.transactions
where block_timestamp > '2021-01-01'
group by 1)
select a.block_week, a.claim_fees_eth, b.network_fees_eth, (a.claim_fees_eth/b.network_fees_eth)*100 as fee_percentage
from fee_claim a
join total_fee b on a.block_week = b.block_week
Run a query to Download Data