Normal behavior: after a staker deposits, the pool should not let the sponsor change the scope that determines what the deposited principal is underwriting.
I analyzed ConfidencePool.sol and observed that the first successful stake() locks expiry, but does not lock the pool scope. While the registry remains in NOT_DEPLOYED or NEW_DEPLOYMENT, the sponsor can call setPoolScope() and replace the scope even after stakers have deposited. The existing stake remains in the pool and can later be swept under the replacement scope.
The contract recognizes first-stake reliance for expiry by setting expiryLocked, but it does not provide the same protection for scope. Scope is one of the core risk parameters a staker relies on before depositing.
Likelihood:
This occurs when users stake while the registry is still in NOT_DEPLOYED or NEW_DEPLOYMENT, which is a normal pre-attack staging phase.
During that phase, scopeLocked remains false and setPoolScope() can still replace the pool-local scope even when totalEligibleStake != 0.
Impact:
A staker can deposit under one visible pool scope and later remain exposed under a different sponsor-selected scope.
If the replacement scope later reaches CORRUPTED, the staker's existing principal can be swept to recoveryAddress.
Create this file:
Run:
Observed output:
The PoC proves that:
Alice deposits while the pool covers DEFAULT_SCOPE_ACCOUNT.
First stake locks expiry, but not scope.
The sponsor replaces the pool scope while Alice's stake remains deposited.
The replacement scope later becomes CORRUPTED.
Alice's deposited principal is swept to recoveryAddress.
Disallow scope replacement while there is active deposited stake.
Alternatively, lock scope on first stake, mirroring the existing expiryLocked behavior.
The safer model is to allow sponsor scope updates only before any staker capital is deposited. Once a user has staked, the pool should not allow the sponsor to change the scope that defines the deposited capital's risk exposure
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.