When the first stake occurs in a pool, the expiryLocked flag should be set to true and an event should be emitted to signal this state change, similar to how the scopeLocked flag emits a ScopeLocked event when the pool scope becomes immutable.
The expiryLocked flag is set to true on the first stake without emitting an event, reducing transparency for off-chain indexers monitoring pool state changes. This differs from other important state transitions in the contract which emit events, and makes it difficult for monitoring systems to determine when the expiry became immutable without tracking all stake events and inferring the state change.
Likelihood:
The expiryLocked flag is set to true during the first stake operation in any pool when the stake() function
This state change occurs silently every time a pool receives its first stake, as the condition !expiryLocked evaluates to true on the initial stake call
Impact:
Off-chain indexers and monitoring systems cannot easily determine when the expiry became immutable without tracking all stake events and inferring the state change
Reduced transparency and auditability for pool state changes, as other important state transitions in the contract emit events but this one does not
Add the following test in ConfidencePool.branches.t.sol
and then run forge test --match-test test_expiryLockedEvent_NOT_emitted_onFirstStake
and the test will pass
Add the event definition to src/interfaces/IConfidencePool.sol:
Emit the event in src/ConfidencePool.sol when setting the flag:
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.