Gambler Shiba - Smart Contract Audit Report

Summary

Gambler Shiba Audit Report Gambler Shiba ($GSHIBA) is a new community-driven token on the Ethereum Blockchain that implements a tiered gambling system which pays rewards to its holders.

Gambler Shiba's Token contract is deployed at 0xb892249939adbf6d7851864ca9a5c7d2d537af97 on the Ethereum blockchain mainnet.

Notes on the Contract:
  • The total supply of the token is set to 1 trillion $GSHIBA [1,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.
  • At the time of writing this report, 8.66% of the total $GSHIBA token supply is in Uniswap liquidity.
  • Out of that liquidity, 100% of the LP tokens are stored in a token locking contract that will vest to the team October 21, 2021.
  • The top four holders account for 16.63% of the circulating supply.

  • The max transaction amount is 1 trillion $GSHIBA which is equal to the total token supply.
  • There is a 12% 'Dev Fee' charged on all transactions for any address that participates in a transfer.
  • 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 project's gambling system.
  • 33.33% of that ETH is split amongst the four winners. The remaining 66.67% will be sent to a wallet controlled by the team.
  • The breakdown of the 33.33% for the four winners is as follows:
    1. The platinum tier winner will receive 13.33% of the ETH.
    2. The gold tier winner will receive 9.99% of the ETH.
    3. The silver tier winner will receive 6.66% of the ETH.
    4. The bronze tier winner will receive 3.33% of the ETH.
  • To be eligible for rewards via the project's gambling system, your 'weight' must be above a threshold value (set by the governor) which qualifies you for a specific tier. Weight is calculated based on your purchased ETH amount and your $GSHIBA holdings.
  • The winners are decided using a pseudo-random number generator for each tier, and new winners will be picked once the wait time has elapsed.
  • 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 contract also features cool-down functionality to enforce wait times between transfers and sells.

  • Although ownership has been renounced, the contract utilizes an 'OnlyGovernor' feature which restricts access of certain functions to only the assigned governor address. Any governor has the ability to add or remove other governors.
  • The governor of the contract can exclude and include accounts from the dev fee.
  • The governor has the ability to modify the tier weights to any value at any time.
  • The governor can sell the contract balance for ETH at any time.
  • The governor has the ability to bypass the wait time and transfer all of the ETH in the contract balance to the dev wallet and four winners.
  • The governor has the ability to set a migration contract at any time.
  • The contract utilizes SafeMath libraries along with following the ERC20 standard.
Audit Findings Summary
  • No external threats were identified.
  • Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
  • Date: August 6th, 2021

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesDecisions are made based on block-related
environment variables which can be manipulated
by a malicious miner. This is extremely unlikely to occur.
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

Function Graph

ERC20 Token Graph


Inheritence Chart

Multi-file Token


Functions Overview


 ($) = payable function
 # = non-constant function
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

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

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [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] IUniswapV2Factory 
    - [Ext] createPair #

 + [Int] IUniswapV2Router02 
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidityETH ($)
    - [Ext] getAmountsIn

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Prv] _functionCallWithValue #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Prv] _values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values

 +  GShibaRNG (Ownable)
    - [Pub]  #
    - [Pub] checkTierFromWeight
    - [Pub] calcWeight
    - [Int] addNewWallet #
    - [Int] removeWallet #
    - [Int] addWalletToGamblingList #
    - [Int] removeWalletFromGamblingList #
    - [Prv] rand
    - [Int] checkAndChangeGamblingWinner #
    - [Ext] setEthWeight #
       - modifiers: onlyGoverner
    - [Ext] setTierWeights #
       - modifiers: onlyGoverner
    - [Ext] setFeeMinMax #
       - modifiers: onlyGoverner
    - [Pub] addGoverner #
       - modifiers: onlyGoverner
    - [Ext] removeGoverner #
       - modifiers: onlyGoverner
    - [Ext] addV1Users #
       - modifiers: onlyOwner

 +  GamblerShiba (IERC20, Ownable, GShibaRNG)
    - [Pub]  #
       - modifiers: GShibaRNG
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] isBlackListed
    - [Ext] setExcludeFromFee #
       - modifiers: onlyGoverner
    - [Ext] addBotToBlackList #
       - modifiers: onlyOwner
    - [Ext] addBotsToBlackList #
       - modifiers: onlyOwner
    - [Ext] removeBotFromBlackList #
       - modifiers: onlyOwner
    - [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: onlyGoverner
    - [Ext] manualSend #
       - modifiers: onlyGoverner
    - [Ext] setSwapEnabled #
       - modifiers: onlyOwner
    - [Prv] _tokenTransfer #
    - [Prv] _transferStandard #
    - [Prv] _takedev #
    - [Ext]  ($)
    - [Prv] _getMaxTxAmount
    - [Pub] _getETHBalance
    - [Ext] allowDex #
       - modifiers: onlyOwner
    - [Ext] toggleCoolDown #
       - modifiers: onlyOwner
    - [Ext] toggleFeeEnabled #
       - modifiers: onlyOwner
    - [Ext] setMigrationContract #
       - modifiers: onlyGoverner