ScaryChainCapital - Smart Contract Audit Report
SummaryScaryChainCapital ($SCC) is a new community-driven DeFi token that pays out static rewards to holders.
For this audit, we reviewed the ScaryChainCapital contract using code that was provided to us by the team.
Notes on the Contract:
Audit Findings Summary
- The total supply of the token is set to 2 trillion $SCC [2,000,000,000,000].
- No minting or burn functions are present; though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
- There was no token allocation for our team to analyze as the contract has yet to be deployed to the mainnet.
- There is a tax fee and team fee on all transactions for any "non-excluded" address that participates in a transfer via Uniswap.
- Users who hold tokens will automatically benefit from the frictionless fee redistribution at the time of each transaction as the tokens collected through the tax fee are removed from the circulating supply.
- The tokens collected from the team fee during transfers are stored in the contract address balance. Once the threshold value of tokens (determined by the owner) is met, the tokens are swapped for ETH and split between two wallets controlled by the team.
- The contract utilizes the Safemath library to prevent overflows.
- The owner can modify both the tax fee and team fee to any percentages up to 25%.
- The owner can exclude and include accounts from transfer fees and reward distribution.
- The owner can set and update a maximum transaction amount at any time, which will impose a limit to the number of tokens that can be transferred during any given transaction.
- The owner can enable/disable and manually trigger the swapping functionality at any time.
- The owner can update the threshold number of tokens needed to automatically trigger the swapping functionality to any value above 5,000.
- The owner can update the percentages of ETH that gets allocated to each of the two team wallets.
- The owner can update the team's SCC wallet to any address at any time.
- The owner can update the Uniswap Router and Pair addresses at any time.
- The owner can use the "lock" function in order to temporarily set ownership to address(0). Ownership is restored after the duration of time determined by the owner has passed and they use the 'unlock' function.
- The unlock function has the potential to be used after ownership is renounced, which will restore ownership to the original owner that initially created the ownership lock. This can be used in a nefarious way by the project team to restore ownership and change fee structures.
- We recommend that the unlock function is modified to set the "previous owner" = "address(0)" at the end of the unlock function to prevent it from being used more than once per lock.
- No external threats were identified.
- As with any presale, please ensure trust in the team prior to investing.
- Further ensure trust as the team has substantial control in the ecosystem.
- Date: December 6th, 2021
|Arbitrary Storage Write||N/A||PASS|
|Centralization of Control||The owner can set total fees up to 50%.||WARNING|
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
|State Change External Calls||N/A||PASS|
|User Supplied Assertion||N/A||PASS|
|Critical Solidity Compiler||N/A||PASS|
|Overall Contract Safety||PASS|
($) = payable function # = non-constant function + Context - [Int] _msgSender - [Int] _msgData + [Int] IERC20 - [Ext] totalSupply - [Ext] balanceOf - [Ext] transfer # - [Ext] allowance - [Ext] approve # - [Ext] transferFrom # + [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 # + Ownable (Context) - [Int]
# - [Pub] owner - [Pub] renounceOwnership # - modifiers: onlyOwner - [Pub] transferOwnership # - modifiers: onlyOwner - [Pub] geUnlockTime - [Pub] lock # - modifiers: onlyOwner - [Pub] unlock # + [Int] IUniswapV2Factory - [Ext] feeTo - [Ext] feeToSetter - [Ext] getPair - [Ext] allPairs - [Ext] allPairsLength - [Ext] createPair # - [Ext] setFeeTo # - [Ext] setFeeToSetter # + [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 # + ScaryChainCapital (Context, IERC20, Ownable) - [Pub] # - [Pub] name - [Pub] symbol - [Pub] taxFee - [Pub] teamFee - [Pub] decimals - [Pub] totalSupply - [Pub] balanceOf - [Pub] transfer # - [Pub] allowance - [Pub] approve # - [Pub] setAutomatedMarketMakerPair # - modifiers: onlyOwner - [Prv] _setAutomatedMarketMakerPair # - [Pub] transferFrom # - [Pub] increaseAllowance # - [Pub] decreaseAllowance # - [Pub] isExcluded - [Ext] setExcludeFromFee # - modifiers: onlyOwner - [Pub] totalFees - [Pub] deliver # - [Pub] reflectionFromToken - [Pub] tokenFromReflection - [Pub] excludeAccount # - modifiers: onlyOwner - [Pub] includeAccount # - modifiers: onlyOwner - [Prv] removeAllFee # - [Prv] restoreAllFee # - [Pub] isExcludedFromFee - [Prv] _approve # - [Prv] _transfer # - [Prv] swapTokensForEth # - modifiers: lockTheSwap - [Prv] sendETHToTeam # - [Ext] manualSwap # - modifiers: onlyOwner - [Ext] manualSend # - modifiers: onlyOwner - [Ext] setSwapEnabled # - modifiers: onlyOwner - [Prv] _tokenTransfer # - [Prv] _transferStandard # - [Prv] _transferToExcluded # - [Prv] _transferFromExcluded # - [Prv] _transferBothExcluded # - [Prv] _takeTeam # - [Prv] _reflectFee # - [Ext] ($) - [Prv] _getValues - [Prv] _getTValues - [Prv] _getRValues - [Prv] _getRate - [Prv] _getCurrentSupply - [Prv] _getTaxFee - [Prv] _getMaxTxAmount - [Pub] _getETHBalance - [Ext] changeRouterVersion # - modifiers: onlyOwner - [Ext] _setTaxFee # - modifiers: onlyOwner - [Ext] _setTeamFee # - modifiers: onlyOwner - [Ext] _setFees # - modifiers: onlyOwner - [Ext] _setTeamPercent # - modifiers: onlyOwner - [Ext] _setSCCWallet # - modifiers: onlyOwner - [Ext] _setNumOfTokensToExchangeForTeam # - modifiers: onlyOwner - [Ext] _setMaxTxAmount # - modifiers: onlyOwner