Query editor
-- Stonks Exchange — fee collections, both generations, one row per payout leg, priced in USD. Base-- view for both the daily fee chart and the lifetime counters.---- A collection pays out in BOTH pool tokens, so each event is unpivoted into one row per side.-- Keeping only "the quote side" would discard the coin half of every fee — which is the half that-- funds the buyback. The two lockers emit different events:---- V1 StonkFeeLocker2 0x71D1D363176723f85d98B8B430DF33cde89f0A7f-- FeesCollected(uint256 indexed tokenId, address indexed creator, address token0,-- address token1, uint256 lp0, uint256 lp1, uint256 platform0,-- uint256 platform1, uint256 creator0, uint256 creator1)-- V2 StonksExchangeFeeLockerV2 0x43555104f569D17026037E5637691b95c79fD03A-- FeesCollected(uint256 indexed tokenId, address indexed token, address quote,-- uint256 platformQuote, uint256 platformCoin, uint256 ownerQuote,-- uint256 ownerCoin, uint256 pendingAdded)---- V2 has no LP share, and its "creator" is the fee OWNER, whoever holds the stream today. Under-- quote-only the owner's coin is not paid at the collect: the locker holds it (`pendingAdded`) and-- sells it for quote later. It is counted here, at the collect, as fee income like the coin that is-- paid out; the later sale (`Converted`) and a release (`PendingReleased`) are not fees and are not-- read, so nothing is counted twice.---- Valued at the DAILY price. The asset list is every launched coin as well as the quotes, well over-- a thousand tokens, and a minute-exact mark on that many series costs far more than it adds.WITH v1 AS (SELECTblock_time,block_date,bytearray_to_uint256(topic1) AS token_id,bytearray_substring(topic2, 13, 20) AS creator_address,bytearray_substring(data, 13, 20) AS token0,bytearray_substring(data, 45, 20) AS token1,bytearray_to_uint256(bytearray_substring(data, 65, 32)) AS lp0,bytearray_to_uint256(bytearray_substring(data, 97, 32)) AS lp1,bytearray_to_uint256(bytearray_substring(data, 129, 32)) AS platform0,bytearray_to_uint256(bytearray_substring(data, 161, 32)) AS platform1,bytearray_to_uint256(bytearray_substring(data, 193, 32)) AS creator0,bytearray_to_uint256(bytearray_substring(data, 225, 32)) AS creator1FROM base.logsWHERE contract_address = 0x71D1D363176723f85d98B8B430DF33cde89f0A7fAND topic0 = 0x459620a42944682fc6a92e3e44054d9716be61dad6110471b65ea0baf54fc282AND block_date >= DATE '2026-08-17'),v2 AS (SELECTblock_time,block_date,bytearray_to_uint256(topic1) AS token_id,bytearray_substring(topic2, 13, 20) AS token,bytearray_substring(data, 13, 20) AS quote,bytearray_to_uint256(bytearray_substring(data, 33, 32)) AS platform_quote,bytearray_to_uint256(bytearray_substring(data, 65, 32)) AS platform_coin,bytearray_to_uint256(bytearray_substring(data, 97, 32)) AS owner_quote,bytearray_to_uint256(bytearray_substring(data, 129, 32)) AS owner_coin,bytearray_to_uint256(bytearray_substring(data, 161, 32)) AS pending_addedFROM base.logsWHERE contract_address = 0x43555104f569D17026037E5637691b95c79fD03AAND topic0 = 0xc02a4a664df2ad97a4ba97a2205f70bc33e68d41fb82c9d5ca21b220ac7c5c83AND block_date >= DATE '2026-09-21'