SpiltadavidNumber of swaps on Uniswap v2 and Cowswap
Updated 2022-10-17
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
select
BLOCK_TIMESTAMP::date as date ,
count(distinct TX_HASH)as tx ,
count(distinct ORIGIN_FROM_ADDRESS)as swappers ,
sum(EVENT_INPUTS:value/pow(10,18)) as swap_volume ,
CASE WHEN LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x9008D19f58AAbD9eD0D60971565AA8510560ab41') THEN 'COWSWAP' ELSE 'UNISWAP' END AS TYPE
from gnosis.core.fact_event_logs
where (LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x9008D19f58AAbD9eD0D60971565AA8510560ab41') OR
(LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506') OR
LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x1C232F01118CB8B424793ae03F870aa7D0ac7f77') OR
LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x6093AeBAC87d62b1A5a4cEec91204e35020E38bE') OR
LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0xb18d4f69627F8320619A696202Ad2C430CeF7C53') OR
LOWER(ORIGIN_TO_ADDRESS) = LOWER ('0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506') ))
and EVENT_NAME='Transfer'
and TX_STATUS='SUCCESS'
group by date ,TYPE