TRC-009 WhiteListFunction
Description
WhiteListFunction is used to allow specific addresses to make early transactions, tax-free, and unaffected by transaction suspensions. For contracts without an owner, or if the owner is a black hole address, the whitelist cannot be updated, but the existing whitelist remains in effect.
Risk Pattern
function _transfer(address from, address recipient, uint256 amount) internal virtual override returns (bool) {
require(_balances[_msgSender()] >= amount, );
_balances[_msgSender()] -= amount;
uint256 fee = amount.mul(feeRate).div(100);
if (whitelist[msg.sender] == ture)
fee = 0;
_balances[recipient] += (amount-fee);
emit Transfer(_msgSender(), recipient, amount-fee);
return true;
}