TRC-010 SlippageModification
Description
Tokens with modifiable tax allow the contract owner to change the buy or sell tax rates. This can cause losses, especially if the contract allows unlimited tax rate modifications, potentially making the token untradeable. This function generally relies on ownership. If the contract does not have an owner, or if the owner is a black hole address and cannot be retrieved, this function may be disabled.
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);
_balances[recipient] += (amount-fee);
emit Transfer(_msgSender(), recipient, amount-fee);
return true;
}
function setFee(uint256 _fee) external onlyOwner{
fee = _fee;
}