binhachonYieldly HDL Distribution Pool Exploit - Function call frequency
Updated 2022-03-18
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
›
⌄
-- with 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_transaction as (
-- select
-- block_timestamp,
-- sender,
-- asset_amount/1e6 as stake_amount
-- from algorand.asset_transfer_transaction
-- where tx_group_id in (select tx_group_id from stake_tx_group_id)
-- and asset_receiver = '2SR4JKGDPSHIE27X2FNZKU34QS2SBK2HSGKHUJYRPOL5AXL5XI3TKY7JJI'
-- and asset_transferred = 137594422
-- )
with temp as (
select
sender,
coalesce(try_base64_decode_string(tx_message:txn:apaa[0]::string), 'Null') as function_call,
count(*) as freq
from algorand.application_call_transaction
where app_id = 596947890
group by sender, function_call
)
select
function_call,
round(freq, -1) as rounded_freq,
count(*)
from temp
where function_call not in ('opt_in_asset', 'lock_tokens')
group by function_call, rounded_freq
Run a query to Download Data