The _usageIndex variable is declared as uint256, but in the constructor, it is explicitly initialized as a uint128. Although WadRayMath.RAY (1e27) fits within uint128, this type conversion is unnecessary and could introduce inefficiencies or unintended side effects in future modifications.
_usageIndex is already declared as a uint256, making the explicit uint128 conversion redundant.
While WadRayMath.RAY (1e27) does fit within a uint128, this forced type conversion does not provide any apparent benefits.
Unnecessary type conversions could impact gas efficiency and introduce unintended side effects in future modifications if the variable's type or usage changes.
The issue does not introduce a direct security vulnerability but leads to minor inefficiencies.
If future modifications rely on _usageIndex as uint256, the unnecessary conversion could create unexpected behavior or require additional modifications.
Manual code review
Remove the explicit uint128 type conversion and initialize _usageIndex directly as:
If uint128 is required for some reason, consider changing _usageIndex's type definition to uint128 for consistency.
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.