TIME | STETH_AMOUNT | ETH_AMOUNT | RATE | |
---|---|---|---|---|
1 | 2025-05-29 06:00:00.000 | 42.994518716 | 42.982958219 | 0.9997311169 |
2 | 2025-05-29 05:00:00.000 | 48.724706079 | 48.703349109 | 0.9995616809 |
3 | 2025-05-29 04:00:00.000 | 15.579328413 | 15.572553674 | 0.9995651456 |
4 | 2025-05-29 03:00:00.000 | 47.925256095 | 47.90807016 | 0.9996414013 |
5 | 2025-05-29 02:00:00.000 | 42.100870891 | 42.089290462 | 0.9997249361 |
6 | 2025-05-29 01:00:00.000 | 20.175163501 | 20.166417756 | 0.9995665093 |
7 | 2025-05-29 00:00:00.000 | 86.32741554 | 86.295777039 | 0.9996335058 |
8 | 2025-05-28 23:00:00.000 | 30.097742606 | 30.084870319 | 0.9995723172 |
9 | 2025-05-28 20:00:00.000 | 22.823061793 | 22.813374037 | 0.9995755278 |
10 | 2025-05-28 19:00:00.000 | 7 | 6.99704061 | 0.9995772301 |
11 | 2025-05-28 18:00:00.000 | 15.260473127 | 15.254041973 | 0.9995785744 |
12 | 2025-05-28 17:00:00.000 | 7.86 | 7.856696801 | 0.9995797456 |
13 | 2025-05-28 16:00:00.000 | 13.803435203 | 13.797649651 | 0.9995808614 |
14 | 2025-05-28 14:00:00.000 | 19.726878007 | 19.718648009 | 0.9995828028 |
15 | 2025-05-28 13:00:00.000 | 5.665513255 | 5.66315617 | 0.9995839591 |
16 | 2025-05-28 12:00:00.000 | 12.21498153 | 12.209910817 | 0.9995848776 |
17 | 2025-05-28 11:00:00.000 | 6.019082075 | 6.016591548 | 0.9995862282 |
18 | 2025-05-28 09:00:00.000 | 55.984281678 | 55.964008965 | 0.9996378856 |
19 | 2025-05-28 08:00:00.000 | 384.532104776 | 384.389924455 | 0.9996302511 |
20 | 2025-05-28 04:00:00.000 | 142.627200213 | 142.6 | 0.9998092915 |
lidostETH to ETH rate
Updated 2 hours ago
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
›
⌄
⌄
/*
Base assumption:
stETH:ETH rate is determined primarily using the main stETH:ETH Curve pool because most of the protocols built their Price Oracles based on this pool.
*/
-- ETH->stETH swaps
with exchanges as (
SELECT
BLOCK_TIMESTAMP as time
, tx_hash
, case when token_in = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_in
when token_out = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84' then amount_out
end as steth_amount
, case when token_in = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' then amount_in
when token_out = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' then amount_out
end as eth_amount
FROM Ethereum.defi.ez_dex_swaps
where CONTRACT_ADDRESS = '0xdc24316b9ae028f1497c275eb9192a3ea0f67022'
AND steth_amount is NOT NULL
and eth_amount is NOT NULL
)
-- calculates the swap rate for the past 30 days
SELECT
date_trunc('hour', time) as time
, SUM(steth_amount) as steth_amount
, SUM(eth_amount) as eth_amount
, SUM(eth_amount)/ SUM(steth_amount) as rate
FROM exchanges
WHERE steth_amount > 2 -- filter for txns with minor quantities with screwed rate
and time >= current_date - interval '30 days'
GROUP by 1
ORDER by 1 DESC
Last run: about 2 hours agoAuto-refreshes every 24 hours
...
530
34KB
3s