binhachonGard.Money Algorand’s First Algorithmic Stablecoin - Collaterals
    Updated 2022-04-23
    with mint_transaction as (
    select
    distinct tx_group_id
    from algorand.asset_transfer_transaction
    where asset_transferred = 684649988
    and sender = 'J2E2XXS4FTW3POVNZIHRIHTFRGOWEWX65NFYIVYIA27HUK63NWT65OLB2Y'
    ),
    collateral_transaction as (
    select
    block_timestamp,
    amount
    from algorand.payment_transaction
    where tx_group_id in (select tx_group_id from mint_transaction)
    and receiver != 'MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM'
    )
    select
    date_trunc('day', block_timestamp) as time,
    sum(amount) as daily_amount,
    sum(daily_amount) over (order by time) as total_collaterals
    from collateral_transaction
    group by 1


    Run a query to Download Data