BabyBilz - Smart Contract Audit Report

Summary

BabyBilz Audit Report BabyBilz is a new token with automatic liquidity adds and a mechanism to distribute BNB to token holders.

We audited the BabyBilz token contract at 0x317D61bA51A625218286a952f04B381a7189082a on the Binance Smart Chain mainnet.

Overview of the Contract:
  • The total supply of the token is set to one 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.
  • At the time of writing this report, 30% of the total supply has been sent to the 0x..dead address.
  • 10% of the total supply is stored in a TrustSwap Token Locker that will vest to the team on September 16, 2021.
  • The top 5 token holders control 5.25% of the total supply.
  • 29.93% of the total supply is in Pancakeswap liquidity.
  • Of that liquidity, 97.98% of the LP tokens are locked in a TrustSwap Token Locker that will vest to the team on February 16, 2022.

  • During the fixed sale, only the bounce fixed sale wallet controlled by the team can perform transfers to fixed sale early participants.
  • Trading is initially disabled for every address except the owner and the batchAddr address, which is controlled by the owner.
  • The owner must enable trading for everyone and can only do so one time; once trading is enabled, it cannot be disabled.
  • There is a maximum transaction amount of 10 billion tokens during sell transactions to PancakeSwap; this does not apply to addresses excluded from fees and during liquidity-adds.
  • There is a 12% tax fee charged on transactions that is stored in the contract balance; fees are only applied to non-excluded addresses during buy and sell tranasctions to PancakeSwap.
  • Once a threshold value is met, 16.67% of the contract balance is used to fund PancakeSwap liquidity.
  • Liquidity-adds are funded by selling half of the tokens collected as the liquidity fee, pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
  • The newly created LP tokens are sent to the liquidity address controlled by the team. We recommend that this liquidity is locked at the time of acquisition.
  • The remaining tokens in the contract balance are swapped for BNB and are transferred to the dev wallet address and the rewards wallet address, both of which are controlled by the team.

  • Any BNB sent to the BABYBILZDividendTracker contract is automatically distributed among BABYBILZ token holders.
  • Once the BNB is distributed, it will need to be claimed.
  • The distributed BNB can be claimed manually by kicking off the claim cycle, which will process all token holders.
  • Alternatively, a user can manually claim the distributed BNB as an individual.
  • The claimed BNB is sent to the user's wallet address.

  • The owner is able to set the rewards fee to any value between 8 and 10 at any time; the dev fee is consequentally adjusted so that the rewards fee and the dev fee sum to exactly 10.
  • The owner is able to exclude any address from BNB rewards at any time.
  • The owner is able to exclude any address from fees at any time.
  • The owner is able to update the Dividend Tracker and UniswapV2Router contract addresses at any time.
  • The owner is able to update the liquidity, dev, and BNB rewards wallet addresses at any time.

  • Some functions could have been declared external and some state variables could have been declared constant for gas optimization.
  • The contract is deployed with Solidity v0.8.0 and utilizes the SafeMath library to prevent overflows along with following the ERC20 standard.

Audit Findings Summary
  • No security threats from outside attackers were identified.
  • Please note that BNB is not automatically sent to the BABYBILZDividendTracker and will need to be sent manually in order to distribute rewards to token holders.
  • Ensure trust in the team as they have substantial control in the ecosystem.
  • Date: August 15th, 2021
  • Updated: August 17, 2021 for token allocation.

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
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

 + [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

 + [Lib] SafeMath 
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod

 +  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 #
    - [Ext] burn #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #

 + [Lib] SafeMathUint 
    - [Int] toInt256Safe

 + [Lib] SafeMathInt 
    - [Int] mul
    - [Int] div
    - [Int] sub
    - [Int] add
    - [Int] abs
    - [Int] toUint256Safe

 + [Int] DividendPayingTokenInterface 
    - [Ext] dividendOf
    - [Ext] distributeDividends ($)
    - [Ext] withdrawDividend #

 + [Int] DividendPayingTokenOptionalInterface 
    - [Ext] withdrawableDividendOf
    - [Ext] withdrawnDividendOf
    - [Ext] accumulativeDividendOf

 +  DividendPayingToken (ERC20, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface)
    - [Pub]  #
       - modifiers: ERC20
    - [Ext]  ($)
    - [Pub] distributeDividends ($)
    - [Pub] withdrawDividend #
    - [Int] _withdrawDividendOfUser #
    - [Pub] dividendOf
    - [Pub] withdrawableDividendOf
    - [Pub] withdrawnDividendOf
    - [Pub] accumulativeDividendOf
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _setBalance #

 + [Lib] IterableMapping 
    - [Pub] get
    - [Pub] getIndexOfKey
    - [Pub] getKeyAtIndex
    - [Pub] size
    - [Pub] set #
    - [Pub] remove #

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

 + [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] IUniswapV2Factory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #

 + [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 #

 +  BABYBILZDividendTracker (DividendPayingToken, Ownable)
    - [Pub]  #
       - modifiers: DividendPayingToken
    - [Int] _transfer
    - [Pub] withdrawDividend
    - [Ext] excludeFromDividends #
       - modifiers: onlyOwner
    - [Pub] isExcludedFromDividends
    - [Ext] getLastProcessedIndex
    - [Pub] getNumberOfTokenHolders
    - [Pub] getAccount
    - [Pub] getAccountAtIndex
    - [Ext] setBalance #
       - modifiers: onlyOwner
    - [Pub] process #
    - [Pub] processAccount #
       - modifiers: onlyOwner

 +  BABYBILZ (ERC20, Ownable)
    - [Pub]  #
       - modifiers: ERC20
    - [Ext]  ($)
    - [Pub] updateDividendTracker #
       - modifiers: onlyOwner
    - [Pub] updateUniswapV2Router #
       - modifiers: onlyOwner
    - [Pub] excludeFromFees #
       - modifiers: onlyOwner
    - [Ext] excludeFromDividends #
       - modifiers: onlyOwner
    - [Pub] excludeMultipleAccountsFromFees #
       - modifiers: onlyOwner
    - [Pub] setAutomatedMarketMakerPair #
       - modifiers: onlyOwner
    - [Prv] _setAutomatedMarketMakerPair #
    - [Pub] updateLiquidityWallet #
       - modifiers: onlyOwner
    - [Pub] updateDevWallet #
       - modifiers: onlyOwner
    - [Pub] updateRewardsWallet #
       - modifiers: onlyOwner
    - [Ext] getTotalDividendsDistributed
    - [Pub] isExcludedFromFees
    - [Pub] isExcludedFromDividends
    - [Pub] withdrawableDividendOf
    - [Pub] dividendTokenBalanceOf
    - [Ext] getAccountDividendsInfo
    - [Ext] getAccountDividendsInfoAtIndex
    - [Ext] processDividendTracker #
    - [Ext] claim #
    - [Ext] getLastProcessedIndex
    - [Ext] getNumberOfDividendTokenHolders
    - [Pub] activateTrading #
       - modifiers: onlyOwner
    - [Ext] setRewardsAndDevFees #
       - modifiers: onlyOwner
    - [Int] _transfer #
    - [Prv] swapAndLiquify #
    - [Prv] swapTokensForEth #
    - [Prv] addLiquidity #
    - [Prv] swapAndSend #