Query editor
/*Aave V3 PT collateral health factor observations by PT market.Gold-standard exposure logic for this dashboard:1. Reconstruct supplied PT exposure using aToken Transfer events.2. Require the PT reserve to be enabled as collateral for the user.3. Join to observed getUserAccountData calls.Interpretation:This shows observed account-level health factors for accounts that were inferredto have PT collateral exposure at the time of the recorded getUserAccountData call.Important caveats:- This is still an observed interaction-level dataset, not a full live-state reconstruction.- getUserAccountData calls are only included when recorded in Dune decoded call tables.- Repeated calls can overweight frequently queried accounts.- Timestamp-level joins may not perfectly resolve ordering inside the same block/transaction.Parameter suggestions:{{hf_bin_size}} = 0.01{{hf_min}} = 0.00{{hf_max}} = 3.00{{blockchains}} = ethereum,arbitrum,base*/WITH params AS (SELECTCOALESCE(TRY_CAST('{{hf_bin_size}}' AS double), 0.01) AS hf_bin_size,COALESCE(TRY_CAST('{{hf_min}}' AS double), 0.00) AS hf_min,COALESCE(TRY_CAST('{{hf_max}}' AS double), 3.00) AS hf_max,COALESCE(NULLIF(NULLIF('{{blockchains}}', 'default value'), ''),'ethereum,plasma') AS blockchain_csv),chain_filter AS (SELECTLOWER(TRIM(chain_name)) AS asset_chainFROM paramsCROSS JOIN UNNEST(SPLIT(blockchain_csv, ',')) AS t(chain_name)),source_reserve_initialized AS (SELECTchain AS asset_chain,asset AS reserve,aToken AS atoken_address,evt_block_time AS reserve_listed_time,CAST(evt_block_time AS date) AS reserve_listed_dateFROM aave_v3_multichain.poolconfigurator_evt_reserveinitializedWHERE LOWER(chain) IN (SELECT asset_chain FROM chain_filter)),source_account_data AS (SELECTchain AS asset_chain,"user",