hbd19941. Nereus Finance at a Glance
Updated 2023-10-28
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 prices as (
select
hour,
case
when symbol = 'USDC' then 'aBasUSDbC'
when symbol = 'WETH' then 'aBasWETH'
when symbol = 'cbETH' then 'aBascbETH'
end as symbol,
price
from ethereum.price.ez_hourly_token_prices
where symbol in ('USDC','WETH','cbETH')
and hour >= '2023-08-22'),
aBasWETH as (
select
date(block_timestamp) as date,
sum(case when EVENT_NAME = 'Mint' then DECODED_LOG:value / pow(10,18) end) as mint_amount,
sum(case when EVENT_NAME = 'Burn' then (DECODED_LOG:value / pow(10,18) * (-1)) end) as burn_amount,
(mint_amount + burn_amount) as supply,
sum(supply) over (order by date) as total_supply
from base.core.ez_decoded_event_logs
where CONTRACT_ADDRESS = '0xd4a0e0b9149bcee3c920d2e00b5de09138fd8bb7'
and EVENT_NAME in ('Burn','Mint')
group by 1
order by 1),
aBascbETH as (
select
date(block_timestamp) as date,
sum(case when EVENT_NAME = 'Mint' then DECODED_LOG:value / pow(10,18) end) as mint_amount,
sum(case when EVENT_NAME = 'Burn' then (DECODED_LOG:value / pow(10,18) * (-1)) end) as burn_amount,
(mint_amount + burn_amount) as supply,
sum(supply) over (order by date) as total_supply
from base.core.ez_decoded_event_logs
Run a query to Download Data