Query editor
-- Decrypt Information Exchange — prediction events (Jupiter prediction markets)-- One row per prediction order placed through Decrypt, with its fills.-- Attribution: Decrypt sponsors the network fee of prediction transactions from its shared sponsor wallet-- (address book role helius_sponsor, also used for Private Balance). An order counts when its create-order-- transaction involves a Decrypt sponsor wallet (fee payer or rent payer). Orders a user pays for themselves are not counted.-- Fills are done later by Jupiter's keepers in separate transactions; they are joined on the order account.-- Amounts on the program are micro USD (1e6 = $1); contracts are micro contracts (1e6 = 1 contract).-- Volume = total cost for buys, gross proceeds for sells. Jupiter fees = venue + protocol fees on the fill.-- decrypt_fee_usd = integrator fee on the fill (0 until Jupiter enables an integrator for Decrypt).-- Logic validated 2026-11-30 against the team's demo3 orders (85 orders, all filled, p50 5s to fill).WITH book AS (SELECT * FROM query_9176010),sponsors AS (SELECT address FROM book WHERE role = 'helius_sponsor'),sponsored_tx AS (SELECT DISTINCT block_date, tx_idFROM solana.account_activityWHERE address IN (SELECT address FROM sponsors)AND block_time >= TIMESTAMP '2026-11-20'AND tx_success),created AS (SELECT call_block_date, call_block_time, call_tx_id, call_tx_signer, account_owner, account_payer, account_order, account_position, paramsFROM jupiter_solana.prediction_market_call_create_order2WHERE call_block_date >= DATE '2026-11-20'UNION ALLSELECT call_block_date, call_block_time, call_tx_id, call_tx_signer, account_owner, account_payer, account_order, account_position, paramsFROM jupiter_solana.prediction_market_call_create_orderWHERE call_block_date >= DATE '2026-11-20'),orders AS (SELECTc.call_block_date AS block_date,c.call_block_time AS block_time,c.call_tx_id AS tx_id,c.account_owner AS wallet,c.account_order AS order_account,c.account_position AS position_account,json_extract_scalar(c.params, '$.CreateOrderParams.market_id') AS market_id,CAST(json_extract_scalar(c.params, '$.CreateOrderParams.is_buy') AS boolean) AS is_buy,CAST(json_extract_scalar(c.params, '$.CreateOrderParams.is_yes') AS boolean) AS is_yes,CAST(json_extract_scalar(c.params, '$.CreateOrderParams.deposit_amount') AS double) / 1e6 AS deposit_usd,CAST(json_extract_scalar(c.params, '$.CreateOrderParams.contracts') AS double) / 1e6 AS requested_contracts,json_extract_scalar(c.params, '$.CreateOrderParams.integrator') AS integratorFROM created cWHERE (c.call_tx_id IN (SELECT tx_id FROM sponsored_tx) OR c.account_payer IN (SELECT address FROM sponsors))),fills AS (SELECT account_order AS order_account, call_block_time AS fill_time,CAST(json_extract_scalar(params, '$.FillBuyOrder2Params.filled_contracts') AS double) / 1e6 AS filled_contracts,CAST(json_extract_scalar(params, '$.FillBuyOrder2Params.total_cost_usd') AS double) / 1e6 AS volume_usd,(coalesce(CAST(json_extract_scalar(params, '$.FillBuyOrder2Params.venue_fee_usd') AS double), 0)+ coalesce(CAST(json_extract_scalar(params, '$.FillBuyOrder2Params.protocol_fee_usd') AS double), 0)) / 1e6 AS jupiter_fee_usd,coalesce(CAST(json_extract_scalar(params, '$.FillBuyOrder2Params.integrator_fee_usd') AS double), 0) / 1e6 AS integrator_fee_usdFROM jupiter_solana.prediction_market_call_fill_buy_order2WHERE call_block_date >= DATE '2026-11-20' AND account_order IN (SELECT order_account FROM orders)UNION ALLSELECT account_order, call_block_time,CAST(json_extract_scalar(params, '$.FillSellOrder2Params.filled_contracts') AS double) / 1e6,CAST(json_extract_scalar(params, '$.FillSellOrder2Params.gross_proceeds_usd') AS double) / 1e6,(coalesce(CAST(json_extract_scalar(params, '$.FillSellOrder2Params.venue_fee_usd') AS double), 0)+ coalesce(CAST(json_extract_scalar(params, '$.FillSellOrder2Params.protocol_fee_usd') AS double), 0)) / 1e6,