Query editor
-- Cumulative net FXRP in the Firelight vault (stXRP, 0x4C18…B2b3): smart accounts vs other users.-- Firelight sibling of 8549404 (ClearStar Deposits) / 8549407 (Monarq Deposits) on fasset-overview, same columns.---- deposits = Deposit.assets; smart account = Deposit.owner (share recipient) is a Flare Smart Account-- (MasterAccountController PersonalAccountCreated). Catches both the MAC-instruction path and the-- direct-mint memo path, which deposits from the personal account in the same tx.-- withdrawals = WithdrawRequest.assets, keyed on owner, counted at REQUEST time: v2 holds exits 30-60 days-- before CompleteWithdraw, and the request is when the FXRP stops being active TVL (team convention-- since 2026-11-26). ERC-4626 Withdraw is never emitted by this vault.-- Net flows only, like the Upshift siblings: yield pushes (VaultRewardDistributor) are not deposits and are excluded.---- smart_account_net_fxrp + other_net_fxrp = total_net_fxrpWITH smart_accounts AS (SELECT DISTINCT personalAccount AS addressFROM fassets_flare.masteraccountcontroller_evt_personalaccountcreatedWHERE evt_block_date >= date '2025-01-01'),flows AS (SELECTDATE_TRUNC('day', d.evt_block_time) AS day,d.owner AS account,CAST(d.assets AS double) / 1e6 AS net_fxrpFROM firelight_flare.firelightvault_evt_deposit dWHERE d.evt_block_date >= date '2025-12-01'AND d.contract_address = 0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3UNION ALLSELECTDATE_TRUNC('day', w.evt_block_time),w.owner,-CAST(w.assets AS double) / 1e6FROM firelight_flare.firelightvault_evt_withdrawrequest wWHERE w.evt_block_date >= date '2025-12-01'AND w.contract_address = 0x4c18ff3c89632c3dd62e796c0afa5c07c4c1b2b3),daily AS (SELECTf.day,SUM(CASE WHEN sa.address IS NOT NULL THEN f.net_fxrp ELSE 0 END) AS sa_net,SUM(f.net_fxrp) AS total_netFROM flows fLEFT JOIN smart_accounts sa ON sa.address = f.accountGROUP BY f.day)SELECTday,SUM(sa_net) OVER (ORDER BY day) AS smart_account_net_fxrp,SUM(total_net) OVER (ORDER BY day) - SUM(sa_net) OVER (ORDER BY day) AS other_net_fxrp,SUM(total_net) OVER (ORDER BY day) AS total_net_fxrpFROM dailyORDER BY day