Deposits are permitted while the agreement registry is in NEW_DEPLOYMENT (pre-attack staging). However, the pool's covered scope does not lock until the registry moves past this state, allowing a malicious pool sponsor to change the insured accounts after receiving stakers' funds.
The check _observePoolState() only sets scopeLocked = true when the registry state is not NOT_DEPLOYED or NEW_DEPLOYMENT. Stakers depositing during NEW_DEPLOYMENT are exposed to the risk of the sponsor modifying _scopeAccounts afterwards.
Likelihood:
Stakers deposit while the agreement is in NEW_DEPLOYMENT state.
The sponsor updates the scope via setPoolScope() before the registry state changes.
Impact:
Stakers' capital is exposed to a different set of contracts than they originally underwrote and verified at deposit time.
The test below stakes tokens for Alice while the registry is in NEW_DEPLOYMENT. The sponsor then successfully calls setPoolScope to change the covered accounts, demonstrating that the scope remains mutable post-staking.
Lock the scope immediately upon the first stake to protect staker reliance, regardless of the registry state.
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.