Memex Token & Sale - Smart Contract Audit Report

Summary

Memex Audit Report Memex intends to build a dex and coin tracker for meme tokens.

For this audit we reviewed the project's token and presale contracts at commit 34c9ac6ba6c6a810802cb7e4febb2a030d2bafab and again later at commit 8bdf3b09d98c6925bbb8ed0ac595e6ef7a24e5ab on GitHub. The combined source code is available below.
Please note we have not reviewed the project's upcoming decentralized exchange.

Notes of the Token Contract:
  • The total supply of the token is 10 million.
  • At the time of deployment, 90% of the supply will be sent to the deployer, while the remaining 10% is sent to a specified wallet address.
  • No minting or burning functions are accessible after deployment; though the circulating supply can be decreased by sending tokens to the 0xdead address.
  • No ownership-protected functions relating to the token are present.
  • The contract utilizes Solidity ^0.8.0 which has built-in overflow checks, removing the need for SafeMath.
Notes of the Presale Contract:
  • This contract allows whitelisted users to purchase tokens at a pre-determined price.
  • The team will set the price of the token upon deployment.
  • Tokens can only be purchased between the opening and closing time of the presale, as set by the team.
  • Users will be delivered 10% of their purchased tokens when buying, and 10% are immedietly claimable.
  • Each month thereafter, buyers are meant to claim 10% of their tokens.
  • The team can withdraw all of the tokens from the contract after the sale is completed, including the unvested tokens.
  • The contract utilizes Solidity ^0.8.0 which has built-in overflow checks, removing the need for SafeMath.
  • ReentrancyGuard is also used when purchasing tokens to prevent reentrancy attacks.
Audit Findings Summary
  • No issues from external attackers were identified.
  • As with any presale, ensure trust in the team prior to investing.
  • Further, ensure trust in the team as they have the ability to take unvested tokens.
  • Date: April 17th, 2021.

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

ERC20 Token Graph

Multi-file Token


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

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

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

 +  Owned 
    - [Pub]  #

 +  ERC20 (Context, Owned, IERC20)
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _approve #

 +  ERC20Detailed (ERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals

 + [Lib] Address 
    - [Int] isContract

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeApprove #
    - [Prv] callOptionalReturn #

 +  MEMEX (ERC20, ERC20Detailed)
    - [Pub]  #
       - modifiers: ERC20Detailed

 +  sale (Owned)
    - [Pub]  #
    - [Ext]  ($)
    - [Ext]  ($)
    - [Pub] token
    - [Pub] wallet
    - [Pub] rate
    - [Pub] weiRaised
    - [Pub] buyTokens ($)
    - [Pub] sendBack #
       - modifiers: onlyOwner,whileClosed
    - [Int] _preValidatePurchase #
       - modifiers: onlyWhileOpen
    - [Int] _postValidatePurchase
    - [Int] _deliverTokens #
    - [Pub] withdrawTokens #
       - modifiers: whileClosed
    - [Int] _getTokenAmount
    - [Int] _forwardFunds #
    - [Pub] hasClosed
    - [Ext] addToWhitelist #
       - modifiers: onlyOwner
    - [Ext] addManyToWhitelist #
       - modifiers: onlyOwner
    - [Ext] removeFromWhitelist #
       - modifiers: onlyOwner