Judge has assessed an item in Issue #308 as 3 risk. The relevant finding follows:
[L03] Addresses can be pushed into holders even if balanceOf(addr) is zero. For example, Alice sends 0 LiquidInfrastructureERC20 Token to Bob. Although Bob owns 0 Token, Bob addr can still be added in holders.
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
require(!LockedForDistribution, "distribution in progress");
if (!(to == address(0))) {
require(
isApprovedHolder(to),
"receiver not approved to hold the token"
);
}
if (from == address(0) || to == address(0)) {
_beforeMintOrBurn();
}
bool exists = (this.balanceOf(to) != 0);
if (!exists) {
holders.push(to);
}
}
Judge has assessed an item in Issue #308 as 3 risk. The relevant finding follows: