Query editor
-- OETH full-history optimization pass 13; reference query 8668164.-- Complete UTC days, actual closing blocks, original 28 column names/types.-- Latest execution validation and measured credits are recorded in the query description.-- Early rebasing modes use decoded opt-in/out calls with exact raw execution metadata.-- All 25 calls before block 18872285 match raw history; that fixed window has zero governance opt-ins.-- Candidate call dates also prune trace metadata; no raw calldata scan is needed here.-- Historical dripper trace checks are pruned to decoded candidate dates;-- exact trace identity, success, transaction success and call type are unchanged.-- Curve Newton loops skip completed groups; all iteration indices 1..255, integer-- formulas, rounding, convergence checks and the maximum iteration count are unchanged.-- Decoded sources provide OETH/wOETH/WETH events, vault events, Curve events/calls,-- historical dripper calls and four native-staking event tables, with original filters.-- ConsolidationConfirmed uses raw indexed logs for all actors/dates: the decoded table-- omitted three March 2026 events. No per-date/per-address repair or fitted amounts.-- Other raw inputs remain for rebasing modes/upgrades, Convex, uncovered native events-- and the Curve unknown-event guard. Decoded calls retain exact raw execution checks.-- Wrapper initialization uses two historical indexed call outputs with upgrade/trace-- identity checks; these are Dune data, not RPC reads or holder-balance enumeration.-- Supernova uses decoded pool Transfer/Sync and gauge Deposit/Withdraw events.-- Its complete fixed historical window is checked against raw event identities/payloads.-- All reserve, stake, supply, state-block and principal calculations remain unchanged.-- Wrapper returns replayed credits or initialization factor; the final rate uses core-- CPT/share supply with unchanged signed/unsigned arithmetic and division order.-- Event core is consumed once; final dripper surplus subtracts that same total supply.-- Closing blocks come from the price component's complete block calendar; missing-- price rows cannot remove days because that component LEFT JOINs its price source.-- PRICE SOURCE: prices_external.minute, Coinpaprika native ETH/USD, ETH:WETH = 1:1.-- Latest minute at/before the closing block affects ONLY rate_usd and market_cap_usd.-- peg is temporarily skipped; accounts_over_threshold is deferred; both remain NULL.-- Documented SQD differences are retained; September 8-10 supply-split cause is unresolved.-- No RPC/HTTP/Chainlink/SQD inputs, incremental checkpoint or materialized view.-- Maintained in local named SQL sections; assembled into ONE Dune query.-- CTE names describe their purpose; no saved-query views or result caches are introduced.WITH-- Indexed source adaptersopt_core_oeth_mints AS (SELECT evt_block_time AS block_time,evt_block_date AS block_date, evt_block_number AS block_number,evt_tx_index AS tx_index,CAST(evt_index AS integer) AS index, evt_tx_hash AS tx_hash,contract_address,keccak(to_utf8('Transfer(address,address,uint256)')) AS topic0, concat(0x000000000000000000000000,"from") AS topic1,concat(0x000000000000000000000000,"to") AS topic2,CAST(CAST(value AS uint256) AS varbinary) AS dataFROM origin_protocol_ethereum.oeth_evt_transferWHERE contract_address = 0x856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3AND evt_block_date >= DATE '2023-03-29'AND evt_block_date < current_dateAND ("from" = 0x0000000000000000000000000000000000000000OR "to" = 0x0000000000000000000000000000000000000000)),opt_core_woeth_mints AS (SELECT evt_block_time AS block_time,evt_block_date AS block_date, evt_block_number AS block_number,evt_tx_index AS tx_index,CAST(evt_index AS integer) AS index, evt_tx_hash AS tx_hash,contract_address,keccak(to_utf8('Transfer(address,address,uint256)')) AS topic0, concat(0x000000000000000000000000,"from") AS topic1,concat(0x000000000000000000000000,"to") AS topic2,CAST(CAST(value AS uint256) AS varbinary) AS dataFROM origin_protocol_ethereum.woeth_evt_transferWHERE contract_address = 0xdcee70654261af21c44c093c300ed3bb97b78192AND evt_block_date >= DATE '2023-03-29'AND evt_block_date < current_dateAND ("from" = 0x0000000000000000000000000000000000000000OR "to" = 0x0000000000000000000000000000000000000000)),opt_oeth_transfers AS (