Rayyyk USD amount taken by the attackers
Updated 2022-06-10Copy Reference Fork
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 table_1 as (select block_timestamp,
liquidity_provider_address,
tx_id
from osmosis.core.fact_liquidity_provider_actions
where block_id >= '4707300' and block_id <= '4713064'
and tx_status = 'SUCCEEDED'
and action = 'pool_joined'),
table_2 as (select block_timestamp,
liquidity_provider_address,
tx_id
from osmosis.core.fact_liquidity_provider_actions
where block_id >= '4707300' and block_id <= '4713064'
and tx_status = 'SUCCEEDED'
and action = 'pool_exited'),
table_3 as (select a.liquidity_provider_address,
count(distinct(b.tx_id)) as join_exit_count
from table_1 a
join table_2 b on a.liquidity_provider_address = b.liquidity_provider_address
where b.block_timestamp > a.block_timestamp
group by 1
having join_exit_count > 1
order by 2 desc),
table_4 as (select b.liquidity_provider_address,
currency,
sum(amount/pow(10,decimal)) as joined_amount
from osmosis.core.fact_liquidity_provider_actions a
join table_3 b on a.liquidity_provider_address = b.liquidity_provider_address
where action = 'pool_joined'
group by 1,2),
table_5 as (select b.liquidity_provider_address,
currency,
sum(amount/pow(10,decimal)) as exited_amount
Run a query to Download Data