scopeLocked is intended to tell callers, both on-chain and off-chain, whether the pool's BattleChain scope is final and immutable. Per its own NatSpec: "One-way flag flipped on the first interaction that observes the registry in any state other than NOT_DEPLOYED or NEW_DEPLOYMENT."
The flag is only ever updated lazily, as a side effect of some entrypoint (stake, contributeBonus, withdraw, flagOutcome, claimExpired, setPoolScope, pokeRiskWindow) calling _observePoolState().
There is no method that keeps it synchronized with the live registry state in between such calls. Consequently, an off-chain reader (a dApp, indexer, block explorer, or a staker checking state before depositing) that calls scopeLocked() directly can receive false even though the underlying BattleChain registry has already transitioned past NOT_DEPLOYED/NEW_DEPLOYMENT — the stored flag simply hasn't been flipped yet because no one has submitted an observing transaction since the transition occurred.
Even though one calls pokeRiskWindow() it won't be updated as it is explicitly for risk window updates, and there is no way else to update it directly without staking, or contributing bonus, etc.
Likelihood:
This occurs whenever the registry transitions past NOT_DEPLOYED/NEW_DEPLOYMENT and no pool interaction is made for staking, bonus contribution, withdraw.
Impact:
An off-chain reader can be misled into believing scope is still editable (scopeLocked() == false), but in reality on the basis of current state it should have been true.
Add a scope lock retrieval method, which gives results basis on current condition, not stored result.
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.