Ali3NBenqi Stake Transactions By Volume (Avalanche's Benqi vs Aptos's Amnis)
Updated 2025-02-22
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 avaxpricet as (
select hour::date as day,
avg(price) as avaxprice
from avalanche.price.ez_prices_hourly
where symbol = 'WAVAX'
group by 1),
aptospricet as (
select hour::date as day,
avg (price) as aptosprice
from aptos.price.ez_prices_hourly
where token_address ilike '0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::amapt_token::AmnisApt'
group by 1),
Staket as (
select tx_hash,
decoded_log:avaxAmount / 1e18 as Staked_Volume,
Staked_Volume*avaxprice as USD_Staked_Volume
from avalanche.core.ez_decoded_event_logs t1 join avaxpricet t2 on t1.block_timestamp::Date = t2.day
where contract_address = '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be'
and event_name ilike 'Submitted'),
amnistable1 as (
select t1.tx_hash,
coalesce (case when t1.event_resource = 'MintEvent' then t1.event_data:amount/1e8 end,0) as Staked_Volume,
Staked_Volume*aptosprice as USD_Staked_Volume
from aptos.core.fact_events t1 join aptos.core.fact_transactions t2 on t1.tx_hash = t2.tx_hash
join aptospricet t3 on t1.block_timestamp::Date = t3.day
where t1.event_resource = 'MintEvent' -- Stake
and t1.event_module = 'stapt_token' -- LSAPT
and t1.payload_function like '0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a%') -- LS
select 'Benqi' as platform,
case when USD_Staked_Volume < 10 then '< $10'
when usd_staked_Volume >= 10 and Usd_staked_volume < 100 then '$10 - $100'
when usd_staked_Volume >= 100 and Usd_staked_volume < 1000 then '$100 - $1,000'
Auto-refreshes every 24 hours
QueryRunArchived: QueryRun has been archived