freemartianHop ETH Bridgoors - Swaps
Updated 2022-07-31
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 eth_bridges as (
select
origin_from_address as user, tx_hash, block_timestamp,
sum(event_inputs:amount)/pow(10,18) * avg(price) as volume
from ethereum.core.fact_event_logs l
inner join ethereum.core.fact_hourly_token_prices p on to_char(block_timestamp, 'yyyy-mm-dd HH24:00:00.000 ') = hour
where origin_to_address = lower('0xb8901acB165ed027E32754E0FFe830802919727f')
and event_name = 'TransferSentToL2'
and symbol = 'WETH'
and event_inputs:chainId = '137'
and block_timestamp > CURRENT_DATE - 90
group by 1, 2, 3
order by volume DESC),
next_transactions as (
select ft.tx_hash as tx, from_address, ft.block_timestamp
from ethereum.core.fact_transactions ft
inner join eth_bridges e on e.user = ft.from_address
where from_address in (select user from eth_bridges)
and ft.block_timestamp::date = e.block_timestamp::date
and ft.block_timestamp > e.block_timestamp
order by ft.block_timestamp ASC)
select count(tx_hash) as count, event_name, origin_to_address as contract,
case
when contract = '0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' then 'Uniswap V3: Router 2'
when contract = '0x7a250d5630b4cf539739df2c5dacb4c659f2488d' then 'Uniswap V2: Router 2'
when contract = '0x881d40237659c251811cec9c364ef91dc08d300c' then 'Metamask: Swap Router'
when contract = '0x1111111254fb6c44bac0bed2854e76f90643097d' then '1inch v4: Router'
when contract = '0x00000000009726632680fb29d3f7a9734e3010e2' then 'Rainbow: Router'
when contract = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f' then 'SushiSwap: Router'
when contract = '0xdef1c0ded9bec7f1a1670819833240f027b25eff' then '0x: Exchange Proxy'
when contract = '0xe592427a0aece92de3edee1f18e0157c05861564' then 'Uniswap V3: Router'
when contract = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57' then 'Paraswap v5: Augustus Swapper Mainnet '
when contract = '0x11111112542d85b3ef69ae05771c2dccff4faa26' then '1inch v3'
end as DEX_routers
Run a query to Download Data