neo_nguyenPendle fee btc
    Updated 2025-02-01
    with

    pendle_contract as( select * from $query('f797cc43-627c-4228-a233-b544f72d1526') ),
    pendle_oracle as( select * from $query('f90ce887-7773-43b6-ac7d-a666182c79e0') order by date desc limit 3),

    pendle_data as(
    select to_address as pool, amount, contract_address, block_timestamp from ethereum.core.ez_token_transfers union all
    select to_address as pool, amount, contract_address, block_timestamp from Base.core.ez_token_transfers union all
    select to_address as pool, amount, contract_address, block_timestamp from bsc.core.ez_token_transfers union all
    select to_address as pool, amount, contract_address, block_timestamp from arbitrum.core.ez_token_transfers union all
    select to_address as pool, amount, contract_address, block_timestamp from mantle.core.ez_token_transfers
    ),

    pendle_fee as(
    select date_trunc('week',block_timestamp - interval '72 hours' ) as epoch, sum(amount) balance
    from pendle_data tb1
    join pendle_contract tb2 on tb1.contract_address = tb2.sy
    where pool in ('0x8270400d528c34e1596ef367eedec99080a1b592','0xcbcb48e22622a3778b6f14c2f5d258ba026b05e6','0x5c30d3578a4d07a340650a76b9ae5df20d5bdf55','0xd77e9062c6df3f2d1cb5bf45855fa1e7712a059e')
    and category = 'BTC'
    group by 1)

    select * from pendle_fee
    order by epoch desc










    Last run: 2 months ago
    EPOCH
    BALANCE
    1
    2025-01-27 00:00:00.0000.190367313
    2
    2025-01-20 00:00:00.0000.430365841
    3
    2025-01-13 00:00:00.0000.48433701
    4
    2025-01-06 00:00:00.0000.5176443144
    5
    2024-12-30 00:00:00.0000.3790670122
    6
    2024-12-23 00:00:00.0000.5625298855
    7
    2024-12-16 00:00:00.0000.2205902703
    8
    2024-12-09 00:00:00.0000.1884362915
    9
    2024-12-02 00:00:00.0000.1983405468
    10
    2024-11-25 00:00:00.0000.1192749796
    11
    2024-11-18 00:00:00.0000.07764959309
    12
    2024-11-11 00:00:00.0000.09681080824
    13
    2024-11-04 00:00:00.0000.1181066492
    14
    2024-10-28 00:00:00.0000.1566148247
    15
    2024-10-21 00:00:00.0000.2026525545
    16
    2024-10-14 00:00:00.0000.2403835048
    17
    2024-10-07 00:00:00.0000.1946567436
    18
    2024-09-30 00:00:00.0000.2973430397
    19
    2024-09-23 00:00:00.0000.1843654979
    20
    2024-09-16 00:00:00.0000.2424390657
    24
    975B
    32s