DailySwap Tokens - Smart Contract Audit Report

Summary

BerrySwap Audit Report DailySwap intends to build a decentralized exchange platform built on the Binance Smart chain (BSC) protocol.

The DailySwap team has deployed two tokens at the mainnet addresses below on the Binance Smart Chain:

  • Daily Token has been deployed to 0xb20b17d86f868b9c2a1e6201ba881d68c1325de4
  • DailyS Token has been deployed to 0xe0d6ad5a77fd1ed1a22f89657e4248a8ac6a8cbf

  • Please note we have not reviewed DailySwap's exchange or any other contracts beyond these tokens.

    Notes on the Daily Token Contract:
  • The token has an initial total supply of 1 million, which was delivered to the team upon deployment. The supply at the time of writing this report is ~753,000.
  • ❗While 11.5% of the total supply is locked in liquidity at PancakeSwap, the deployer holds 30% of the supply - we recommend the team lock a large proportion of these tokens.
  • ❗The owner has the ability to mint an unlimited amount of tokens at any time. Anyone has the ability to burn their own tokens.
  • The team can call the finishMinting function to prevent further minting. We recommend they do so.

  • The contract is compliant with the ERC677 standard, adding the transferAndCall() function which enables additional use cases like cross-chain swaps via BurgerSwap.
  • Once the address of the BurgerSwap bridge has been set by the team, it cannot be updated.
  • Kindly note that our team has not audited Burgerswap's cross-chain bridge mechanism.
  • The owner can recover any tokens or BNB erroneously sent to the contract address.
  • The hasMintPermission modifier contains the same logic as the onlyOwner modifier; thus it can be removed. As this contract is already deployed, this is informational.
  • Some gas optimizations can be achieved through declaring functions external instead of public. As this contract is already deployed, this is informational.
  • The contract utilizes SafeMath to prevent overflows.

  • Notes on the DailyS Token Contract:
  • The token has a total supply of 200 million, which was delivered to the team upon deployment.
  • ❗While no mint function exists, the owner can set his balance to totalDistributed amount (~200 million) at any time using the Daily() function, effectively giving himself tokens. Ownership cannot be renounced.
  • ❗While 2% of the total supply is locked as liquidity in BSCswap, the deployer holds 11% of the supply, and another wallet holds 15%. - The team has locked 50% of the total supply on our recommendation.

  • The contract allows users to purchase tokens from it using BNB. Once invested, that address cannot invest again. The owner can withdraw the BNB raised at any time.
  • The logic used in purchasing tokens performs a multiplication on the result of a division. This could lead to less accurate results.
  • The owner can recover any tokens or BNB in the contract.
  • Some gas optimizations can be achieved through declaring functions external instead of public and marking some variables constant. As this contract is already deployed, this is informational.
  • The contract utilizes SafeMath to prevent overflows.


  • Audit Findings Summary:
    • ✅No security issues from outside attackers were identified.
    • ❗Concerns around the team's level of control exist. Ensure trust in the team as they have the ability to mint tokens at any time and they hold a large portion of the tokens' supply.
    • KYC Conducted: No
    • Date: March 14th, 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
    Integer Over/UnderflowN/APASS
    Multiple SendsN/APASS
    SuicideN/APASS
    State Change External CallsN/APass
    Unchecked RetvalN/APASS
    User Supplied AssertionN/APASS
    Critical Solidity CompilerN/APASS
    Overall Contract Safety PASS

    Smart Contract Graph

    Contract Inheritance

    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
     
     +  BEP20Basic 
        - [Pub] totalSupply
        - [Pub] balanceOf
        - [Pub] transfer #
    
     + [Lib] SafeMath 
        - [Int] mul
        - [Int] div
        - [Int] sub
        - [Int] add
    
     +  BasicToken (BEP20Basic)
        - [Pub] totalSupply
        - [Pub] transfer #
        - [Pub] balanceOf
    
     +  BurnableToken (BasicToken)
        - [Pub] burn #
        - [Int] _burn #
    
     +  BEP20 (BEP20Basic)
        - [Pub] allowance
        - [Pub] transferFrom #
        - [Pub] approve #
    
     +  StandardToken (BEP20, BasicToken)
        - [Pub] transferFrom #
        - [Pub] approve #
        - [Pub] allowance
        - [Pub] increaseApproval #
        - [Pub] decreaseApproval #
    
     +  Ownable 
        - [Pub]  #
        - [Pub] renounceOwnership #
           - modifiers: onlyOwner
        - [Pub] transferOwnership #
           - modifiers: onlyOwner
        - [Int] _transferOwnership #
    
     +  MintableToken (StandardToken, Ownable)
        - [Pub] mint #
           - modifiers: hasMintPermission,canMint
        - [Pub] finishMinting #
           - modifiers: onlyOwner,canMint
    
     +  DetailedBEP20 (BEP20)
        - [Pub]  #
    
     +  BEP677 (BEP20)
        - [Ext] transferAndCall #
    
     +  IBurnableMintableBEP677Token (BEP677)
        - [Pub] mint #
        - [Pub] burn #
        - [Pub] claimTokens #
    
     +  BEP677Receiver 
        - [Ext] onTokenTransfer #
    
     +  BEP677BridgeToken (IBurnableMintableBEP677Token, DetailedBEP20, BurnableToken, MintableToken)
        - [Pub]  #
           - modifiers: DetailedBEP20
        - [Pub] setBridgeContract #
           - modifiers: onlyOwner
        - [Ext] transferAndCall #
           - modifiers: validRecipient
        - [Pub] getTokenInterfacesVersion
        - [Int] superTransfer #
        - [Pub] transfer #
        - [Prv] contractFallback #
        - [Prv] isContract
        - [Pub] finishMinting #
        - [Pub] renounceOwnership #
           - modifiers: onlyOwner
        - [Pub] claimTokens #
           - modifiers: onlyOwner
    	
    							

    Smart Contract Graph

    Contract Inheritance

    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
     
     + [Lib] SafeMath 
        - [Int] mul
        - [Int] div
        - [Int] sub
        - [Int] add
    
     +  Owned 
    
     +  ForeignToken 
        - [Pub] balanceOf
        - [Pub] transfer #
    
     +  BEP20Basic 
        - [Pub] balanceOf
        - [Pub] transfer #
    
     +  BEP20 (BEP20Basic)
        - [Pub] allowance
        - [Pub] transferFrom #
        - [Pub] approve #
    
     + [Int] Token 
        - [Ext] distr #
        - [Ext] totalSupply
        - [Ext] balanceOf
    
     +  DailySwap (BEP20)
        - [Pub] Daily #
           - modifiers: onlyOwner
        - [Pub] finishDistribution #
           - modifiers: onlyOwner,canDistr
        - [Prv] distr #
           - modifiers: canDistr
        - [Ext]  ($)
        - [Pub] getTokens ($)
           - modifiers: canDistr,onlyWhitelist
        - [Pub] balanceOf
        - [Pub] transfer #
           - modifiers: onlyPayloadSize
        - [Pub] transferFrom #
           - modifiers: onlyPayloadSize
        - [Pub] approve #
        - [Pub] allowance
        - [Pub] getTokenBalance
        - [Pub] withdraw #
           - modifiers: onlyOwner
        - [Pub] burn #
           - modifiers: onlyOwner
        - [Pub] withdrawForeignTokens #
           - modifiers: onlyOwner