binhachonYieldly HDL Distribution Pool Exploit - Exploiter list
    Updated 2022-03-19
    with transaction_count as (
    select
    sender,
    count(*) as transaction_count
    from algorand.application_call_transaction
    where app_id = 596947890
    and coalesce(try_base64_decode_string(tx_message:txn:apaa[0]::string), 'Null') in ('stake', 'withdraw', 'withdraw_all')
    group by sender
    ),
    stake_tx_group_id as (
    select
    distinct tx_group_id
    from algorand.application_call_transaction
    where app_id = 596947890
    and coalesce(try_base64_decode_string(tx_message:txn:apaa[0]::string), 'Null') = 'stake'
    ),
    stake_stats as (
    select
    sender,
    sum(asset_amount)/1e6 as total_stake,
    avg(asset_amount)/1e6 as avg_stake
    from algorand.asset_transfer_transaction
    where tx_group_id in (select tx_group_id from stake_tx_group_id)
    group by sender
    ),
    withdraw_all_tx as (
    select
    distinct tx_id
    from algorand.application_call_transaction
    where app_id = 596947890
    and coalesce(try_base64_decode_string(tx_message:txn:apaa[0]::string), 'Null') = 'withdraw_all'
    ),
    withdraw_all_stats as (
    select
    sender,
    sum(tx_message:dt:itx[0]:txn:aamt::float)/1e6 as total_withdraw,
    Run a query to Download Data