CryptoIcicleAlgomint Bridge - Mint over time
    Updated 2022-01-25
    -- Algomint is a centralized bridge that allows you to wrap your BTC and ETH to use in the Algorand ecosystem.
    -- They custody your BTC and ETH in return you receive goBTC and goETH.

    -- When the goBTC and goETH is ""minted"" by a wallet it is distributed from
    -- ETGSQKACKC56JWGMDAEP5S2JVQWRKTQUVKCZTMPNUGZLDVCWPY63LSI3H4 to the Algorand wallet.
    -- When a wallet wants to ""redeem"" their goETH and goBTC for their original asset, they send it back to the wallet it was distributed from.

    -- How much goBTC and goETH is currently in circulation?
    -- How many wallets have minted goBTC and goETH?
    -- How much goBTC and goETH has been redeemed by users over time?
    -- How much goBTC and goETH has been minted by users over time?
    -- If a user redeems their goBTC and goETH for their original asset do they redeem the whole amount or only a portion?

    -- Bonus: What is the average hold time for goBTC and goETH if a user does redeem their original asset?

    -- Asset IDs goBTC: 386192725 goETH: 386195940

    -- Payout 38.46 ALGO
    -- Grand Prize 115.38 ALGO
    -- Difficulty Beginner

    with
    mint_txns as (
    select
    b.block_timestamp,
    CASE
    WHEN t.asset_id = '386195940' THEN 'goETH'
    WHEN t.asset_id = '386192725' THEN 'goBTC'
    END as token,
    tx_message:txn:aamt/pow(10,6) as amount,
    tx_message:txn:arcv as receiver,
    sender
    from algorand.transactions t
    join algorand.block b on t.block_id = b.block_id
    where token is not null and amount > 0
    )
    Run a query to Download Data