kiacryptoGas used consumes by different sushi services
Updated 2022-06-08Copy 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
›
⌄
with kashi_address as (
select symbol, address
from flipside_prod_db.ethereum_core.dim_contracts
where symbol like 'km%' and name like '%Kashi%'
),
txs as (
select event_name, tx_hash
from flipside_prod_db.ethereum_core.fact_event_logs, kashi_address
where event_name is not null and contract_address = address -- and event_name in ('addLiquidity', 'LogAddAsset', 'LogRepay', 'LogBorrow', 'LogRemoveAsset')
),
swap_tx as (
select event_name, tx_hash
from ethereum.core.ez_dex_swaps
where event_name = 'Swap' and platform = 'sushiswap'
)
select event_name, avg(gas_used) as gas_per_tx
from ethereum.core.fact_transactions t, txs tx
where t.tx_hash = tx.tx_hash
group by 1
union all
select event_name, avg(gas_used) as gas_per_tx
from ethereum.core.fact_transactions t, swap_tx tx
where t.tx_hash = tx.tx_hash
group by 1
Run a query to Download Data