If decimals is greater than 18, the calculation for scaleFactor will underflow in both descaleAmount and scaleAmount due to the unchecked block, potentially leading to incorrect calculations.
Incorrect scaleFactor calculations can cause incorrect token amounts, potentially resulting in unexpected transfer values if an overflow or underflow occurs.
manual analysis
Add validation to ensure decimals is not greater than 18 before calculating scaleFactor, to prevent unintended results:
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.