neo_nguyenPendle x Lombard (Raw)
    Updated 2025-05-12
    with

    pendle_pool as( select chain, protocol, symbol, sy, mk, price from $query('f90ce887-7773-43b6-ac7d-a666182c79e0') group by 1,2,3,4,5,6 ),

    pendle_ethereum as(
    select from_address as pool, case when amount is null then raw_amount/1e18 else amount end amount, contract_address, block_timestamp from ethereum.core.ez_token_transfers union all
    select to_address as pool, case when amount is null then 0-raw_amount/1e18 else 0-amount end amount, contract_address, block_timestamp from ethereum.core.ez_token_transfers ),

    pendle_base as(
    select from_address as pool, case when amount is null then raw_amount/1e18 else amount end amount, contract_address, block_timestamp from base.core.ez_token_transfers union all
    select to_address as pool, case when amount is null then 0-raw_amount/1e18 else 0-amount end amount, contract_address, block_timestamp from base.core.ez_token_transfers ),

    pendle_ethereum_tvl as(
    select date_trunc('week',block_timestamp) time, chain, protocol, symbol, sy, sum(amount*price) tvl
    from pendle_ethereum tb1
    join pendle_pool tb2 on tb1.contract_address = tb2.sy and tb1.pool = '0x0000000000000000000000000000000000000000'
    where chain = 'Ethereum' and symbol like '%LBTC%'
    group by 1,2,3,4,5),

    pendle_base_tvl as(
    select date_trunc('week',block_timestamp) time, chain, protocol, symbol, sy, sum(amount*price) tvl
    from pendle_base tb1
    join pendle_pool tb2 on tb1.contract_address = tb2.sy and tb1.pool = '0x0000000000000000000000000000000000000000'
    where chain = 'Base' and symbol like '%LBTC%'
    group by 1,2,3,4,5),

    pendle_protocol as(
    select * from pendle_ethereum_tvl union all
    select * from pendle_base_tvl)

    select
    time, chain, sy,
    case when symbol = 'LBTC' and chain = 'Ethereum' then 'LBTC (Ether)'
    when symbol = 'LBTC' and chain = 'Base' then 'LBTC (Base)'
    else symbol end symbol,
    tvl,
    Last run: 13 days agoAuto-refreshes every 24 hours
    TIME
    CHAIN
    SY
    SYMBOL
    TVL
    TOTAL_TVL
    1
    2025-05-12 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)14281.92429855659498015.4272775
    2
    2025-05-12 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-15659.36039037415415070.8449731
    3
    2025-05-12 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-10383.008641877876545.143845705
    4
    2025-05-05 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-256006.23087062559483733.502979
    5
    2025-05-05 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)255219.87668624315430730.2053635
    6
    2025-05-05 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-415040.307116412969965.211202197
    7
    2025-05-05 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-2200171.0885544886928.152487582
    8
    2025-04-28 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)276391.00374980859739739.7338496
    9
    2025-04-28 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-741148.24822454115175510.3286772
    10
    2025-04-28 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-119701.2571467833087099.24104198
    11
    2025-04-28 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-2907.1616082521385005.51831861
    12
    2025-04-21 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-962848.56566754459463348.7300998
    13
    2025-04-21 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)143187.49635482615916658.5769018
    14
    2025-04-21 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-156972.9365365543206800.49818877
    15
    2025-04-21 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-33387.8365240561387912.67992686
    16
    2025-04-14 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)656561.52710481960426197.2957673
    17
    2025-04-14 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-2072498.7757852615773471.0805469
    18
    2025-04-14 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-2947622.198251973363773.43472532
    19
    2025-04-14 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-22610.6006697911421300.51645092
    20
    2025-04-07 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-394005.23583842559769635.7686625
    ...
    111
    14KB
    123s