DeFiHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

Unexpected type for `ICumulativePump.readTwaReserves` function

Summary

The LibWellMinting.twaDeltaB function invokes the ICumulativePump.readTwaReserves function with uint40 type instead of expected uint256. This can cause unexpected behavior in case of changing the Pump implementation from current.

Vulnerability Details

LibWellMinting.twaDeltaB:

try ICumulativePump(pumps[0].target).readTwaReserves(
well,
lastSnapshot,
>> uint40(s.season.timestamp),
pumps[0].data
)

ICumulativePump.readTwaReserves:

function readTwaReserves(
address well,
bytes calldata startCumulativeReserves,
>> uint startTimestamp,
bytes memory data
) external view returns (uint[] memory twaReserves, bytes memory cumulativeReserves);

Impact

Unexpected behavior

Tools used

Manual Review

Recommendations

Consider using the expected type.

Updates

Lead Judging Commences

giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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