Division before multiplication leads to unnecessary precision loss in SablierV2NFTDescriptor::abbreviateAmount.
Function abbreviateAmount takes two inputs namely amount and decimals on line 133:
The two inputs mentioned above, amount and decimals gets used on line line 140 to calculate the truncatedAmount:
However, if it comes to executing the second part of the statement and the function needs to execute amount / 10 ** decimals this will lead to precion loss in truncatedAmount due to division being executed before multiplication.
In calculating truncatedAmount it will lead to be less than expected and precision is incredibly important in particular with this function as it involves decimal amounts.
Manual Review
When it comes to the second part of the statement needing to execute it would be best advisable to perform multiplication before division.
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.