Skip to content

ignore bnb tx hash on token imbalances query that causes overflow - #381

Merged
bram-vdberg merged 3 commits into
mainfrom
ignore_random_transfer_on_bnb_that_overflows_token_imbalances_query
Aug 25, 2026
Merged

ignore bnb tx hash on token imbalances query that causes overflow#381
bram-vdberg merged 3 commits into
mainfrom
ignore_random_transfer_on_bnb_that_overflows_token_imbalances_query

Conversation

@harisang

Copy link
Copy Markdown
Contributor

Alternative solution to PR #380

Problem

The raw slippage query (4059683) fails with Overflow in INT256 cast of UINT256: 115792089237316...639935 for any BNB time window containing 2026-08-22 (reported in Slack).
Root cause: a spam token (0xf0e8fc6211feb9a1ea9f94609c245bc39973e4d7 on BNB) emitted a fake Transfer event of 2^256 − 1 atoms to the settlement contract in tx 0xf06378e10b27ccc35de3c8c2ba53fc6da2a5c837d9be5b10a584ab24dfa8a710 — a direct EOA→token call, not a settlement; there is no corresponding row in cow_protocol_bnb.trades. The token imbalances query (4021644) does cast(amount as int256) on every transfer amount, and max-uint256 does not fit into int256.

@bram-vdberg
bram-vdberg merged commit 031a8cf into main Aug 25, 2026
4 checks passed
@bram-vdberg
bram-vdberg deleted the ignore_random_transfer_on_bnb_that_overflows_token_imbalances_query branch August 25, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants