Skip to content

Search for forced payments in any tx of block - #256

Merged
Marketen merged 5 commits into
mainfrom
fix/forced-payment-any-position
Sep 15, 2026
Merged

Marketen merged 5 commits into
mainfrom
fix/forced-payment-any-position

Conversation

@Marketen

@Marketen Marketen commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The mainnet oracle (v1.2.12) stopped on 2026-09-11 because onchain reconciliation found 13131532323905851 wei more in the pool than it owed.

In block 25956850 (slot 15194839) the builder paid the pool through a forwarder contract that uses SELFDESTRUCT, which emits no EtherReceived. The payment was tx 227 of 241. The detector only looked at the last tx, which had zero value, so it never ran. Validator 2245769 was banned for wrong fee and the ETH was left unallocated.

Change

  • New activation slot AnyPositionForcedPaymentActivationSlot (mainnet 15194839). Before it, the v1.2.12 detector runs unchanged, so a resync reproduces the published roots.
  • From that slot, for every block:
    • Read the pool balance at N-1 and N and subtract what events explain (donations, collateral, claims). If nothing is left, stop; no tx is scanned.
    • Otherwise find the single tx whose value equals the leftover, at any position and from any sender. Contract creations count too.
    • Check its receipt: it succeeded, and has the same block hash, block number and index. Then book it as the proposer's MEV payment.
  • Stops before touching state instead of guessing when:
    • no tx matches, or more than one does;
    • ETH leaves the pool with no event;
    • a validator withdrawal credits the pool;
    • a direct and a forced MEV payment land in the same block.
  • Donations equal to the payment amount stay donations; the payment's event is matched by tx hash and index.
  • Warning logged when a forced payment is credited to a proposer that isn't subscribed. Log only.
  • Fewer receipts: for an unknown proposer, only the payment's receipt is fetched, not every receipt in the block.

Verification

  • Tests cover:
    • the incident block's shape, payments at different positions, and every stop condition;
    • receipt checks, activation boundaries, and an equal-amount donation;
    • the incident through state advancement and both reconciliations.
  • Replay against the production archive node over blocks 25300001–25982153 (~95 days):
    • 544 blocks had ETH that events don't explain. 487 were detected as forced payments, 53 were skipped because the pool was the fee recipient, and 4 are the hardcoded exceptions.
    • The detector would have stopped 0 times.
    • None of the detections fall before the original activation slot.
    • 3 payments were not the last tx (blocks 25956850, 25957812 and 25980134). v1.2.12 would stop on each.
    • All 45 claims and 11 subscriptions in the range are fully explained by their events.

Deployment

Replay from the last consolidated state, slot 15180848. The execution endpoint must serve historical state from block 25942910 onward.

🤖 Generated with Claude Code

@Marketen Marketen self-assigned this Sep 15, 2026
Marketen and others added 4 commits September 15, 2026 10:30
Log the proposer, tx hash, tx sender and fee recipient when a forced MEV
payment is credited to a validator the pool does not know yet. It is legit
for a first reward, but it is also what a forced transfer that is not a MEV
payment would look like, so it leaves a trail to audit. Log only, state is
unchanged.

Also restore the explanation of why the payment is not picked by sender.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
They document and regenerate the test corpus but are not oracle code. The
checked-in corpus and the tests that read it are kept.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drop the 3 MB gzip corpus. The RPC tests now build a block shaped like
mainnet block 25956850 in code, with its real amounts: four builder payouts
through the forwarder, the pool payment at index 3, then unrelated txs with a
zero value donation last. Every failure, activation, withdrawal and
reconciliation test is kept; only the corpus loop and the scan benchmark go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Marketen
Marketen merged commit a3634b3 into main Sep 15, 2026
7 checks passed
@Marketen
Marketen deleted the fix/forced-payment-any-position branch September 15, 2026 10:36
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.

1 participant