You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
contracts: SlashJudge challenge submission is front-runnable — mempool copy of the evidence steals the 50% challenger reward #854
Severity: MEDIUM — from the 2026-06-10 full-repository review.
Location
contracts/src/SlashJudge.sol:455-467 — _resolve records msg.sender as challenger; EvidenceAlreadyUsed at :456
contracts/src/CapacityBond.sol:849-870 / contracts/src/SlashEscrowLib.sol:195-208 — 50% of escrow paid to the recorded challenger at finality
Problem
The slashable evidence (probeResponseData, streamResponseData, the operator's slashSigs) is only revealed in the challenge transaction's calldata. A mempool watcher can copy a pending honest challenge, resubmit with higher gas, and become the recorded challenger — capturing the 50% finality reward (finalizeUnappealedSlash is permissionless). The honest witness's tx then reverts EvidenceAlreadyUsed, wasting their gas. usedEvidenceHash prevents a double-slash but the reward slot is strict first-lander.
Impact
Removes the economic incentive for honest off-path witnesses to surface evidence (their reward is reliably MEV-extracted), weakening the enforcement layer the slashing model depends on. The challenge bond round-trips, so there's no bond loss — but the reward is the actual incentive. Mitigating context: Arbitrum's sequencer-ordered mempool reduces (does not eliminate — e.g. a colluding searcher/timeboost) the classical front-running surface; worth an explicit decision either way.
Not a duplicate
No open issue concerns challenge-submission front-running; ADR 014/028 do not acknowledge the vector.
Fix direction
Commit–reveal on the evidence hash (commit keccak256(evidence, salt, challenger) first, reveal after N blocks with the challenger bound), or bind the reward to a pre-registered challenger commitment rather than the first revealer. Alternatively, document the accepted posture given L2 ordering assumptions.
A well-specified security vulnerability in SlashJudge._resolve(): because msg.sender is recorded as the challenger at submission time, a mempool observer can copy the calldata (which contains all slashable evidence), resubmit with higher gas, and capture the 50% finality reward. The honest witness's tx reverts EvidenceAlreadyUsed, and the attack is reliable on any chain with a public mempool. Arbitrum's sequencer ordering reduces (but doesn't eliminate) the classical front-running surface; the timeboost/colluding-sequencer scenario remains live. ADR 014 and ADR 028 do not acknowledge this vector, so an explicit design decision is needed before implementation.
📊 Assessment
Dimension
Value
Reasoning
Type
Bug
Contract design flaw — reward attribution is exploitable via mempool copy
Labels
security, economics, medium (existing) + missing-decision, ADR (added)
Vector is unacknowledged in ADR 014/028; explicit decision must be recorded before fix ships
Coding agent
Needs more info
Fix direction is clear but the team must first choose between commit–reveal and pre-registered commitment; implementation touches SlashJudge, CapacityBond, SlashEscrowLib, and ADR 028
🔗 Similar issues
No open issues describe this front-running vector. Searched for challenge submission, MEV, commit-reveal, and ADR 028 / ADR 014 slash surface — no duplicates found.
💡 Notes and suggestions
Root cause pinpoint
SlashJudge._resolve() (:455–467) passes msg.sender directly as challenger to capacityBond.slash(). Because the evidence hash and all proof data are in calldata, any observer can replay the tx with higher gas before it mines.
// SlashJudge.sol:462 — the challenger address is first-lander only
(uint256slashId, uint256amount) = capacityBond.slash(operator, msg.sender, uint8(offenseType));
usedEvidenceHash correctly prevents a double-slash but does not protect who receives the 50% reward recorded in SlashRecord.challenger.
Fix options
Option A — Commit–reveal (standard pattern)
Add commitChallenge(bytes32 commitment) where commitment = keccak256(abi.encodePacked(evidenceHash, salt, challengerAddr)).
Require the commitment to exist and be at least N blocks old before _resolve() accepts the reveal. Bind challenger to the committed address, not msg.sender.
Trade-off: adds a multi-block delay; must handle expired commits and re-entrancy in the commit store.
Option B — Pre-registered challenger commitment
Bind the challenger at challenge bond deposit time (a separate registerChallenger(bytes32 evidenceHashCommitment) step). Reward is attributed to the registered address. Simpler on-chain; requires separate off-chain coordination for new challengers.
Option C — Accept the risk with documentation
If the team decides Arbitrum's sequencer ordering is a sufficient mitigant for the PoC phase, document the accepted posture explicitly in ADR 028 §Challenge submission and add a TODO for mainnet hardening. This should be a conscious, recorded decision — not a gap.
ADR 028 status note
Per CLAUDE.md, ADR 028 is currently in Draft status (unlocked from "Locked-for-implementation"). This is the right moment to address the vector in the ADR before implementation is hardened. The fix choice should be reflected in ADR 028 §Contract surface.
Sub-tasks (once option chosen)
Record design decision in ADR 028 §Challenge submission (and optionally ADR 014 §Evidence staleness)
Implement chosen mechanism in SlashJudge.sol (_resolve / new commit entry point)
Update CapacityBond.slash() signature if challenger binding changes
Activity
github-actions commentedon Jun 10, 2026
🎯 Triage report
A well-specified security vulnerability in
SlashJudge._resolve(): becausemsg.senderis recorded as the challenger at submission time, a mempool observer can copy the calldata (which contains all slashable evidence), resubmit with higher gas, and capture the 50% finality reward. The honest witness's tx revertsEvidenceAlreadyUsed, and the attack is reliable on any chain with a public mempool. Arbitrum's sequencer ordering reduces (but doesn't eliminate) the classical front-running surface; the timeboost/colluding-sequencer scenario remains live. ADR 014 and ADR 028 do not acknowledge this vector, so an explicit design decision is needed before implementation.📊 Assessment
security,economics,medium(existing) +missing-decision,ADR(added)SlashJudge,CapacityBond,SlashEscrowLib, and ADR 028🔗 Similar issues
No open issues describe this front-running vector. Searched for challenge submission, MEV, commit-reveal, and ADR 028 / ADR 014 slash surface — no duplicates found.
💡 Notes and suggestions
Root cause pinpoint
SlashJudge._resolve()(:455–467) passesmsg.senderdirectly aschallengertocapacityBond.slash(). Because the evidence hash and all proof data are in calldata, any observer can replay the tx with higher gas before it mines.usedEvidenceHashcorrectly prevents a double-slash but does not protect who receives the 50% reward recorded inSlashRecord.challenger.Fix options
Option A — Commit–reveal (standard pattern)
commitChallenge(bytes32 commitment)wherecommitment = keccak256(abi.encodePacked(evidenceHash, salt, challengerAddr)).Nblocks old before_resolve()accepts the reveal. Bindchallengerto the committed address, notmsg.sender.Option B — Pre-registered challenger commitment
Bind the challenger at challenge bond deposit time (a separate
registerChallenger(bytes32 evidenceHashCommitment)step). Reward is attributed to the registered address. Simpler on-chain; requires separate off-chain coordination for new challengers.Option C — Accept the risk with documentation
If the team decides Arbitrum's sequencer ordering is a sufficient mitigant for the PoC phase, document the accepted posture explicitly in ADR 028 §Challenge submission and add a TODO for mainnet hardening. This should be a conscious, recorded decision — not a gap.
ADR 028 status note
Per
CLAUDE.md, ADR 028 is currently in Draft status (unlocked from "Locked-for-implementation"). This is the right moment to address the vector in the ADR before implementation is hardened. The fix choice should be reflected in ADR 028 §Contract surface.Sub-tasks (once option chosen)
SlashJudge.sol(_resolve/ new commit entry point)CapacityBond.slash()signature if challenger binding changesforge build --sizes --deny warningsand slither/aderyn pass after changesAdd this agentic workflows to your repo
To install this agentic workflow, run
fix(contracts): commit–reveal SlashJudge challenges to stop reward fr…