Smart Contract Audit Report
Nutraceutical Finance is a new ERC-20 token on Ethereum.
For this audit, we reviewed the project team's NutraceuticalFinance contract at 0x5dE83a4b2CA7D85476bb5cA5435E1BF1bbFdE9a2 on the Ethereum Mainnet.
Informational findings were identified and the team may want to review them. In addition, centralized aspects are present.
Date: August 2nd, 2022.
Finding #1 - NutraceuticalFinance - InformationalDescription: Although the SafeMath library is used, the contract is deployed with Solidity v0.8.4 which has built-in overflow checks.
Recommendation: SafeMath could safely be removed to reduce contract size, deployment costs, and gas costs on all transactions that utilize it.
- The total supply of the token is set to 10 billion $NUTRA [10,000,000,000].
- No mint or burn functions are present, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
- At the time of writing this report, there are 243 total token holders. The token allocation is as follows:
- 80% of the total supply has been sent to the 0x..dead address.
- 14.86% of the total supply belongs to the deployer.
- The next five EOAs own a cumulative 1.1% of the total supply.
- 0.9% of the total supply is in Uniswap liquidity.
- Of that liquidity, 99% of the LP tokens are stored in a token locking contract and will vest to the team on July 11th, 2023.
- Trading has been permanently enabled by the team.
- The contract enforces a maximum transaction amount (determined by the owner) which imposes a limit to the number of tokens that can be transferred during any given transaction.
- There is a Platform fee, Dev fee, and Rewards fee on all transfers where neither the sender nor the recipient is excluded from fees. A separate fee structure can be set by the team to apply different Dev fee and Reward fee percentages when the user is initiating a sell transaction via Uniswap.
- The tokens collected from fees are stored in the contract address. The tokens are swapped for ETH when the following conditions are met:
- The automatic token swapping functionality is enabled by the team.
- The threshold number of tokens in the contract address (determined by the owner) has been reached.
- The contract is not currently swapping tokens.
- The caller is not initiating a buy transaction via Uniswap.
- The tokens collected from the Platform fee and Dev fee are swapped for ETH and sent to the team's Platform wallet and Dev wallet respectively.
- The tokens collected from the Rewards fee are swapped for ETH and sent to the RewardsTracker contract. The RewardsTracker contract was out of scope for this audit so we are unable to provide an assessment in regards to security.
- The contract utilizes the SafeMath library to protect against overflows/underflows.
- The contract complies with the ERC-20 token standard.
- The owner can set the Dev fee and Rewards fee for both fee structures to any percentages up to 10% each.
- The owner can exclude and include accounts from transfer fees at any time.
- The owner can exclude and include accounts from rewards at any time.
- The owner can set the maximum transaction amount to any value greater than 50 million tokens (0.5% of the total supply) at any time.
- The owner can disable all transfer fees and the maximum transaction amount restriction at any time.
- The owner can enable/disable the automatic token swapping functionality at any time.
- The owner can update the threshold number of tokens that triggers the automatic token swapping functionality to any value at any time.
- The owner can swap all of the $NUTRA in the contract for ETH and send it to the team's Dev wallet at any time.
- The owner can update the Dev wallet and RewardsTracker address at any time.
- The owner can update the Uniswap Router address at any time.
- For 1 hour after trading was enabled, the owner was able to blacklist accounts from being able to participate in transfers.
- The owner can remove accounts from the transfer blacklist at any time.
|Arbitrary Jump/Storage Write||N/A||PASS|
|Centralization of Control||
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
The automatic token swapping functionality may be susceptible to front-running; The team must monitor and if suspicious activity is detected, the team should lower the
|Improper Authorization Scheme||N/A||PASS|
|Outdated Compiler Version||N/A||PASS|
|Overall Contract Safety||PASS|
($) = payable function # = non-constant function Int = Internal Ext = External Pub = Public + [Lib] SafeMath - [Int] add - [Int] sub - [Int] sub - [Int] mul - [Int] div - [Int] div - [Int] mod - [Int] mod + [Lib] Address - [Int] isContract - [Int] sendValue # - [Int] functionCall # - [Int] functionCall # - [Int] functionCallWithValue # - [Int] functionCallWithValue # - [Prv] _functionCallWithValue # + [Int] IERC20 - [Ext] totalSupply - [Ext] balanceOf - [Ext] transfer # - [Ext] allowance - [Ext] approve # - [Ext] transferFrom # + [Int] IERC20Metadata (IERC20) - [Ext] name - [Ext] symbol - [Ext] decimals + Context - [Int] _msgSender - [Int] _msgData + ERC20 (Context, IERC20, IERC20Metadata) - [Pub]
# - [Pub] name - [Pub] symbol - [Pub] decimals - [Pub] totalSupply - [Pub] balanceOf - [Pub] transfer # - [Pub] allowance - [Pub] approve # - [Pub] transferFrom # - [Pub] increaseAllowance # - [Pub] decreaseAllowance # - [Int] _transfer # - [Int] _mint # - [Int] _burn # - [Int] _approve # - [Int] _beforeTokenTransfer # + Ownable (Context) - [Pub] # - [Pub] owner - [Ext] renounceOwnership # - modifiers: onlyOwner - [Ext] transferOwnership # - modifiers: onlyOwner + RewardsToken (ERC20, Ownable) - [Int] deleteExcluded # - [Int] getExcludedBalances - [Pub] excludeFromRewards # - modifiers: onlyOwner - [Ext] includeInRewards # - modifiers: onlyOwner - [Ext] isExcludedFromRewards - [Ext] getAllExcludedFromRewards - [Pub] getRewardsSupply + [Int] IUniswapV2Factory - [Ext] createPair # + [Int] IUniswapV2Router - [Ext] factory - [Ext] WETH - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens # + [Int] IRewardsTracker - [Ext] addAllocation ($) + NutraceuticalFinance (RewardsToken) - [Pub] # - modifiers: ERC20 - [Pub] decimals - [Int] _transfer # - [Ext] ($) - [Prv] _getValues - [Prv] _takeFee # - [Prv] calculateFee - [Prv] removeAllFee # - [Prv] restoreAllFee # - [Prv] swapAndRedirectEthFees # - modifiers: lockTheSwap - [Prv] sendEthToWallet # - [Prv] swapTokensForEth # - [Ext] prepareForLaunch # - modifiers: onlyOwner - [Ext] setUseGenericTransfer # - modifiers: onlyOwner - [Pub] blacklistAddress # - modifiers: onlyOwner - [Ext] setMaxTxPercent # - modifiers: onlyOwner - [Ext] isExcludedFromFee - [Ext] excludeFromFee # - modifiers: onlyOwner - [Ext] includeInFee # - modifiers: onlyOwner - [Ext] setFees # - modifiers: onlyOwner - [Ext] setLaunchSellFee # - modifiers: onlyOwner - [Ext] setDevWallet # - modifiers: onlyOwner - [Ext] setRewardsTracker # - modifiers: onlyOwner - [Ext] setRouterAddress # - modifiers: onlyOwner - [Ext] setSwapAndRedirectEthFeesEnabled # - modifiers: onlyOwner - [Ext] setMinTokensBeforeSwap # - modifiers: onlyOwner - [Ext] manualSwap # - modifiers: onlyOwner - [Ext] manualSend # - modifiers: onlyOwner
SourceHat (formerly Solidity Finance - founded in 2020) has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1300+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 billion U.S. dollars in on-chain value across 1500 projects!.
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!
Contact us today to get a free quote for a smart contract audit of your project!
What is a Solidity Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.
How Do I Interpret the Findings?
Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:
- High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
- Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
- Low severity issues have a relatively minor risk association; these issues have a low probability of occurring or may have a minimal impact.
- Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.