Moe5 mkr flsh
Updated 2022-10-09
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
›
⌄
with base as (
select
tx_hash
from ethereum.maker.ez_flash_loans
where block_timestamp >= CURRENT_DATE - {{days_back}}
)
,fin as (select
ORIGIN_FROM_ADDRESS
from ethereum.core.ez_token_transfers
where tx_hash in (select tx_hash from base)
and block_timestamp >= CURRENT_DATE - {{days_back}})
select
Label,
count(tx_hash) as num_usage
from Ethereum.core.fact_transactions t
inner join ethereum.core.dim_labels l on t.TO_ADDRESS= l.address
where label_subtype != 'token_contract'
and LABEL_TYPE in ('dapp','defi')
and STATUS = 'SUCCESS'
and label not ilike '%Aave%'
and label not ilike '%makerdao%'
and label not ilike '%mev bot%'
and FROM_ADDRESS in (select origin_from_address from fin)
group by 1
order by 2 desc
Run a query to Download Data