ArioMetamask vs. Other Platforms - 1
Updated 2022-06-25
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 metamask_tx as (
select distinct(tx_hash), ORIGIN_FROM_ADDRESS
from ethereum.core.fact_event_logs
where CONTRACT_ADDRESS = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
and ORIGIN_TO_ADDRESS = lower('0x881D40237659C251811CEC9c364ef91dC08D300C')
and TX_STATUS = 'SUCCESS'
and BLOCK_TIMESTAMP >= '2022-01-01'
),
metamask_swap as (
select *
from ethereum.core.ez_token_transfers e join metamask_tx t on e.TX_HASH = t.TX_HASH and e.to_address = t.ORIGIN_FROM_ADDRESS
where HAS_DECIMAL = True
and HAS_PRICE = True
and --e.TX_HASH not in ('0x3f95844988ba98d4bf008a516ffa088f9ec4b5419da92f3ba24d2fef0c04b2c2', '0x3f95844988ba98d4bf008a516ffa088f9ec4b5419da92f3ba24d2fef0c04b2c2','0xd99f180df7f3dbb2070dedcdb51e8700e8eacc862229f18189cf2305f0689e40')
SYMBOL not in ('$WEAPON', 'VOLT')
),
metamask as (
select --BLOCK_TIMESTAMP::date as date,
'Metamask' as Platforms,
count(distinct to_address) as number_of_users,
sum(AMOUNT_USD) as swap_volume
from metamask_swap
-- group by date
),
uniswap_v2 as (
select --BLOCK_TIMESTAMP::date as date,
'Uniswap-v2' as Platforms,
count(distinct ORIGIN_FROM_ADDRESS) as number_of_users,
sum(AMOUNT_IN_USD) as swap_volume
from ethereum.core.ez_dex_swaps
where EVENT_NAME = 'Swap'
and PLATFORM = 'uniswap-v2'
and BLOCK_TIMESTAMP::date >= '2022-01-01'
--group by date
--and AMOUNT_IN_USD between (AMOUNT_out_USD - 0.05 * AMOUNT_out_USD) and (AMOUNT_out_USD + 0.05 * AMOUNT_out_USD)
),
Run a query to Download Data