Query editor
-- Corrected comprehensive FXRP opportunity registry for Dune query 7964124.-- Expected rows are driven by on-chain factory events and explicit product anchors.-- HTTP/API data is LEFT JOINED only: a source failure yields NULL metrics, never a missing row.-- Every published rate is APY. APR inputs use daily compounding:-- APY = 100 * ((1 + APR_percent / 100 / 365)^365 - 1).-- Opportunity TVLs are gross and non-additive because wrappers/vaults can route into other rows.-- Upshift rates come from the August Digital per-vault API, one call per tokenized-vault anchor.-- (2026-10-19: app.upshift.finance/api/proxy/vaults began 307-redirecting to itself; the full-- /tokenized_vault list is ~12.7 MB, over the 4 MiB http_get cap, so it cannot be used either.)-- 2026-11-23: Firelight rate = Firelight's own published staker_apr_pct (query 8946613, Firelight team, public):-- 30-day trailing share-price growth, simple-annualised (x 365/30), premiums + incentives. Used as the row's-- APY by request, without APR->APY compounding. TVL stays our on-chain active totalAssets x FXRP price,-- and the 10-day no-checkpoint stale rule still applies (fl.source_timestamp = our latest checkpoint).-- 2026-11-17: a rate we cannot trust is left EMPTY, not shown. Steer's own fee APR annualises a very short window-- (FXRP/USDT0 vaults reported 241-385% APR fee-only while the whole SparkDEX FXRP/USDT0 pool earns ~28%):-- a Steer fee + reward APR above 100% now yields source_status = 'implausible_source_rate' and NULL APY columns.-- 2026-11-16: Morpho / Mystic Core FXRP (0x5318…, symbol CSXRP) moved off api.mysticfinance.xyz/morphocache (now 401,-- API key required) to DefiLlama pool ae77c3b6 (its url names this vault); rate = 30-day trailing APY of the-- DefiLlama pricePerShare history, same window as Upshift/Firelight (DefiLlama's own daily apy is jumpy).-- 2026-11-16: Firelight (stXRP) has paid real yield since v2 (2026-10-06); its row is no longer points-only.-- Rate = 30-day trailing APY of the on-chain share price (TotalAssetsCheckpointed / stXRP supply), no HTTP.-- TVL = active totalAssets (earning FXRP, excludes the withdrawal queue) x latest hourly FXRP price.-- 2026-11-10: per-vault http_get intermittently fails for one vault (Monarq row went source_unavailable-- while the API answered fine); upshift_raw now retries once with a ?retry=1 cache-buster.WITHparams AS (SELECT0xad552a648c74d49e10027ab8a618a3ad4901c5be AS fxrp,'0xad552a648c74d49e10027ab8a618a3ad4901c5be' AS fxrp_text),token_labels AS (SELECTLOWER(CAST(contract_address AS VARCHAR)) AS token_address,MAX(symbol) AS symbolFROM tokens.erc20WHERE blockchain = 'flare'GROUP BY 1),spark_v3_expected AS (SELECT'SparkDEX' AS protocol,CAST(NULL AS VARCHAR) AS curator,'FXRP / ' || COALESCE(tl.symbol, LOWER(CAST(CASE WHEN e.token0 = p.fxrp THEN e.token1 ELSE e.token0 END AS VARCHAR))) AS market,'sparkdex-v3.1-native' AS market_version,LOWER(CAST(e.pool AS VARCHAR)) AS pool_address,LOWER(CAST(e.pool AS VARCHAR)) AS source_pool_id,LOWER(CAST(CASE WHEN e.token0 = p.fxrp THEN e.token1 ELSE e.token0 END AS VARCHAR)) AS other_token,'FXRP' AS required_asset,'amm_pair_asset' AS fxrp_role,e.evt_block_time AS discovered_at,'sparkdex_v3_factory_event' AS opportunity_sourceFROM sparkdex_flare.uniswapv3factory_evt_poolcreated eCROSS JOIN params pLEFT JOIN token_labels tlON tl.token_address = LOWER(CAST(CASE WHEN e.token0 = p.fxrp THEN e.token1 ELSE e.token0 END AS VARCHAR