Severity: Low
Confidence: High
This detector identifies instances where zero-valued ERC20 token transfers are made. Even though EIP-20 states that zero-valued transfers must be treated as normal transfers and events must be triggered, some tokens may revert if this is attempted, which can cause transactions that involve other tokens (such as batch operations) to fully revert. Therefore, it may be safer and more gas-efficient to skip the transfer if the amount is zero.
File: src/Distributor.sol
This variable might be zero: amount
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L147
File: src/Distributor.sol
This variable might be zero: token.balanceOf(address(this))
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L164
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.