Description
StaleDiaPrice is never exercised. All getPriceNoOlderThan / LibOpDiaPrice.run tests use staleAfter=3600 on a fork where feeds are still fresh. The revert path for stale prices has zero coverage.
Location
src/lib/dia/LibDia.sol L80–83; tests under test/src/lib/dia/LibDiaGetPriceTest.t.sol
Proposed fix
Add an external wrapper and a test that warps past rawTimestamp + staleAfter and expects:
vm.expectRevert(abi.encodeWithSelector(StaleDiaPrice.selector, uint128(rawTimestamp), staleAfterUint));
Audit
Whole-repo audit of 2026-05-16-update-dia-oracle @ 2cdd111 via rainlanguage/claude-audit-skills v0.12.0.
Description
StaleDiaPriceis never exercised. AllgetPriceNoOlderThan/LibOpDiaPrice.runtests usestaleAfter=3600on a fork where feeds are still fresh. The revert path for stale prices has zero coverage.Location
src/lib/dia/LibDia.solL80–83; tests undertest/src/lib/dia/LibDiaGetPriceTest.t.solProposed fix
Add an external wrapper and a test that warps past
rawTimestamp + staleAfterand expects:Audit
Whole-repo audit of
2026-05-16-update-dia-oracle@2cdd111via rainlanguage/claude-audit-skills v0.12.0.