Query editor
-- Navi Per-Asset Reserve State (V11, Main market) | RPC-free-- Mysten deprecated JSON-RPC on public fullnodes (2026-07). V8.1's 4-stage pipeline-- (suix_getDynamicFields, sui_multiGetObjects, 35x suix_getCoinMetadata, Pyth Hermes) is entirely dead.-- Rebuilt from sui.objects. Column names preserved so existing dashboard panels keep binding.---- NOT real-time: latest written state from sui.objects, subject to Dune ingestion lag.-- last_updated_at is the on-chain reserve timestamp; state_age_hours is the observed ingestion lag.-- LOST COLUMNS: full_name and token_decimals came only from suix_getCoinMetadata and have no native-- equivalent. They are kept as NULL rather than dropped, so panels referencing them do not break.-- SYMBOLS: `::coin::COIN` types are resolved by a static map (7 entries, full coverage of Main today).-- A new bridged COIN asset would surface as 'COIN' until added.-- IDENTITY PINS: storage pkg 0xd899cf7d..., event pkg 0x1e4a13a0..., oracle pkg 0xca441b44...,-- oracle table 0xc0601fac... Three other packages fork Navi's storage module; the pin excludes them.-- PRICING: navi_oracle only, the oracle Navi uses for its own accounting and liquidations.-- Replaces V8.1's prices.hour -> Pyth -> $1 cascade. FAIL-LOUD: no price -> NULL, 'unmatched'.WITHstorages AS (SELECT object_id AS storage_id, max_by(object_json, version) AS object_jsonFROM sui.objectsWHERE date >= CURRENT_DATE - INTERVAL '7' DAYAND type_ = '0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::Storage'GROUP BY object_id),storage_meta AS (SELECT storage_id, from_hex(substr(json_extract_scalar(object_json,'$.reserves.id.id'),3)) AS reserves_table_idFROM storages),market_storage AS (SELECT DISTINCT t.object_id AS storage_idFROM sui.events eJOIN sui.transaction_objects tON t.transaction_digest = e.transaction_digest AND t.date = e.dateWHERE e.event_type = '0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::MarketCreated'AND e.date >= DATE '2025-01-01'AND t.object_status = 'Created'),-- Main is the one Navi Storage with no MarketCreated event: it predates isolated markets.main_reserves_table AS (SELECT sm.reserves_table_idFROM storage_meta smLEFT JOIN market_storage ms ON ms.storage_id = sm.storage_idWHERE ms.storage_id IS NULL),reserve_peak AS (SELECT object_id, max(version) AS versionFROM sui.objectsWHERE date >= CURRENT_DATE - INTERVAL '14' DAYAND type_ = '0x2::dynamic_field::Field<u8, 0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::ReserveData>'GROUP BY object_id),reserve_snap AS (SELECT o.object_id,arbitrary(o.owner_address) AS owner_address,arbitrary(o.object_json) AS object_json,max(o.timestamp_ms) AS observed_msFROM sui.objects oJOIN reserve_peak p ON o.object_id = p.object_id AND o.version = p.versionWHERE o.date >= CURRENT_DATE - INTERVAL '14' DAYAND o.type_ = '0x2::dynamic_field::Field<u8, 0xd899cf7d2b5db716bd2cf55599fb0d5ee38a3061e7b6bb6eebf73fa5bc4c81ca::storage::ReserveData>'