The use of pragma version < ^0.8.0 and without any safeMath operations in calculations can increase the chances of overflow and underflow issue .
It can lead to the integer value out of range.
function getTotalRecapDollarsNeeded(uint256 urLPsupply) internal pure returns(uint256) {
uint256 totalDollars = C
.dollarPerUnripeLP()
.mul(urLPsupply)
.div(DECIMALS);
// @audit : without safeMath can lead to overflow/underflow
totalDollars = totalDollars / 1e6 * 1e6; // round down to nearest USDC
return totalDollars;
}
Manual review
The recommendation is to used the safeMath operations while calcuation if you are using the older pragma version.
totalDollars = totalDollars.div(1e6).mul(1e6); // round down to nearest USDC
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.