Use of strict equalities that can be easily manipulated by an attacker.
Distributor.sol Line #142
https://github.com/Cyfrin/2023-08-sparkn/blob/104b227e7a1b60eff8124980e63aee93bdd12a38/src/Distributor.sol#L142
Using strict checks like totalAmount == 0
might not work well because balances might not be precisely zero due to these small errors.
In simple terms, tokens on Ethereum can have tiny errors in their numbers, so it's better to be a bit lenient when checking balances to avoid surprises caused by these errors.
Manual
To address this concern, use:
you can use less strict equality so that there will be very less chances of error.
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.