Skip to content

TRC-008 BlackListFunction

Description

Restrict trading to specific addresses, preventing them from buying/selling, or selling only at a high loss

Risk Pattern

function _transfer(address from, address recipient, uint256 amount) internal virtual override returns (bool) {
  require(_balances[_msgSender()] >= amount, );
  _balances[_msgSender()] -= amount;
  _balances[recipient] += amount;
  require(black[from] != 1,);
  emit Transfer(_msgSender(), recipient, amount);
  return true;
}

Risk Samples