FoundrySolidityLayer 2
7.25 ETH
Submission Details
Impact: low
Likelihood: low

Owner Can Extend Expiry When Agreement Is Already in Terminal or Blocked State leads to no staker can ever stake

Author Revealed upon completion

Summary

setExpiry() does not check the current agreement state. If the agreement is already in PRODUCTION, CORRUPTED, or PROMOTION_REQUESTED, extending expiry serves no purpose, because staking is permanently blocked in these states.

Root Cause

function setExpiry(uint256 newExpiry) external onlyOwner {
if (expiryLocked) revert ExpiryLocked();
// No agreement state check
if (newExpiry < block.timestamp + _MIN_EXPIRY_LEAD) revert ExpiryTooSoon();
...
}

Staking is always blocked in these states regardless of expiry:

function _assertDepositsAllowed(IAttackRegistry.ContractState state) private pure {
if (
state == IAttackRegistry.ContractState.PROMOTION_REQUESTED
|| state == IAttackRegistry.ContractState.PRODUCTION
|| state == IAttackRegistry.ContractState.CORRUPTED
) {
revert StakingClosed(); // staking blocked regardless of expiry
}
}

Code Snippet-
https://github.com/CodeHawks-Contests/2026-07-bc-confidence-pools/blob/58e8ba4ce3f3277866e4926f3140e597f9554a1e/src/ConfidencePool.sol#L622

Impact

No staker can ever stake regardless of new expiry. Misleading pool state, appears active but functionally dead.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!