{"id":"detector.drain_pattern.v4","title":"Drain-shaped payment, read from its own transaction: what came back is measured against everything that left","unit":"detections","chain_set":"eip155:8453 (Base); six other chains are read to follow a bridge","window":"payments in the last 30 days","definition":"As v3, with one change in the first of its three cases. A candidate is an exchange, and not a drain, when the wallet got back in the same transaction at least 90% of the value that left it in that transaction in tokens we price: every transfer out of the wallet counts, not the candidate payment alone (an ETH candidate is added to the transfers). Under v3 the return was compared with the candidate alone, so a transaction that sent value out, got it back and sent it out again read each outgoing payment as an exchange. The size test, the other two cases (tokens minted to the wallet or an unpriced token; a bridge to the same address), the 90% and 30-minute thresholds and what is stored are v3's.","method":"Pre-registered on 17 Nov 2026 at 09:29 UTC and committed alone before any v4 reading (afg-security-lab bbf2ea3213), with the rule for shipping fixed in advance. Two transaction records built by hand were read by both versions without the network: out 1,000, back 950, out 950 to another address reads as an exchange twice under v3 and as a plain send twice under v4; a plain swap (1,000 USDC out, WETH worth 998 back) is an exchange under both. The six candidates that v3 had read as an exchange were read again from the chain at 09:32 UTC: all six keep that reading; in each the wallet sent nothing priced beside the candidate, and 99.1% to 100.3% of the value came back. Reading and thresholds otherwise as v3.","excludes":["As v3."],"does_not_assert":["As v3.","That a batch which mixes an exchange with another large payment was a drain: under v4 neither payment of such a transaction reads as an exchange, and the reading shows what left and what came back."],"known_gaps":["As v3.","A token we do not price, or a token minted to the wallet, still reads as the wallet's own move whatever it is worth; a contract that hands the wallet a worthless token is not told apart. That needs a price or a label for the token and is not part of v4."],"source":"AFG-Pulse incident detectors (lib/drainread.mjs)","since":"2026-11-17","supersedes":"detector.drain_pattern.v3","status":"superseded","superseded_by":"detector.drain_pattern.v5","valid_until":"2026-11-27","revisions":[],"body_sha256":"ff4ab9c73f25cabc1944b3f8363a971490fe335ca181f51efb9cc0f9bb5f4ec8","url":"https://agenticfinancegraph.com/def/detector.drain_pattern.v4","ladder":"https://agenticfinancegraph.com/ai-agent-liveness-methodology-l0-l9-ladder","license":"https://creativecommons.org/licenses/by/4.0/","attribution":"Agentic Finance Graph — https://agenticfinancegraph.com"}