0-MID Exploit $Amount By EXP.NO2
Updated 2023-02-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with act1 as (
with tab1 as (
select LIQUIDITY_PROVIDER_ADDRESS,AMOUNT/1e6 as first_amount
from osmosis.core.fact_liquidity_provider_actions
where POOL_ID[0]='678'
and LIQUIDITY_PROVIDER_ADDRESS in
('osmo1v44mqmhvtn8cw373xv0hw6npddccnr70lqsk9s')
and BLOCK_ID='4712961'
and CURRENCY='uosmo'
and ACTION in ('pool_joined')),
tab2 as (
select LIQUIDITY_PROVIDER_ADDRESS,AMOUNT/1e6 as last_amount
from osmosis.core.fact_liquidity_provider_actions
where POOL_ID[0]='678'
and LIQUIDITY_PROVIDER_ADDRESS in
('osmo1v44mqmhvtn8cw373xv0hw6npddccnr70lqsk9s')
and BLOCK_ID='4713052'
and CURRENCY='uosmo'
and ACTION in ('pool_exited'))
select tab2.LIQUIDITY_PROVIDER_ADDRESS
,last_amount-first_amount as net_exploited
from tab1
left join tab2
on tab1.LIQUIDITY_PROVIDER_ADDRESS=tab2.LIQUIDITY_PROVIDER_ADDRESS),
act2 as (
select RECORDED_HOUR::date as date
,avg(PRICE) as usd_price
from osmosis.core.ez_prices
where date='2022-06-08'
and SYMBOL='OSMO'
group by 1)
select LIQUIDITY_PROVIDER_ADDRESS
,net_exploited*usd_price as net_usd
from act1
full outer join act2
on act1.net_exploited<>act2.usd_price
Run a query to Download Data