Gas is wasted on an unnecessary external registry call, and misleading state-transition events are emitted in a transaction that ultimately reverts. Off-chain indexers may incorrectly interpret these events as genuine.
The pool owner can update the pool's BattleChain scope until the registry leaves pre-attack staging (scopeLocked == true). Once locked, scope is immutable. setPoolScope should check the lock before making any external calls or state changes.
setPoolScope calls _observePoolState() at line 638 BEFORE checking scopeLocked at line 639. _observePoolState makes an external registry call and emits events (ScopeLocked, RiskWindowStarted). The scopeLocked check then reverts. While Solidity revert semantics roll back all state changes (the markers do NOT persist on revert), the external registry call wastes gas on a doomed transaction and misleading events appear in the receipt, potentially confusing off-chain indexers.
Likelihood:
Impact:
Forge output:
Check the lock before making any external calls, so the transaction fails fast without wasting gas on a registry read and emitting misleading events that will be rolled back.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.