Query editor
-- indices: USD value of treasury market-buys per payout round, USDGBuyerDistributorV2-- (0x39ADB8acD07427D338b5f1AfAb436A04AbFdB7c4, deployer 0x89562Eb8979dB1E85A01E85120BFD6A7C47a39cb,-- discovered docs/research/2026-08-05-indices-contracts.md, board_decision "board9"). This is-- theindex.finance's live V2 payout engine: a keeper starts a "cycle" (CycleStarted event), then-- the contract spends its accumulated USDG on the basket's 18 tokenized stocks through the Rialto-- router (RialtoBought events; the V4FallbackBought path exists in the verified ABI but has never-- fired on this chain, 0 matching rows on a live topic0 count, 2026-08-06), before distributing-- the bought stock to INDEX holders (Distributed/BatchPaid events, out of scope for this query).---- "Payout round" = the CycleStarted at or immediately before each buy. There is no explicit round-- ID in the verified ABI, so this query derives it with a correlated latest-CycleStarted-before-buy-- join. Verified live on Blockscout and in the Dune editor: topic0 for-- RialtoBought(uint256 indexed stockIndex, address indexed router, uint256 usdgSpent, uint256 out)-- is 0xf7d4aa46a24281649ce58b70ad4ffbfe12550ccc89e8d1de426a1d1e2048e5b7 (14,156 rows live,-- 2026-07-28 through 2026-08-06); topic0 for CycleStarted(uint256 holders, uint256 eligible,-- uint256 stocks) is 0x0e41c903d4f464af8fdd82a2a195fb81a5b17cfe3a20585d2f10d0eeb1f1d33c (matches-- Blockscout's own decoded method_id 0e41c903 exactly; 201 rows live).---- USDG pricing: USDG on Robinhood Chain has several look-alike/scam tokens sharing the symbol-- (verified live via Blockscout token search, 2026-08-06); the real one is the admin-panel--- certified, ~3.48B circulating-market-cap "Global Dollar" at-- 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168, 6 decimals (confirmed both via the distributor's own-- token-balances list on Blockscout, which holds a real balance of this exact address alongside-- dust from several fake USDG tokens, and via a live prices.usd read in the Dune editor: minute,-- price ~1.0004, symbol USDG, decimals 6, same address). prices.usd is one of exactly two-- Robinhood-chain tokens with usable coverage per docs/notes/robinhood-schema.md section 2 (WETH-- and USDG), so this query prices usdg_spent through prices.usd on that address rather than-- assuming a 1:1 USD peg outright, with a coalesce fallback to a 1.0 rate (USDG is a stablecoin,-- so the fallback is a reasonable floor, not a guess) for any minute with no price row.---- Scope note: StockTreasury (the V1, ETH-denominated basket contract,-- 0x1604Ff11dFeAaC437077aEDA2FA492ac9EC804dF) is NOT included here. Its-- StocksBought(ethSpent, stockCount) event has no per-stock breakdown and no round marker-- equivalent to CycleStarted, so it cannot be joined into this "per payout round" shape without-- inventing a round boundary the contract itself does not expose. It remains active (8,625-- StocksBought events, 2026-07-03 through 2026-08-06 per a live Blockscout check the same day this-- query was written), so V1 buy volume is real but is not represented here; flagged rather than-- silently dropped.---- Data-start caveat: this product is new. USDGBuyerDistributorV2 first_tx 2026-07-28 19:40:13 UTC-- (Task 2's JSON). Event coverage cannot predate that deploy.-- last verified 2026-08-06with cycles as (select block_time as cycle_startfrom robinhood.logswhere contract_address = 0x39ADB8acD07427D338b5f1AfAb436A04AbFdB7c4and topic0 = 0x0e41c903d4f464af8fdd82a2a195fb81a5b17cfe3a20585d2f10d0eeb1f1d33c),buys as (selectblock_time,bytearray_to_uint256(bytearray_substring(data, 1, 32)) as usdg_spent_rawfrom robinhood.logswhere contract_address = 0x39ADB8acD07427D338b5f1AfAb436A04AbFdB7c4and topic0 = 0xf7d4aa46a24281649ce58b70ad4ffbfe12550ccc89e8d1de426a1d1e2048e5b7),buys_with_round as (selectb.block_time,b.usdg_spent_raw,