adriaparcerisasBug Exploiters 3
    Updated 2022-06-10
    -- Of those who took advantage of the exploit, 4 entities are responsible for over 95% of the realized exploit amount.

    --What is the list of addresses that were explicitly exploiting the bug by doing multiple join/exits, i.e. who were the attackers?
    --What was the total dollar amount that was taken by the attackers? What amount of stolen assets in the attackers’ wallets remain on Osmosis?
    WITH
    joins as (
    select
    liquidity_provider_address,
    currency,
    sum(amount/pow(10,decimal)) as volume_joined,
    count(distinct tx_id) as joins
    from osmosis.core.fact_liquidity_provider_actions
    where block_id between 4707300 and 4713064 and action='pool_joined'
    group by 1,2
    ),
    exits as (
    select
    liquidity_provider_address,
    currency,
    sum(amount/pow(10,decimal)) as volume_exited,
    count(distinct tx_id) as exits
    from osmosis.core.fact_liquidity_provider_actions
    where block_id between 4707300 and 4713064 and action='pool_exited'
    group by 1,2
    ),
    prices as (
    SELECT
    symbol,
    avg(price) as price
    from osmosis.core.dim_prices
    where recorded_at>=CURRENT_DATE-1
    group by 1
    ),
    final as (
    SELECT
    x.liquidity_provider_address,
    Run a query to Download Data