biffbusterDaily Bridge Stats
Updated 2022-11-30Copy 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
30
31
32
33
34
35
36
›
⌄
with withdraws as (
SELECT
date_trunc('day',block_timestamp) as date,
SUM(eth_value) as "Amount Out (ETH)",
COUNT(DISTINCT to_address) as "Unique Withdrawers"
FROM ethereum.core.fact_traces
WHERE from_address = LOWER('0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1') -- Optimism Bridge Contract
AND date > dateadd(day, -60, current_date())
GROUP BY 1
ORDER BY 1 DESC
),
deposits as (
SELECT
date_trunc('day',block_timestamp) as date,
COUNT(eth_from_address) as "Unique Depositors",
-- tx_hash,
SUM(amount) as "Amount In (ETH)"
-- COUNT(DISTINCT eth_to_address) as unique_depositors
FROM ethereum.core.ez_eth_transfers
WHERE eth_to_address = LOWER('0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1')
AND date > dateadd(day, -60, current_date())
GROUP BY 1
ORDER BY 1 DESC
)
SELECT
w.date,
w."Unique Withdrawers",
d."Amount In (ETH)",
d."Unique Depositors",
w."Amount Out (ETH)"
FROM withdraws w
INNER JOIN deposits d ON w.date = d.date
ORDER BY date DESC
Run a query to Download Data