function marketingFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - marketingFees[0] + _buyFee;
totalFees[1] = totalFees[1] - marketingFees[1] + _sellFee;
totalFees[2] = totalFees[2] - marketingFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
marketingFees = [_buyFee, _sellFee, _transferFee];
emit marketingFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function charityFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - charityFees[0] + _buyFee;
totalFees[1] = totalFees[1] - charityFees[1] + _sellFee;
totalFees[2] = totalFees[2] - charityFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
charityFees = [_buyFee, _sellFee, _transferFee];
emit charityFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function devFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - devFees[0] + _buyFee;
totalFees[1] = totalFees[1] - devFees[1] + _sellFee;
totalFees[2] = totalFees[2] - devFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
devFees = [_buyFee, _sellFee, _transferFee];
emit devFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function liquidityFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - liquidityFees[0] + _buyFee;
totalFees[1] = totalFees[1] - liquidityFees[1] + _sellFee;
totalFees[2] = totalFees[2] - liquidityFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
liquidityFees = [_buyFee, _sellFee, _transferFee];
emit liquidityFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function rewardsFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - rewardsFees[0] + _buyFee;
totalFees[1] = totalFees[1] - rewardsFees[1] + _sellFee;
totalFees[2] = totalFees[2] - rewardsFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
rewardsFees = [_buyFee, _sellFee, _transferFee];
emit rewardsFeesUpdated(_buyFee, _sellFee, _transferFee);
}
We highly recommend to set fees reasonable limits. Avoid setting fees high.
function excludeFromFees(address account, bool isExcluded) public onlyOwner {
isExcludedFromFees[account] = isExcluded;
emit ExcludeFromFees(account, isExcluded);
}
There is no need specific recommendation for this finding.
function updateSwapThreshold(uint16 _swapThresholdRatio) public onlyOwner {
require(_swapThresholdRatio > 0 && _swapThresholdRatio <= 500, "SwapThreshold: Cannot exceed limits from 0.01% to 5% for new swap threshold");
swapThresholdRatio = _swapThresholdRatio;
emit SwapThresholdUpdated(_swapThresholdRatio);
}
There is no need specific recommendation for this finding.
function setAMMPair(address pair, bool isPair) external onlyOwner {
require(pair != pairV2, "DefaultRouter: Cannot remove initial pair from list");
_setAMMPair(pair, isPair);
}
There is no need specific recommendation for this finding.
Disclaimer: This smart contract audit report, conducted by SecureWise, is intended for informational purposes only. It does not constitute an endorsement, investment advice, or a guarantee of any kind. The audit involved code analysis, manual review, testing, and risk classification.