pietrektAverage LP age
    Updated 24 hours ago
    WITH deposit_units AS (
    SELECT block_timestamp,
    CASE
    WHEN tx_id is not null then tx_id
    ELSE asset_tx_id
    END as tx_id,
    CASE
    WHEN from_address is not null THEN from_address
    ELSE asset_address
    END as address,
    pool_name, stake_units, asset_amount, rune_amount, 1 as type
    FROM thorchain.defi.fact_liquidity_actions
    WHERE lp_action = 'add_liquidity' and pool_name like '%.%'
    ),
    withdraw_units AS (
    SELECT block_timestamp,
    CASE
    WHEN tx_id is not null then tx_id
    ELSE asset_tx_id
    END as tx_id,
    CASE
    WHEN from_address is not null THEN from_address
    ELSE asset_address
    END as address, pool_name, -rune_amount as rune_amount, -asset_amount as asset_amount, -stake_units as stake_units, 0 as type
    FROM thorchain.defi.fact_liquidity_actions WHERE lp_action = 'remove_liquidity' and pool_name like '%.%'
    ),
    unioned_units AS (
    SELECT block_timestamp, tx_id, address, pool_name, stake_units, asset_amount, rune_amount, type FROM deposit_units
    UNION
    SELECT block_timestamp, tx_id, address, pool_name, stake_units, asset_amount, rune_amount, type FROM withdraw_units
    ),
    pool_depths AS (SELECT day,
    asset as pool_name
    FROM thorchain.defi.fact_pool_block_statistics
    WHERE (pool_name LIKE '%.%')),
    Last run: about 24 hours agoAuto-refreshes every 24 hours
    DAY
    ASSET_NAME
    AVG_LP_AGE_IN_POOL
    AVG_LP_AGE
    1
    2025-05-21 00:00:00.000LTC.LTC993.294737740.498838363636
    2
    2025-05-21 00:00:00.000DOGE.DOGE842.012469740.498838363636
    3
    2025-05-21 00:00:00.000BSC.BNB413.071429740.498838363636
    4
    2025-05-21 00:00:00.000BCH.BCH981.162437740.498838363636
    5
    2025-05-21 00:00:00.000STABLECOIN556.628191740.498838363636
    6
    2025-05-21 00:00:00.000BASE.ETH116.0625740.498838363636
    7
    2025-05-21 00:00:00.000ETH.ETH956.925394740.498838363636
    8
    2025-05-21 00:00:00.000BTC.BTC978.800923740.498838363636
    9
    2025-05-21 00:00:00.000AVAX.AVAX547.290698740.498838363636
    10
    2025-05-21 00:00:00.000Others1047.358663740.498838363636
    11
    2025-05-21 00:00:00.000GAIA.ATOM712.879781740.498838363636
    12
    2025-05-20 00:00:00.000ETH.ETH955.925394729.150538454545
    13
    2025-05-20 00:00:00.000AVAX.AVAX546.290698729.150538454545
    14
    2025-05-20 00:00:00.000BSC.BNB412.071429729.150538454545
    15
    2025-05-20 00:00:00.000BTC.BTC977.800923729.150538454545
    16
    2025-05-20 00:00:00.000STABLECOIN557.079911729.150538454545
    17
    2025-05-20 00:00:00.000LTC.LTC992.294737729.150538454545
    18
    2025-05-20 00:00:00.000Others931.075644729.150538454545
    19
    2025-05-20 00:00:00.000BCH.BCH980.162437729.150538454545
    20
    2025-05-20 00:00:00.000BASE.ETH115.0625729.150538454545
    ...
    13719
    839KB
    8s