Skip to content

feat(types): add BloxrouteBackrunConfig on Message#209

Merged
datluongductuan merged 4 commits into
mainfrom
feat/bloxroute-backrun-config
Jun 16, 2026
Merged

feat(types): add BloxrouteBackrunConfig on Message#209
datluongductuan merged 4 commits into
mainfrom
feat/bloxroute-backrun-config

Conversation

@datluongductuan

Copy link
Copy Markdown
Member

What

Adds BloxrouteBackrunConfig (the per-tx BackRunMe profit-split config) as a typed field on Message, plus the array parser + validators:

  • Message.BloxrouteBackrunConfig *BloxrouteBackrunConfig (json:"bloxroute_backrun_config,omitempty") — mirrors FlashbotMevshareEvent, set only for bloxroute arbOnlyMEV txs, nil otherwise
  • BloxrouteBackrunConfig{ContractSplit, TargetRewardAddress, TargetSplit, BlxrRewardAddress, SearcherSplit}
  • ParseBloxrouteBackrunConfig([]string) — the 5-element arbOnlyMEV array parser [contractSplit, targetRewardAddress, targetSplit, blxrRewardAddress, searcherSplit]
  • Validate() (splits non-negative, sum ≤ 100, valid non-zero reward addresses) + BlxrSplit() (100 - contract - target - searcher)

Why

bloxroute's arbOnlyMEV stream carries a per-tx backrunConfig. Today mempool-explorer parses it but drops it (it never reaches Message), so reserve-taker re-unmarshals the raw event bytes with array/object + camel/snake switch cases to recover it — effectively dead code, since the producer never writes the field.

Putting the typed config on Message lets mempool-explorer parse the stream array once and attach it, and lets consumers (reserve-taker) read Message.BloxrouteBackrunConfig directly (nil if absent) — no defensive re-parsing.

Consumers: mempool-explorer (parses + sets), reserve-taker (reads) — separate PRs pinning this commit.

🤖 Generated with Claude Code

Add BloxrouteBackrunConfig (the per-tx BackRunMe profit split) as a typed field on
Message, mirroring FlashbotMevshareEvent, plus ParseBloxrouteBackrunConfig (the
5-element arbOnlyMEV array parser) + Validate + BlxrSplit. mempool-explorer parses the
stream array once and attaches it here, so consumers read Message.BloxrouteBackrunConfig
directly (nil when absent) instead of re-unmarshalling raw event bytes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@datluongductuan datluongductuan force-pushed the feat/bloxroute-backrun-config branch from 07a7306 to 9b8f784 Compare June 16, 2026 08:01
datluongductuan and others added 3 commits June 16, 2026 15:05
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bloxroute's submit_arb_only_bundle requires coinbase_profit (the wei paid to the
BackRunMe contract). Add a coinbaseProfit *big.Int param to IBackrunSender.SendBackrunBundle;
the BloxrouteBackrunmeSender sets it on the request params (JSON number, omitempty), the
other senders ignore it. Test call sites pass nil.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@datluongductuan datluongductuan merged commit b6d39b1 into main Jun 16, 2026
3 checks passed
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