The variable percentagesLength is declared within the _distribute function but is never used in the function's logic. This unused variable increases code complexity and can confuse developers and auditors.
The variable percentagesLength is initialized to store the length of the percentages array, but it is not referenced or used anywhere within the _distribute function.
The presence of an unused variable can lead to confusion and make the code less readable. It might also mislead developers into thinking that the variable has a functional role in the code logic, potentially leading to incorrect modifications or assumptions.
Manual
Remove the declaration of the percentagesLength variable since it is not being used. Keeping the code clean and removing unnecessary variables helps improve readability and reduces the chance of confusion.
Remove the line:
After removal, the _distribute function should look like this:
By removing the unused variable, you improve the code's clarity and maintainability.
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.