The function setBalance
modifies token balances and voting power.
The setBalance function does not actually check for sufficiency before minting/burning, it simply executes based on the difference This causes unnecessary minting/burning operations, leading to potential gas inefficiencies and possible unintended state changes.
If currentBalance == balance == 0
, then no minting or burning occurs. If the function is called repeatedly with balance == 0, it still executes logic unnecessarily leading to gas inefficiencies.
Increase gas without doing anything.
Manual review
Add a check at the start of the function to return early if both values are zero.
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.