Brick Inu - Smart Contract Audit Report

Summary

BrickInu Audit Report Brick Inu is a new token with frictionless fee redistribution and a lottery system.

We audited the BrickInu token contract using code provided to us by the project team.

Overview of the Contract:
  • The total supply of the token is set to 2.5 trillion.
  • No mint or burn functions are present, though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
  • Initially, 100% of the total supply will be held by the owner.

  • There is a tax fee and a dev fee charged on all transactions.
  • 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 through the dev fee are stored in the contract and, once a threshold value is met, the tokens (up to the maximum transaction amount) are sold for ETH and used to fund the team's lottery system.
  • 3 winners will each receive 19.44% of the ETH received, and the remaining ETH will be sent to wallets controlled by the team.
  • The winners are decided using a pseudo-random number generator, and new winners will be picked once the wait time has elapsed.
  • The contract also features cool-down functionality to enforce wait times between transfers and sells.

  • The owner of the contract can exclude and include users from transfer fees or rewards, set the maximum transfer amount, and update each of the fee percentages to any value up to 15% at any time.
  • The owner is able to block any address (except for the Uniswap Router) from transfers via a blacklist at any time; and can remove anyone from the blacklist as well.
  • Users who trade within the launch block will be blacklisted automatically.
  • The owner can toggle the swap functionality, cool down functionality, and enable or disable fees at any time.
  • The owner has the ability to disable buying and selling at any time; enabling buying and selling resets the launch block.
  • The owner can set the wait time between picking lottery winners to any value at any time.
  • The owner can add add any wallet address to the lottery pool at any time.
  • The owner can sell the contract balance for ETH at any time.
  • The owner can transfer all of the ETH in the contract balance to various wallets controlled by the team at any time.
  • The randomness function, to an extent, relies on predictable environment variables. This is common, albiet not best practice; but the probability of miners maliciously changing these variables is extremley low.
  • The team worked with us to optimize this contract for gas efficiency.
  • The contract utilizes SafeMath libraries to prevent overflows along with following the ERC20 standard.

Audit Findings Summary
  • No security threats from outside attackers were identified.
  • Ensure trust in the team as they have substantial power in the ecosystem and can extract the ETH from the contract at any time.
  • Date: July 24nd, 2021

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesRandomness relies on a series of environmental variables.
Probability of a negative impact is very low.
WARNING
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Flash LoansN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
OraclesN/APASS
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

BEP20 Token Graph

Multi-file Token

												
($) = 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
    - [Prv] 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 #

 +  BrickInu (Context, IERC20, Ownable)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] isExcluded
    - [Pub] isBlackListed
    - [Pub] isEligible
    - [Ext] setExcludeFromFee #
       - modifiers: onlyOwner
    - [Prv] totalFees
    - [Prv] deliver #
    - [Pub] reflectionFromToken
    - [Pub] tokenFromReflection
    - [Ext] excludeAccount #
       - modifiers: onlyOwner
    - [Ext] includeAccount #
       - modifiers: onlyOwner
    - [Ext] addBotToBlackList #
       - modifiers: onlyOwner
    - [Ext] addBotsToBlackList #
       - modifiers: onlyOwner
    - [Ext] removeBotFromBlackList #
       - modifiers: onlyOwner
    - [Ext] manualAddWalletToDevList #
       - modifiers: onlyOwner
    - [Prv] addWalletToDevList #
    - [Prv] removeWalletFromDevList #
    - [Prv] removeAllFee #
    - [Prv] restoreAllFee #
    - [Pub] isExcludedFromFee
    - [Ext] setMaxTxPercent #
       - modifiers: onlyOwner
    - [Ext] setMaxTxAmount #
       - modifiers: onlyOwner
    - [Prv] _approve #
    - [Prv] _transfer #
    - [Prv] swapTokensForEth #
       - modifiers: lockTheSwap
    - [Prv] sendETHTodev #
    - [Ext] manualSwap #
       - modifiers: onlyOwner
    - [Ext] manualSend #
       - modifiers: onlyOwner
    - [Ext] setSwapEnabled #
       - modifiers: onlyOwner
    - [Prv] randwallet
    - [Prv] randwallet2
    - [Prv] randwallet3
    - [Prv] generateRandomNumber
    - [Prv] generateRandomNumber2
    - [Prv] generateRandomNumber3
    - [Prv] randtime
    - [Prv] _tokenTransfer #
    - [Prv] _transferStandard #
    - [Prv] _transferToExcluded #
    - [Prv] _transferFromExcluded #
    - [Prv] _transferBothExcluded #
    - [Prv] _takedev #
    - [Prv] _reflectFee #
    - [Ext]  ($)
    - [Prv] _getValues
    - [Prv] _getTValues
    - [Prv] _getRValues
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Prv] _getTaxFee
    - [Prv] _getMaxTxAmount
    - [Prv] _getETHBalance
    - [Ext] _setTaxFee #
       - modifiers: onlyOwner
    - [Ext] _setdevFee #
       - modifiers: onlyOwner
    - [Ext] _setdevWallet #
       - modifiers: onlyOwner
    - [Ext] AllowDex #
       - modifiers: onlyOwner
    - [Ext] ToggleCoolDown #
       - modifiers: onlyOwner
    - [Ext] TogglefeeEnabled #
       - modifiers: onlyOwner
    - [Ext] setCoolDown #
       - modifiers: onlyOwner
    - [Ext] setMinBetweenShuffle #
       - modifiers: onlyOwner