The constant value UNRIPE_LP_PER_DOLLAR
is incorrectly mentioned having 1 wei more than its original calculation result.
This mathematical error will cause unripeLPPerDollar
method to return incorrect values
The constant is defined as following in C.sol
which is parent contract for a lot of in-scope contracts
uint256 private constant UNRIPE_LP_PER_DOLLAR = 1884592; // 145_113_507_403_282 / 77_000_000
The Comment states that it is the result of 145_113_507_403_282 / 77_000_000
However the actual result of it is 1884591.00524
, which even rounded up according to rules , give 1884591
however specified value is 1884592
which is 1 more and incorrect
Submitting it as medium since funds can be lost because division by 1884592 instead of 1884591 will result in few tokens than intended.
Loss of funds although little but they are.
Manual review
Declare constant with correct value 1884591
Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.