Query editor
-- ============================================================================-- Treehouse | tAsset Daily NAV — canonical base layer-- ------------------------------------------------------------------------------ Grain : one row per (day, tasset, chain)-- TVL : shares x rate(share->underlying) x price(underlying USD)---- ALWAYS filter counts_toward_protocol_total = true when summing to a-- protocol-wide number. See BRIDGE MODEL below.---- benchmark_per_share is the LST leg alone (wstETH->ETH, sAVAX->AVAX,-- kHYPE->HYPE). MEY = APY(underlying_per_share) - APY(benchmark_per_share),-- i.e. the premium a tAsset earns over simply holding the underlying LST.-- Exposed here so TVL, APY and MEY all derive from one series.---- Why NAV rather than tAsset market price: market price embeds secondary-market-- depegs, so a DEX liquidity event would render as a TVL crash even though-- vault assets were unchanged. NAV tracks assets under management, and is the-- only method that works for tHYPE, which has no price feed Dune indexes.---- RATE PATHS (each validated against the Treehouse app 2026-07-29):-- tETH : tETH -> wstETH (treehouse_asset_ethereum.teth_call_converttoassets)-- -> stETH ~ ETH (lido wrap/unwrap) -> USD (WETH price)-- tAVAX : tAVAX -> sAVAX (treehouse_asset_avalanche_c.tavax_call_converttoassets)-- -> AVAX (benqi getpooledavaxbyshares) -> USD (WAVAX price)-- tHYPE : tHYPE -> IAU_kHYPE (raw-log decode) -> kHYPE 1:1-- -> HYPE (kinetiq stakingaccountant_call_khypetohype) -> USD (WHYPE)---- tHYPE RATE VIA RAW LOGS: the tHYPE vault (0xb83d27f0...) is NOT decoded on-- Dune. Rate is decoded manually from hyperevm.logs ERC-4626 topics:-- Deposit 0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7-- Withdraw 0xfbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db-- Both carry data = assets(32) || shares(32), so rate = assets/shares.-- Verified 2026-07-28: raw-log rate 1.0003609990179176 == direct eth_call-- convertToAssets(1e18). Exact. tHYPE's asset() is IAU_kHYPE (0xad695ed1...),-- 1:1 with kHYPE -- confirmed because the chain reproduces the app's $301.04K-- to within 0.04%. No ABI submission required.---- SOURCE WARNING: supply comes from raw erc20_<chain>.evt_transfer, NOT-- tokens.transfers. The latter silently drops mints -- measured on-- tETH/ethereum: 63,057 mint rows vs 63,159 raw, i.e. 102 missing mints worth-- 27,538 tETH, which flipped reported supply negative. Do not simplify back.---- BRIDGE MODEL: tETH bridges LOCK-AND-RELEASE. Ethereum-side tETH bound for-- other chains is locked in tETHeLockReleaseTokenPool-- (0x8113f001ea456759264317007220cbc939ca8435), holding 214.31 tETH on-- 2026-07-29 = tETH on Arbitrum (185.45) + Base (25.66) + Avalanche (2.08) +-- TAC (0.007). Ethereum supply ALREADY INCLUDES bridged tETH, so per-chain-- supplies are NOT additive.-- -> tETH protocol total = Ethereum supply alone.-- -> Destination chains carry counts_toward_protocol_total = false.---- Day boundary: UTC midnight close. The tETH MEY queries elsewhere use a 13:00-- UTC (21:00 SGT) close to align daily *returns* with tETH's rate-posting-- cadence. Levels are boundary-insensitive; returns are not.---- SCOPE: Treehouse-operated vaults only. Excludes gtETH (Upshift) and TAC tETH-- (Turtle Club). cmETH on Mantle not yet included.-- ============================================================================WITH spine AS (