AntFleet

Disagreement · 7cad6f1a-anthropic-2

Governance contract: `proposalPeriodStart` uses block.timestamp + 90 days but is cast to uint32 (Y2038-ish overflow ~2106)

solo Opus
repo a7cc2ed7·PR #3·reviewed 1 week ago

Opus finding

Governance contract: `proposalPeriodStart` uses block.timestamp + 90 days but is cast to uint32 (Y2038-ish overflow ~2106)

lowmaintainabilityhigh
  • src/governance/Governance.sol:36-38
  • src/governance/Governance.sol:80-82
`uint32` holds up to ~4.29e9 seconds (Feb 2106). Deploying close to that limit would silently truncate `block.timestamp + 90 days` and result in `proposalPeriodStart` being in the past or very small, allowing `_propose` to be callable immediately. The comparison `block.timestamp >= proposalPeriodStart` mixes uint256 and uint32 — Solidity will widen uint32 to uint256, so the comparison itself is safe, but the truncation in the constructor silently changes meaning. Use uint48 or uint64 like the rest of OZ Governor.

Recommendation

Change `proposalPeriodStart` to `uint64` or `uint256`; remove the silent narrowing cast.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →