KaskoazulGard.Money - ALGO backing
Updated 2022-04-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
›
⌄
with app_calls as (
select tx_group_id
from algorand.application_call_transaction
where app_id = '684650147'
and TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) IS NOT NULL --= 'NewPosition'--
),
collateral as (
select block_timestamp::date as fecha,
case receiver
when 'MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM' then 'fee'
else 'collateral'
end as payment,
sum (amount) as daily,
sum(daily) over (partition by payment order by fecha) as cum_payment
from algorand.payment_transaction
where tx_group_id in (select tx_group_id from app_calls)
group by fecha, payment
order by fecha desc
)
select fecha,
daily,
cum_payment as total
from collateral
where payment = 'collateral'
Run a query to Download Data