ArtemisX

Smart Contract Audit Report

Audit Summary

ArtemisX Audit Report ArtemisX is a new BEP-20 token on the Binance Smart Chain that performs automatic liquidity adds and pays holders dividends in BUSD.

For this audit, we reviewed the project team's ArtemisX and DividendDistributor contracts at 0x8284a4f75ED5Cc56e0107a345Bab682ED3A95Be6 on the Binance Smart Chain Mainnet.

Audit Findings

Informational findings were identified and the team may want to review them. In addition, centralized aspects are present.
Date: August 17th, 2022.
Updated: August 22nd, 2022 to relect the contract's newly deployed Mainnet address.

Finding #1 - ArtemisX - Medium (Resolved)

Description: Although the following require statement in the setFees() function exists to cap total fees at 30%, the fee denominator can be set to any value.
function setFees(uint256 _liquidityFee, uint256 _rewardFee, uint256 _marketingFee, uint256 _teamFee, uint256 _devFee, uint256 _burnFee, uint256 _feeDenominator) public onlyOwner {
...
    totalFee = _liquidityFee + _rewardFee + _marketingFee + _teamFee + _burnFee + _devFee;
    feeDenominator = _feeDenominator;
    require(totalFee < 30, "Fees cannot be more than 30%");
...  
function takeFee(address sender, uint256 amount, bool isSell, address receiver) internal returns (uint256) {
...
uint256 feeAmount = amount.mul(totalFee).mul(multiplier).div(feeDenominator * 100);
Risk/Impact: The owner can modify the fee denominator to a value that will allow total fees to be set to 100%.
Recommendation: The fee denominator should not be able to be modified in the setFees() function and should instead be declared constant.
Resolution: The team has removed their ability to modify the fee denominator.

Finding #2 - ArtemisX - Informational

Description: Although the SafeMath library is used, the contract is deployed with Solidity v0.8.16 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.

Contracts Overview

  • The total supply of the token is set to 5 million [5,000,000] $ARTX.
  • No mint or burn functions are present, though the circulating supply can be reduced by sending tokens to the 0x..dead address.
  • At the time of writing this report, there are 528 total token holders. The token allocation is as follows:
    • 15.7% of the total supply has been sent to the 0x..dead address.
    • 10% of the total supply is in Pancakeswap liquidity.
    • 100% of the LP tokens belong to the deployer.
    • The next five holders own a cumulative 5.41% of the total supply.

  • The contract enforces a maximum wallet amount that prevents a transfer from occurring if the recipient's token balance will exceed the limit number of tokens (determined by the owner) after the transfer occurs.
  • The contract enforces a maximum transaction amount (determined by the owner) which imposes a limit to the number of tokens that can be transferred in a single transaction.
  • There is a Liquidity fee, Reward fee, Marketing fee, Team fee, Dev fee, and Burn fee on all transfers where neither the sender nor the recipient is excluded from fees.
  • Fees are increased by the sell multiplier rate on all sell transactions via Pancakeswap.
  • Fees are increased on all non-sell transactions when the launch fee is enabled by the team.
  • The tokens collected through the Liquidity fee are stored in the contract address. The tokens are swapped for BNB for the purpose of funding Pancakeswap liquidity when the following conditions are met:
    • The automatic liquidity add functionality is enabled by the team.
    • The threshold number of tokens (determined by the owner) in the contract address has been reached.
    • The contract is not currently performing an automatic liquidity add.
    • The caller is not initiating a buy transaction via Pancakeswap.
  • Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
  • The LP tokens received through this process are sent to the Liquidity address set by the team. We recommend that the team lock these newly acquired LP tokens.
  • The tokens collected through the Marketing fee, Team fee, and Dev fee are swapped for BNB and sent to the team's Marketing wallet, Team wallet, and Dev wallet respectively.
  • The tokens collected through the Reward fee are swapped for BNB and deposited into the DividendDistributor contract where it is swapped for BUSD and distributed as dividends amongst holders.
  • The tokens collected through the Burn fee are sent to the Burn address set by the team. This address is currently set to the 0x..dead address.

  • Any user that holds any number of tokens is eligible to claim dividends once the amount of dividends they are due reaches the minimum threshold value determined by the team.
  • Once dividends are distributed, they will need to be claimed; claiming happens automatically on each transfer.
  • Alternatively, a user can manually claim dividends as an individual.
  • There is a wait-time (determined by the owner) between dividend distribution.
  • Claimed dividends are sent to the user's wallet address.

  • The owner can set total fees up to 30% at any time.
  • The owner can include/exclude accounts from transfer fees and dividends at any time.
  • The owner can set trading to open at any time, however this functionality has no impact on token transfers.
  • The owner can enable/disable the use of the transfer blacklist before trading has been set to open.
  • The owner can add/remove addresses from the transfer blacklist before trading has been set to open.
  • The owner can enable/disable automatic liquidity adds at any time.
  • The owner can set the threshold number of tokens needed to trigger an automatic liquidity add to any value at any time.
  • The owner can set the maximum wallet amount and maximum transaction amount to any values at any time.
  • The owner can exclude and include accounts from the maximum wallet amount maximum transaction amount restrictions at any time.
  • The owner can enable/disable the launch fee at any time.
  • The owner can set the amount of gas used for processing to any value up to 750,000.
  • The owner can update the minimum threshold of dividends a user must be due in order to claim rewards to any value at any time.
  • The owner can update the wait time between dividend distribution to any value at any time.
  • The owner can update the Liquidity address, Marketing wallet, Team wallet, Dev wallet, and Burn wallet to any addresses at any time.
  • The owner can update the token symbol at any time.
  • The owner can add/remove any account as an Authorized "Launched" address at any time.
  • Launched addresses can withdraw any tokens or BNB from the contract at any time.
  • Launched addresses can set the sell multiplier to any value at any time.
  • Launched addresses can set the target liquidity and target liquidity denominator to any values at any time.

Audit Results

Vulnerability Category Notes Result
Arbitrary Jump/Storage Write N/A PASS
Centralization of Control
  • The owner can set total fees up to 30% at any time.
  • The team can set the sell multiplier to any value at any time.
  • The LP tokens generated through automatic liquidity adds are sent to the Liquidity address set by the team.
WARNING
Compiler Issues N/A PASS
Delegate Call to Untrusted Contract N/A PASS
Dependence on Predictable Variables N/A PASS
Ether/Token Theft N/A PASS
Flash Loans N/A PASS
Front Running The automatic reflection and token swapping functionality may both be susceptible to front-running; The team must monitor and if suspicious activity is detected, the team must disable these systems. The team should also ensure that no more than 0.1 BNB is used when funding the DividendDistributor contract. PASS
Improper Events N/A PASS
Improper Authorization Scheme N/A PASS
Integer Over/Underflow N/A PASS
Logical Issues N/A PASS
Oracle Issues N/A PASS
Outdated Compiler Version N/A PASS
Race Conditions N/A PASS
Reentrancy N/A PASS
Signature Issues N/A PASS
Unbounded Loops N/A PASS
Unused Code N/A PASS
Overall Contract Safety   PASS

Inheritance Chart

Smart Contract Audit - Inheritance

Function Graph

Smart Contract Audit - Graph

Functions Overview


 ($) = 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] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  Ownable (Context)
    - [Pub]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Int] IDEXFactory 
    - [Ext] createPair #

 + [Int] IDEXRouter 
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 + [Int] IDividendDistributor 
    - [Ext] setDistributionCriteria #
    - [Ext] setShare #
    - [Ext] deposit ($)
    - [Ext] process #

 +  DividendDistributor (IDividendDistributor)
    - [Pub]  #
    - [Ext] setDistributionCriteria #
       - modifiers: onlyToken
    - [Ext] setShare #
       - modifiers: onlyToken
    - [Ext] deposit ($)
       - modifiers: onlyToken
    - [Ext] process #
       - modifiers: onlyToken
    - [Int] shouldDistribute
    - [Int] distributeDividend #
    - [Ext] claimDividend #
       - modifiers: onlyToken
    - [Pub] getUnpaidEarnings
    - [Pub] getpaidEarnings
    - [Int] getCumulativeDividends
    - [Int] addShareholder #
    - [Int] removeShareholder #

 +  ArtemisX (Ownable, IBEP20)
    - [Pub]  #
    - [Ext]  ($)
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] name
    - [Ext] changeSymbol #
       - modifiers: onlyOwner
    - [Ext] symbol
    - [Ext] getOwner
    - [Pub] balanceOf
    - [Ext] allowance
    - [Pub] approve #
    - [Ext] approveMax #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Ext] setMaxTxAmountAbsolute #
       - modifiers: onlyOwner
    - [Ext] setMaxWalletAbsolute #
       - modifiers: onlyOwner
    - [Int] _transferFrom #
    - [Int] _basicTransfer #
    - [Int] checkTxLimit
    - [Int] shouldTakeFee
    - [Int] takeFee #
    - [Int] shouldSwapBack
    - [Ext] ClearForeignToken #
    - [Ext] Sell_Multiplier #
    - [Pub] EnableTrading #
       - modifiers: onlyOwner
    - [Pub] clearstuckbalance #
    - [Int] swapBack #
       - modifiers: swapping
    - [Pub] setIsDividendExempt #
       - modifiers: onlyOwner
    - [Pub] enable_blacklist #
       - modifiers: onlyOwner
    - [Pub] Enable_launchTaxes #
       - modifiers: onlyOwner
    - [Pub] Manage_blacklist #
       - modifiers: onlyOwner
    - [Pub] Manage_launch #
       - modifiers: onlyOwner
    - [Pub] SetFeeExempt #
       - modifiers: onlyOwner
    - [Pub] SetTXLimitExempt #
       - modifiers: onlyOwner
    - [Pub] setFees #
       - modifiers: onlyOwner
    - [Pub] setFeeReceivers #
       - modifiers: onlyOwner
    - [Pub] setSwapBackSettings #
       - modifiers: onlyOwner
    - [Ext] setTargetLiquidity #
    - [Pub] setDistributorSettings #
       - modifiers: onlyOwner
    - [Pub] setDistributionCriteria #
       - modifiers: onlyOwner
    - [Ext] claimDividend #
    - [Pub] getCirculatingSupply
    - [Prv] getLiquidityBacking
    - [Prv] isOverLiquified

About Solidity Finance

Solidity Finance was founded in 2020 and quickly grew 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.