CryptoIcicleLido-10.Gain or Lose
Updated 2022-06-13
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
›
⌄
-- Payout 75 USDC
-- Grand Prize 225 USDC
-- Level Intermediate
-- Q10. Of the stakers that have swapped ETH to stETH, how much ETH did they gain or lose
-- depending on the peg of stETH to ETH at the time of the swap?
with steth_price as (
select
date_trunc('day', hour) as date,
avg(price) as price
from ethereum.token_prices_hourly
where token_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' -- stETH
and hour >= '2021-01-01'
group by date
),
eth_price as (
select
date_trunc('day', hour) as date,
avg(price) as price
from ethereum.token_prices_hourly
where symbol = 'WETH'
and hour >= '2021-01-01'
group by date
),
ratio as (
select
s.date,
s.price as steth,
e.price as eth,
eth/steth as eth_steth_ratio,
steth/eth as steth_eth_ratio
from steth_price s
join eth_price e on s.date = e.date
),
high_diff as (
Run a query to Download Data