neo_nguyenPendle x Lombard (Raw)
    Updated 2 days ago
    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: 1 day agoAuto-refreshes every 24 hours
    TIME
    CHAIN
    SY
    SYMBOL
    TVL
    TOTAL_TVL
    1
    2025-04-07 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-514729.96768624546885917.2395793
    2
    2025-04-07 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-995385.78799790212814574.9793611
    3
    2025-04-07 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-25078254.551468211169472.0022017
    4
    2025-04-07 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-834.1456578711143421.4026081
    5
    2025-03-31 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-55580.65211641147400647.2072655
    6
    2025-03-31 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-1621404.0689277836247726.5536699
    7
    2025-03-31 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-23037628.103886613809960.767359
    8
    2025-03-31 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-95706.0173475071144255.54826597
    9
    2025-03-24 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)1330380.8946332147456227.859382
    10
    2025-03-24 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)65519.10384338337869130.6225977
    11
    2025-03-24 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-118798306.15112536847588.8712456
    12
    2025-03-24 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-565168.4309696471239961.56561348
    13
    2025-03-17 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)9488723.40032346155645895.02237
    14
    2025-03-17 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-188968.38155723346125846.9647488
    15
    2025-03-17 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-171038.70331500237803611.5187543
    16
    2025-03-17 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-80025.3001251371805129.99658312
    17
    2025-03-10 00:00:00.000Ethereum0xc781c0cc527cb8c351be3a64c690216c535c6f36LBTC (Ether)-290179.122927485146157171.622047
    18
    2025-03-10 00:00:00.000Base0xb261266cb30c255cb9c73ebf4a3ead9398d23ab4LBTC (Base)-699982.29011915646314815.346306
    19
    2025-03-10 00:00:00.000Ethereum0xac614884b52dbab8728476b5d50f0d672baed31fLBTC (Bera Concrete)-169322.01371987737974650.2220693
    20
    2025-03-10 00:00:00.000Ethereum0x9d6ec7a7b051b32205f74b140a0fa6f09d7f223eLBTC (Corn)-252081.996528371885155.29670826
    92
    12KB
    86s