docs/DESIGN.md §8 states scope "locks permanently on the first interaction observing any other state", and §10 calls the published scope "the binding audit trail" bounding what stakers signed up to insure. The lock is scopeLocked, which _observePoolState flips only when the registry is observed in a state other than NOT_DEPLOYED/NEW_DEPLOYMENT.
setPoolScope gates solely on that flag and never on outcome:
If the agreement never leaves pre-attack staging for the pool's whole life, scopeLocked is never set. The pool still resolves: at expiry, claimExpired's mechanical branch observes the pre-attack state and resolves EXPIRED (src/ConfidencePool.sol:561-571), returning principal + bonus. Every other registry-observing entrypoint is then closed (stake/withdraw/flagOutcome revert OutcomeAlreadySet, pokeRiskWindow no-ops) — except setPoolScope, which keeps re-observing the same pre-attack state, never locks, and succeeds. The sponsor can therefore rewrite _scopeAccounts after the pool is fully settled and drained.
Likelihood:
Applies to any pool whose agreement is simply never pushed into the BattleChain attack flow and expires via the backstop — a normal, common outcome (the "survived" case). No attacker cooperation is needed.
Impact:
The on-chain scope commitment stakers relied on at deposit time can be silently overwritten after resolution and payout, breaking the DESIGN.md §8/§10 immutable-audit-trail guarantee.
No direct fund loss (claims never consult scope), but it can mislead anyone later trusting the on-chain scope as the record of what the pool actually insured (a dispute, or tooling reading historical pool scopes).
test/exploit/L1ScopeRewritePoC.t.sol (extends BaseConfidencePoolTest). exploit rewrites scope after an EXPIRED settlement; control shows the intended lock once the registry advances.
Result (Foundry 1.7.1, solc 0.8.26, isolated container):
Gate setPoolScope on the resolution state as well as scopeLocked, so a resolved pool's scope is immutable regardless of whether the lock latch ever fired:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.