pietrektAverage LP age
    Updated 15 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 15 hours agoAuto-refreshes every 24 hours
    DAY
    ASSET_NAME
    AVG_LP_AGE_IN_POOL
    AVG_LP_AGE
    1
    2025-04-08 00:00:00.000STABLECOIN519.760965686.851292272727
    2
    2025-04-08 00:00:00.000BCH.BCH929.58794686.851292272727
    3
    2025-04-08 00:00:00.000DOGE.DOGE798.339109686.851292272727
    4
    2025-04-08 00:00:00.000GAIA.ATOM668.248649686.851292272727
    5
    2025-04-08 00:00:00.000BSC.BNB366.211429686.851292272727
    6
    2025-04-08 00:00:00.000BTC.BTC933.218706686.851292272727
    7
    2025-04-08 00:00:00.000BASE.ETH80.333333686.851292272727
    8
    2025-04-08 00:00:00.000AVAX.AVAX506.938697686.851292272727
    9
    2025-04-08 00:00:00.000ETH.ETH908.949256686.851292272727
    10
    2025-04-08 00:00:00.000Others895.283984686.851292272727
    11
    2025-04-08 00:00:00.000LTC.LTC948.492147686.851292272727
    12
    2025-04-07 00:00:00.000STABLECOIN518.406353686.000799272727
    13
    2025-04-07 00:00:00.000DOGE.DOGE797.339109686.000799272727
    14
    2025-04-07 00:00:00.000BTC.BTC932.218706686.000799272727
    15
    2025-04-07 00:00:00.000BASE.ETH79.647059686.000799272727
    16
    2025-04-07 00:00:00.000AVAX.AVAX505.938697686.000799272727
    17
    2025-04-07 00:00:00.000BSC.BNB365.211429686.000799272727
    18
    2025-04-07 00:00:00.000BCH.BCH928.58794686.000799272727
    19
    2025-04-07 00:00:00.000ETH.ETH910.413161686.000799272727
    20
    2025-04-07 00:00:00.000GAIA.ATOM667.248649686.000799272727
    ...
    13246
    808KB
    8s