ArioBONK Holders Activity - Lending platform
    Updated 2025-01-16
    with address_balance as (
    select
    OWNER,
    BALANCE,
    row_number() over(partition by owner order by block_timestamp desc) as rank
    from solana.core.fact_token_balances
    where SUCCEEDED
    and mint = 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
    ),
    Holders as (
    select owner as Holder_Address,
    BALANCE
    from address_balance
    where balance > 0
    and rank = 1
    )
    select
    Program_id,
    case when Program_id = 'zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25' then 'Mango'
    when Program_id = 'abfcSQac2vK2Pa6UAJb37DzarVxF15bDTdphJzAqYYp' then 'abfcS...qYYp'
    else Label end as Project,
    count(DISTINCT tx_id) as N_TXs,
    count(DISTINCT signers[0]) as N_Users,
    N_Users / (select count(DISTINCT Holder_Address) from Holders) * 100 as PCT_OF_HOLDERS
    from solana.core.ez_events_decoded
    left join solana.core.dim_labels on ez_events_decoded.program_id = dim_labels.ADDRESS
    where signers[0] in (select Holder_Address from Holders)
    and block_timestamp >= current_timestamp - interval '30 Days'
    and SUCCEEDED
    and EVENT_TYPE in (
    'depositReserveLiquidityAndObligationCollateral',
    'withdrawObligationCollateralAndRedeemReserveCollateral',
    'lendingAccountWithdraw',
    'lendingAccountDeposit',
    'lendingAccountWithdrawEmissions',
    'lendingAccountBorrow',
    Last run: 3 months ago
    PROGRAM_ID
    PROJECT
    N_TXS
    N_USERS
    PCT_OF_HOLDERS
    1
    MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacAmarginfi29732139040.4423
    2
    KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjDkamino23282366910.7581
    3
    SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELPsharky93573300.0374
    4
    4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVgmango markets35362730.0309
    5
    RainEraPU5yDoJmTrHdYynK9739GkEfDsE4ffqce2BRrain finance23123110.0352
    6
    4tdmkuY6EStxbS6Y8s5ueznL3VPMSugrvQuDeAHGZhStbanx802700.0079
    7
    JCFRaPv7852ESRwJJGRy2mysUMydXZgVVhrMLmExvmVpfamous foxes702380.0043
    8
    EHBN9YKtMmrZhj8JZqyBQRGqyyeHw5xUB1Q5eAHszuMtnx finance3021420.0161
    9
    abfcSQac2vK2Pa6UAJb37DzarVxF15bDTdphJzAqYYpabfcS...qYYp216890.0101
    10
    zF2vSz6V9g1YHGmfrzsY497NJzbRr84QUrPry4bLQ25Mango660.0007
    10
    757B
    691s