CryptoIcicleUser Behavior (redux) - Swaps
Updated 2022-10-24
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
›
⌄
-- How is user behavior different on Optimism compared to L1?
-- Pay by Quality Your score determines your final payout.
-- Grand Prize 75 USDC (A score of 11 or 12 earns you a Grand Prize title)
-- Payout 50 USDC
-- Score Multiplier0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
-- Payout Network Ethereum
-- Level Beginner
-- Difficulty Medium
-- How is user behavior different on Optimism compared to L1?
-- Specifically, create a comparison between swaps and transactions on ETH mainnet vs Optimism, looking for things like daily swap volume,
-- daily active users, and average volume swapped (use a single DEX for your comparison, either Uniswap or Sushiswap).
-- L2 is far cheaper, but by how much? What are the average fees for a swap on Optimism compared to ETH Mainnet?
-- BONUS: Post your dashboard on Twitter and tag @flipsidecrypto and any relevant accounts!
with
op as (
select
date_trunc('{{date_range}}',block_timestamp) as date,
'optimism' as type,
count(distinct tx_hash) as n_txns,
count(distinct origin_from_address) as n_users,
sum(amount_in_usd) as swap_volume_usd,
avg(amount_in_usd) as avg_swap_volume_usd
from optimism.sushi.ez_swaps
where block_timestamp >= CURRENT_DATE - {{n_days}}
group by 1,2
),
eth as (
select
date_trunc('{{date_range}}',block_timestamp) as date,
'ethereum' as type,
count(distinct tx_hash) as n_txns,
count(distinct origin_from_address) as n_users,
sum(amount_in_usd) as swap_volume_usd,
avg(amount_in_usd) as avg_swap_volume_usd
Run a query to Download Data