The pool's expiry determines when staking closes, when claimExpired can mechanically resolve the pool, and critically the upper bound ( T ) in the k=2 time-weighted bonus formula for EXPIRED resolutions. The sponsor can change expiry freely via setExpiry until the first stake() call flips the one-way expiryLocked latch.
The _MIN_EXPIRY_LEAD constant (30 days) enforces a floor on how close to block.timestamp the new expiry can be, but places no constraint on the magnitude of compression. A sponsor can advertise a generous 365-day expiry, attract staker interest, then call setExpiry(block.timestamp + 30 days) moments before the first stake, permanently locking all subsequent stakers into the compressed deadline.
Likelihood: Low
Sponsor-initiated (onlyOwner), not an external attack vector
Sponsor has a business disincentive: compressed expiry reduces pool attractiveness and may leave the pool under-subscribed
The 30-day floor prevents instant expiry, but a reduction from 365 days → 30 days is a 92% compression in a single call
Most exposed: stakers using frontends that cache pool parameters rather than re-reading on-chain state immediately pre-stake
Impact:
Compressed expiry changes ( T ) in the k=2 formula, altering every staker's bonus share for EXPIRED resolutions
For SURVIVED resolutions, ( T = \text{riskWindowEnd} ) (capped at expiry), so a compressed expiry also caps the risk-window upper bound
Principal is never at risk this affects bonus distribution only
On-chain state is transparent: stakers who read expiry in their stake transaction are unaffected
The PoC below demonstrates two scenarios. First, a sponsor deploys a pool with a 365-day expiry, compresses it to 30 days, and the first staker locks it permanently — the sponsor cannot revert the change. Second, the sponsor yo-yos the expiry multiple times before the first stake, showing the expiry is fully fluid until the latch flips.
Add a constraint on how much the expiry can be shortened in a single setExpiry call, preventing large compression jumps while allowing legitimate incremental adjustments:
This bounds the worst case: a staker evaluating a pool with a 365-day expiry knows it cannot shrink below 305 days before they stake (assuming one change). Combined with the existing expiryLocked latch on first stake, this closes the compression window without adding timelock complexity or gas overhead.
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.