Query editor
-- ============================================================-- LSP B (ATTACKER'S LSP) FILTERED MONITOR-- Fingerprint: dust ~0.00168xxx BTC (LSP B fee tier)-- P2TR exit ~0.166088 BTC after routing fee-- Excludes LSP A (~0.00174xxx dust) and other operators-- ============================================================WITHelectrum_fundings AS (SELECT DISTINCT o.tx_id AS funding_txFROM bitcoin.outputs oWHERE o.block_date BETWEEN DATE '2026-04-13' AND DATE '2026-04-30'AND o.type = 'witness_v0_scripthash'AND o.value = 0.16777215AND EXISTS (SELECT 1 FROM bitcoin.outputs o2WHERE o2.tx_id = o.tx_id AND o2.block_date = o.block_dateAND o2.type = 'nulldata')),closes AS (SELECTi.tx_id AS spend_tx,i.block_time AS close_time,i.block_height,i.spent_tx_id AS funding_tx,i.address AS p2wsh_addrFROM bitcoin.inputs iWHERE i.block_date BETWEEN DATE '2026-04-21' AND DATE '2026-04-30'AND i.type = 'witness_v0_scripthash'AND cardinality(i.witness_data) = 4AND length(i.witness_data[cardinality(i.witness_data)]) = 71AND substr(to_hex(i.witness_data[cardinality(i.witness_data)]), 1, 4) = '5221'AND substr(to_hex(i.witness_data[cardinality(i.witness_data)]), 139, 4) = '52AE'),close_outputs AS (SELECTc.spend_tx, c.close_time, c.block_height, c.funding_tx, c.p2wsh_addr,o.index, o.address, o.value, o.typeFROM closes cJOIN electrum_fundings e ON c.funding_tx = e.funding_txJOIN bitcoin.outputs o ON o.tx_id = c.spend_txWHERE o.block_date BETWEEN DATE '2026-04-21' AND DATE '2026-04-30'),-- Pick out the dust (P2WPKH) and P2TR per closeper_close AS (SELECTspend_tx, close_time, block_height, funding_tx, p2wsh_addr,arbitrary(CASE WHEN type = 'witness_v0_keyhash' THEN address END) AS lsp_dust_addr,arbitrary(CASE WHEN type = 'witness_v0_keyhash' THEN value END) AS lsp_dust_btc,arbitrary(CASE WHEN type = 'witness_v1_taproot' THEN address END) AS p2tr_exit_addr,arbitrary(CASE WHEN type = 'witness_v1_taproot' THEN value END) AS p2tr_exit_btcFROM close_outputsGROUP BY spend_tx, close_time, block_height, funding_tx, p2wsh_addr)SELECTto_hex(spend_tx) AS spend_tx,close_time,block_height,to_hex(funding_tx) AS funding_tx,p2wsh_addr,