Infinity Mining Token - Smart Contract Audit Report
Infinity Mining Token ($IMT) is a new ERC-20 token on Ethereum that pays out dividends to holders.
We reviewed the IMT contract at 0xC66e9E56cFe33471F0826B2531b5BA490de4732A on the Ethereum mainnet.
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: February 25th, 2022.
Finding #1 - IMT - MediumDescription: The totalFee fee denominator is not updated in the setDevelopmentFee() and setRewardFee() functions.
Risk/Impact: The percentage of ETH that is split between funding Dividends and the Development wallet in the swapAndDistribute() function will be miscalculated as the fee denominator will no longer be accurate.
Recommendation: The totalFee variable should be updated in both the setDevelopmentFee() and setRewardFee() functions.
Finding #2 - IMT - InformationalDescription: Several functions are declared public, but are never called internally.Recommendation: We recommend declaring these functions external for additional gas savings on each call.
withdrawDividend, reinvestDividend, dividendOf, updateDividendTracker, updateUniswapV2Router, isExcludedFromFees
Finding #3 - IMT - InformationalDescription: The
swapTokensAtAmountstate variable can never be modified, but is not declared constant.
Recommendation: This state variable can be declared constant for additional gas savings on each reference and to reduce deployment costs.
- The total supply of the token is set to 5 billion $IMT [5,000,000,000].
- No mint functions are accessible beyond deployment.
- Any user can burn their own tokens to reduce the total supply.
- At the time of writing this report, there are 903 total token holders. The token allocation is as follows:
- 6.28% of the total supply is in Uniswap liquidity.
- Of that liquidity, 100% of the LP tokens are stored in a UniCrypt token locking contract and will vest to the team on June 10th, 2022.
- The next five holders own a cumulative 17.1% of the total supply.
- There is a Rewards fee and Development fee on all transfers via Uniswap where neither the sender nor the recipient is excluded from fees.
- The fees charged during transfers are stored in the contract address. The tokens are swapped for ETH when the following conditions are met:
- The threshold number of 200,000 tokens in the contract address has been reached.
- The contract is not currently performing an automatic token swap.
- The transfer is a selling transaction via Uniswap.
- Neither the sender nor the recipient is excluded from fees.
- A portion of the ETH received through this process is sent to the team's Development wallet.
- The remaining ETH received through this process is sent to the IMTRewardToken contract where it is distributed as rewards.
- As the contract is deployed with Solidity v0.8.4, it is protected from overflows/underflows.
- The contract complies with the ERC-20 token standard.
- Any user that holds any number of $IMT tokens is eligible to claim dividends.
- Once dividends are distributed, they can be manually claimed by users at any time.
- Claimed dividends are sent to the user's wallet address.
- There is no wait-time between claiming dividend rewards.
- A user can elect to reinvest their dividends which will swap the amount of ETH dividends due to them for $IMT tokens and send it to the user's wallet address.
- The owner can set Rewards fee and Development fee to any percentages at any time.
- The owner can exclude addresses from transfer fees and dividends at any time.
- The owner can update the Dividend Tracker and IMT Token contract addresses at any time.
- The owner can update the Automated Market Maker Pair and Uniswap Router contract addresses at any time.
External Threat Results
|Arbitrary Storage Write||N/A||PASS|
|Centralization of Control||The owner can set each fee percentage up to 100%.||WARNING|
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
|Logical Issues||The totalFee fee denominator is not updated after the Rewards fee or Development fee is updated.||FAIL|
|State Change External Calls||N/A||PASS|
|User Supplied Assertion||N/A||PASS|
|Critical Solidity Compiler||N/A||PASS|
|Overall Contract Safety||FAIL|
($) = payable function # = non-constant function + [Lib] SafeMathUint - [Int] toInt256Safe + [Lib] SafeMathInt - [Int] mul - [Int] div - [Int] sub - [Int] add - [Int] abs - [Int] toUint256Safe + Context - [Int] _msgSender - [Int] _msgData + Ownable (Context) - [Pub]
# - [Pub] owner - [Pub] renounceOwnership # - modifiers: onlyOwner - [Pub] transferOwnership # - modifiers: onlyOwner - [Int] _transferOwnership # + [Int] IERC20 - [Ext] totalSupply - [Ext] balanceOf - [Ext] transfer # - [Ext] allowance - [Ext] approve # - [Ext] transferFrom # + [Int] IERC20Metadata (IERC20) - [Ext] name - [Ext] symbol - [Ext] decimals + 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 # - [Int] _afterTokenTransfer # + [Lib] SafeMath - [Int] tryAdd - [Int] trySub - [Int] tryMul - [Int] tryDiv - [Int] tryMod - [Int] add - [Int] sub - [Int] mul - [Int] div - [Int] mod - [Int] sub - [Int] div - [Int] mod + [Int] IIMT - [Ext] reinvestReflections ($) + IMTRewardToken (ERC20, Ownable) - [Pub] # - modifiers: ERC20 - [Ext] ($) - [Pub] distributeDividends ($) - [Pub] withdrawDividend # - [Pub] reinvestDividend # - [Int] _withdrawDividendOfUser # - [Int] _reinvestDividend # - [Pub] dividendOf - [Pub] withdrawableDividendOf - [Pub] withdrawnDividendOf - [Pub] accumulativeDividendOf - [Int] _transfer # - [Int] _mint # - [Int] _burn # - [Ext] setBalance # - [Int] _setBalance # - [Ext] excludeFromDividends # - modifiers: onlyOwner - [Ext] includeInDividends # - modifiers: onlyOwner - [Ext] setToken # - modifiers: onlyOwner - [Ext] accountInfo + [Int] IUniswapV2Pair - [Ext] name - [Ext] symbol - [Ext] decimals - [Ext] totalSupply - [Ext] balanceOf - [Ext] allowance - [Ext] approve # - [Ext] transfer # - [Ext] transferFrom # - [Ext] DOMAIN_SEPARATOR - [Ext] PERMIT_TYPEHASH - [Ext] nonces - [Ext] permit # - [Ext] MINIMUM_LIQUIDITY - [Ext] factory - [Ext] token0 - [Ext] token1 - [Ext] getReserves - [Ext] price0CumulativeLast - [Ext] price1CumulativeLast - [Ext] kLast - [Ext] mint # - [Ext] burn # - [Ext] swap # - [Ext] skim # - [Ext] sync # - [Ext] initialize # + [Int] IUniswapV2Router01 - [Ext] factory - [Ext] WETH - [Ext] addLiquidity # - [Ext] addLiquidityETH ($) - [Ext] removeLiquidity # - [Ext] removeLiquidityETH # - [Ext] removeLiquidityWithPermit # - [Ext] removeLiquidityETHWithPermit # - [Ext] swapExactTokensForTokens # - [Ext] swapTokensForExactTokens # - [Ext] swapExactETHForTokens ($) - [Ext] swapTokensForExactETH # - [Ext] swapExactTokensForETH # - [Ext] swapETHForExactTokens ($) - [Ext] quote - [Ext] getAmountOut - [Ext] getAmountIn - [Ext] getAmountsOut - [Ext] getAmountsIn + [Int] IUniswapV2Router02 (IUniswapV2Router01) - [Ext] removeLiquidityETHSupportingFeeOnTransferTokens # - [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens # - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens # - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($) - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens # + [Int] IUniswapV2Factory - [Ext] feeTo - [Ext] feeToSetter - [Ext] getPair - [Ext] allPairs - [Ext] allPairsLength - [Ext] createPair # - [Ext] setFeeTo # - [Ext] setFeeToSetter # + IMT (ERC20, Ownable) - [Pub] # - modifiers: ERC20 - [Ext] ($) - [Ext] setDevelopmentFee # - modifiers: onlyOwner - [Ext] setRewardFee # - modifiers: onlyOwner - [Int] setTotalFee # - [Ext] setDevelopmentAddress # - modifiers: onlyOwner - [Ext] enableTrading # - modifiers: onlyOwner - [Pub] updateDividendTracker # - modifiers: onlyOwner - [Pub] updateUniswapV2Router # - modifiers: onlyOwner - [Pub] excludeFromFees # - modifiers: onlyOwner - [Pub] setAutomatedMarketMakerPair # - modifiers: onlyOwner - [Prv] _setAutomatedMarketMakerPair # - [Pub] isExcludedFromFees - [Ext] reinvestReflections ($) - [Int] _transfer # - [Prv] swapTokensForEth # - [Int] swapEthForTokens # - [Prv] swapAndDistribute # - [Ext] burn #