Updated 2025-02-28
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as price_usd
    from near.price.ez_prices_hourly
    where symbol = 'NEAR'
    group by 1
    ),

    stake_unstake as (
    select
    tx_hash,
    block_timestamp,
    'Stake' as action,
    signer_id as user,
    deposit / 1e24 as amount
    from near.core.fact_actions_events_function_call
    where receiver_id = 'meta-pool.near'
    and method_name = 'deposit_and_stake'
    and receipt_succeeded

    union all

    select
    tx_hash,
    block_timestamp,
    'Unstake' as action,
    signer_id as user,
    args:amount/1e24 as amount
    from near.core.fact_actions_events_function_call
    where receiver_id = 'meta-pool.near'
    and method_name in ('liquid_unstake', 'unstake', 'unstake_all')
    and receipt_succeeded = true
    ),
    Last run: 15 days ago
    TRANSACTIONS
    USERS
    STAKE_VOLUME
    UNSTAKE_VOLUME
    STAKE_VOLUME_USD
    UNSTAKE_VOLUME_USD
    TVL
    TVL_USD
    DAILY_AVERAE_TRANSACTIONS
    DAILY_AVERAE_USERS
    1
    978922097559200439.61367725657230.6560506374217735.03571159155660.35278233543208.957626497482608.274758676.0621616.297591
    1
    134B
    108s