NanoMeter Beacon

Smart Contract Audit Report

Audit Summary

NanoMeter Beacon Audit Report NanoMeter Beacon is a new BEP-20 token on the Binance Smart Chain that is an automatic liquidity providing protocol.

For this audit, we reviewed the project team's nmBEN contract at 0xAB7E37268cb8a7417A81BADcd665B6b43fD06A06 on the Binance Smart Chain mainnet.

We previously reviewed the project team's NMBTC Token here.

Audit Findings


Date: March 1st, 2022.
Updated: March 7th, 2022 after the team renounced ownership.

Finding #1 - nmBEN - Informational

Description: Several functions are declared public, but are never called internally.
increaseAllowance, decreaseAllowance, burn
Recommendation: We recommend declaring these functions external for additional gas savings on each call.

Finding #2 - nmBEN - Informational

Description: The NMBTC and numTokensSellToSwapToLiquidity state variables can never be modified, but are not declared constant.
Recommendation: These state variables can be declared constant for additional gas savings on each reference and to reduce deployment costs.

Contract Overview

  • The total supply of the token is currently 2,100 $nmBEN.
  • Any user can burn their own tokens to reduce the total supply.
  • No mint functions are accessible beyond deployment.
  • At the time of writing this report, 100% of the total supply belongs to the owner.

  • There is a 2% Liquidity fee, 2% Team fee, and 2% Buyback fee on all transfers where either the sender or the recipient is a contract address and is not excluded from fees.
  • The Liquidity fee charged during transfers is stored in the contract address. The tokens are swapped for BSC-USD for the purpose of funding Pancakeswap liquidity when the following conditions are met:
    • The threshold number of 2 tokens in the contract address has been reached.
    • The contract is not currently performing an automatic liquidity add or a buyback.
    • The transfer does not involve an approved DEX.
  • Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received BSC-USD with the token, and adding it as liquidity to the pair.
  • The LP tokens received through this process are sent to the 0x666 Burn address.
  • The tokens collected from the Team fee are sent to a wallet controlled by the team.
  • The tokens collected from the Buyback fee are sent to the Forward wallet controlled by the team. A Buyback mechanism will be triggered when the following conditions are met:
    • The contract is not currently performing an automatic liquidity add or a buyback.
    • The balance of the Forward wallet has reached the threshold number of 1 token.
  • The token balance of the Forward wallet will be swapped for BSC-USD and sent to the contract. The received BSC-USD is then swapped for $NMBTC and sent to the 0x666 Burn address.
  • The contract enforces a maximum wallet amount that prevents a transfer from occurring when the following conditions are met:
    • The recipient is not a contract address.
    • The recipient is not excluded from fees.
    • The recipient's token balance will exceed the limit number of 3 tokens.
  • The contract utilizes the SafeMath library to prevent overflows/underflows.
  • The contract complies with the BEP-20 token standard.
Ownership Controls:
  • Ownership has been renounced.
  • The owner was previously able to modify the Liquidity fee, Team fee, and Buyback fee to any percentages at any time.
  • The owner was previously able to exclude and include accounts from transfer fees.
  • The owner was previously able to update the maximum wallet amount to any value at any time.
  • The owner was previously able to enable/disable the maximum wallet amount at any time.
  • The owner was previously able to enable/disable automatic liquidity adds at any time.
  • The owner was previously able to withdraw any tokens from the contract at any time.
  • The owner was previously able to enable/disable the automatic buyback mechanism at any time.
  • The owner was previously able to set the threshold number of tokens needed to trigger the automatic buyback mechanism to any value at any time.
  • The owner was previously able to pause transfers for all accounts that are not excluded from fees.
  • The owner was previously able to update the team's Fee wallet to any address at any time.
  • The owner was previously able to add any address as an approved DEX at any time.
  • The owner was previously able to update the Pancakeswap Router address at any time.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of ControlOwnership has been renounced.PASS
Compiler IssuesN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Ether/Token TheftN/APASS
Flash LoansN/APASS
Front RunningThe buyback system may be susceptible to front running however, this is unlikely to occur as the contract is deployed on Binance.WARNING
Improper EventsN/APASS
Improper Authorization SchemeN/APASS
Integer Over/UnderflowN/APASS
Logical IssuesN/APASS
Oracle IssuesN/APASS
Outdated Compiler VersionN/APASS
Race ConditionsN/APASS
ReentrancyN/APASS
Signature IssuesN/APASS
Unbounded LoopsN/APASS
Unused CodeN/APASS
Overall Contract Safety PASS

Inheritance Chart

Smart Contract Audit - Inheritance

Function Graph

Smart Contract Audit - Graph

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

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

 + [Int] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 +  Context 
    - [Int]  #
    - [Int] _msgSender
    - [Int] _msgData

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

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

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

 +  forwardContract 
    - [Pub]  #

 +  nmBEN (Context, IBEP20, Ownable)
    - [Pub]  #
    - [Int] createForwardAddress #
    - [Ext] getOwner
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Prv] _isContractTransaction
    - [Prv] transferFee #
    - [Int] swapToLiquidityOrBuyBack #
    - [Prv] swapAndLiquidity #
       - modifiers: lockTheSwap
    - [Prv] swapTokensForUSDT #
    - [Prv] addLiquidity #
    - [Prv] swapAndBuyBack #
       - modifiers: lockTheSwap
    - [Prv] swapTokensForBuyBack #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] burn #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _burnFrom #
    - [Ext] recoverToken #
       - modifiers: onlyOwner
    - [Ext] setSwapAndLiquidityEnabled #
       - modifiers: onlyOwner
    - [Ext] setSwapAndBuyBackEnabled #
       - modifiers: onlyOwner
    - [Ext] setNumTokensSellToAddToBuyBack #
       - modifiers: onlyOwner
    - [Ext] setIsPair #
       - modifiers: onlyOwner
    - [Ext] setExcludedFromFee #
       - modifiers: onlyOwner
    - [Ext] setRouter #
       - modifiers: onlyOwner
    - [Ext] setTeamWallet #
       - modifiers: onlyOwner
    - [Ext] setFeeRate #
       - modifiers: onlyOwner
    - [Ext] setPauseTransfer #
       - modifiers: onlyOwner
    - [Ext] setMaxHoldOpen #
       - modifiers: onlyOwner
    - [Ext] setMaxHoldAmount #
       - modifiers: onlyOwner

About Solidity Finance

Solidity Finance was founded in 2020 and quickly grew to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1000+ solidity smart contract audits covering all major project types and protocols, securing a total of over $10 billion U.S. dollars in on-chain value.
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!

Contact us today to get a free quote for a smart contract audit of your project!

What is a Solidity Audit?

Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.

How Do I Interpret the Findings?

Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:

  • High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
  • Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
  • Low severity issues have a relatively minor risk association; these issues have a low probability of occuring or may have a minimal impact.
  • Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.