phu52. total loss from the hack
    Updated 2022-10-23
    with
    hack_tx_cte as (
    select
    tx_group_id
    , tx_message:txn:apas[0] asset1_id
    , tx_message:txn:apas[1] liq_asset_id
    , tx_message:txn:apaa[0] function_called
    from flipside_prod_db.algorand.application_call_transaction
    where 1=1
    and app_id = 350338509 -- Tinyman AMM V1.0
    and function_called = 'YnVybg==' -- burn
    and asset1_id in (386192725, 386195940) -- goBTC, goETH
    and asset1_id = liq_asset_id
    and block_timestamp >= '2022-01-01 19:03:23.000' -- first hack
    and block_timestamp <= '2022-01-08 11:47:58.000' -- last hack
    )
    , price_cte as (
    select
    asset_name
    , block_hour
    , price_usd
    from flipside_prod_db.algorand.prices_swap
    where 1=1
    and asset_id in (386192725, 386195940) -- goBTC, goETH
    )
    , hack_amount_cte as (
    select
    block_timestamp
    , block_timestamp::date date
    , row_number() over(partition by tx_group_id order by intra) event_no
    , tx_type_name event_name
    , a.tx_group_id
    , asset_sender
    , receiver
    , c.asset_name
    , amount
    Run a query to Download Data