AntFleet

Disagreement · bb96d68b-anthropic-2

RehypeDopplerHookInitializer._onInitialization permits startFee == endFee but later code never sets lastFee == endFee, causing _getCurrentFee to keep returning startFee — only emits FeeUpdated when currentFee < schedule.lastFee, but for flat schedule short-circuit triggers; minor docs/maintainability concern: lastFee not advanced to endFee after full decay so storage write happens once and never enters the 'fully decayed' branch

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

Opus finding

RehypeDopplerHookInitializer._onInitialization permits startFee == endFee but later code never sets lastFee == endFee, causing _getCurrentFee to keep returning startFee — only emits FeeUpdated when currentFee < schedule.lastFee, but for flat schedule short-circuit triggers; minor docs/maintainability concern: lastFee not advanced to endFee after full decay so storage write happens once and never enters the 'fully decayed' branch

lowmaintainabilitymedium
  • src/dopplerHooks/RehypeDopplerHookInitializer.sol:555-588
When `elapsed >= durationSeconds`, currentFee = endFee. The branch `if (currentFee < schedule.lastFee)` will write `lastFee = endFee` only if `lastFee > endFee`. Once written, subsequent calls enter the early-return `if (schedule.lastFee == schedule.endFee)` branch. So the logic is correct but reads stale `schedule.lastFee` from a memory copy in this function only after the storage write; the in-memory `schedule.lastFee` isn't updated but the function returns directly. Fine.

Recommendation

Not required.

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 →