Marshall Rogan Inu - Smart Contract Audit Report

Audit Summary

Marshall Rogan Inu Audit Report Marshall Rogan Inu ($MRI) is a new ERC-20 token on Ethereum that provides automatic liquidity adds.

We reviewed the MarshallRoganInu contract at 0x0913dDAE242839f8995c0375493f9a1A3Bddc977 on the Ethereum mainnet.

Audit Findings

Please ensure trust in the team prior to investing as they have notable control in the ecosystem.
Date: February 14th, 2022.

Finding #1 - MarshallRoganInu - Informational

Description: Two functions are declared public, but are never called internally.
			
setAutomatedMarketMakerPair, isExcludedFromFees
Recommendation: We recommend declaring these functions external for additional gas savings on each call.

Finding #2 - MarshallRoganInu - Informational

Description: The manualBurnFrequency state variable can never be modified, but is not declared constant.
Recommendation: This state variable can be declared constant for additional gas savings on each call.

Finding #3 - MarshallRoganInu - Informational

Description: Although the SafeMath library is utilized, the contract is deployed with Solidity v0.8.10 which has built-in overflow checks.
Recommendation: SafeMath could be safely removed to reduce contract size and deployment costs.

Contract Overview

  • The total supply of the token is set to 1 billion $MRI [1,000,000,000].
  • No mint or burn functions exist, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
  • At the time of writing this report, there are 3,850 total token holders. The token allocation is as follows:
    • 5.32% of the total supply is in Uniswap liquidity.
    • Of that liquidity, 65.92% of the LP tokens have been sent to the 0x..dead address.
    • 33.95% of the LP tokens are stored in the SNAP! Liquidity Pools contract.
    • 1.70% of the total supply has been sent to the 0x..dead address.
    • The next five holders own a cumulative 7.63% of the total supply.

  • The contract enforces a transfer delay which prevents a transfer from occurring if the user is attempting to buy from Uniswap more than one time per block.
  • The contract enforces a maximum wallet amount which prevents a transaction from occurring if the recipient's balance will exceed the limit number of tokens (determined by the owner) after the transaction takes place.
  • The contract enforces a maximum transaction amount which imposes a limit to the number of tokens that can be transferred during any given transaction via Uniswap.
  • There is a Liquidity fee, Marketing fee, and Dev fee on all transfers via Uniswap where neither the sender nor the recipient is excluded from fees. A separate fee structure can be set by the team to apply different fee percentages depending on whether the user is buying or selling during the transfer.
  • The fees charged during transfers are stored in the contract address. Once a threshold number of tokens (determined by the owner) is met, the tokens are swapped for ETH for the purpose of funding Uniswap liquidity.
  • Liquidity-adds are automatically done by selling the tokens collected as fees, pairing the received ETH with the token, and adding it as liquidity to the pair.
  • The LP tokens received through this process are sent to the 0x..dead address.
  • The tokens collected from the Marketing and Dev fee are swapped for ETH and sent to the team's Marketing wallet and Dev wallet respectively.
  • A percentage of tokens (determined by the owner) in the Uniswap pair address will automatically be sent to the 0x..dead address on all sell transfers via Uniswap as long as the wait time has passed.
  • As the contract is deployed with Solidity v0.8.10, it is protected from overflows/underflows.
  • The contract complies with the ERC-20 token standard.
Ownership Controls:
  • The owner can modify the Liquidity fee, Marketing fee, and Dev fee for both the buy and sell fee structures. The total fee percentages combined must not exceed 20% when buying and 25% when selling.
  • The owner can exclude and include accounts from transfer fees.
  • The owner can update the maximum wallet amount to any value greater than 5 million tokens.
  • The owner can update the maximum transaction amount to any value greater than 100,000 tokens.
  • The owner can exclude/include accounts from the maximum wallet amount and maximum transaction amount restrictions at any time.
  • The owner can enable/disable the automatic swapping functionality at any time.
  • The owner can update the threshold number of tokens needed to trigger the automatic swapping functionality to any value between 10,000 and 5 million tokens.
  • The owner can update the percentage of tokens that are automatically sent to the 0x..dead address from the Uniswap Pair address on sells via Uniswap to any percentage between 0% and 10%.
  • The owner can update the amount of time that must pass before the above functionality can reoccur to any time greater than 10 minutes (in seconds).
  • The owner can also manually trigger the Uniswap Pair token burning functionality once the wait time has passed.
  • The owner can disable the transfer delay restriction at any time.
  • The owner can update the team's Marketing wallet and Dev wallet to any addresses at any time.
  • The owner can update the Automated Market Maker Pair contract address at any time.

External Threat Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Centralization of ControlThe owner can set total buy fees up to 20% and total sell fees up to 25%.PASS
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
Logical IssuesN/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

BEP20 Token Graph

Inheritance Chart

Multi-file Token

Functions Overview

												
($) = payable function
 # = non-constant function

 +  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] 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] IUniswapV2Router02 
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 +  MarshallRoganInu (ERC20, Ownable)
    - [Pub]  #
       - modifiers: ERC20
    - [Ext]  ($)
    - [Ext] enableTrading #
       - modifiers: onlyOwner
    - [Ext] removeLimits #
       - modifiers: onlyOwner
    - [Ext] disableTransferDelay #
       - modifiers: onlyOwner
    - [Ext] updateSwapTokensAtAmount #
       - modifiers: onlyOwner
    - [Ext] updateMaxTxnAmount #
       - modifiers: onlyOwner
    - [Ext] updateMaxWalletAmount #
       - modifiers: onlyOwner
    - [Pub] excludeFromMaxTransaction #
       - modifiers: onlyOwner
    - [Ext] updateSwapEnabled #
       - modifiers: onlyOwner
    - [Ext] updateBuyFees #
       - modifiers: onlyOwner
    - [Ext] updateSellFees #
       - modifiers: onlyOwner
    - [Pub] excludeFromFees #
       - modifiers: onlyOwner
    - [Pub] setAutomatedMarketMakerPair #
       - modifiers: onlyOwner
    - [Prv] _setAutomatedMarketMakerPair #
    - [Ext] updateMarketingWallet #
       - modifiers: onlyOwner
    - [Ext] updateDevWallet #
       - modifiers: onlyOwner
    - [Pub] isExcludedFromFees
    - [Int] _transfer #
    - [Prv] swapTokensForEth #
    - [Prv] addLiquidity #
    - [Prv] swapBack #
    - [Ext] setAutoLPBurnSettings #
       - modifiers: onlyOwner
    - [Int] autoBurnLiquidityPairTokens #
    - [Ext] manualBurnLiquidityPairTokens #
       - modifiers: onlyOwner