WOW Finance - Smart Contract Audit Report

Summary

WOW Finance WOW Finance is a new DeFi platform launching on the Binance Smart Chain.

The WOW Finance team directly provided us the contracts for this review.

  • Token Deployment: 0x5dadae23a9d4dffbb34a807f4f6c0784b3f9a1d4
  • Presale Deployment: 0x5c2dc6C0bA262E39D141640D0Eb24301E687E1c9
  • Stake Deployment: 0xBfa29C4dA28B99ea8fDF08fE3a5C43C5766D6E10
  • Farm Deployment: 0x95b5062D68090273E8df68BCEdF49099666b5F7d
    • Notes on the Contracts:
    • The total supply of the token is 1.5 million.
    • There is a 3% tax on all transfers of the token, with 1% going to each: the buyer's pool, the project team, and the burn address.
    • There is an additional 'anti-dump' tax which is applied on all sales of the token in the amount of 2%, which is used to fund rewards for stakers.
    • The owner can exempt any address from fees and update the fee percentages at any time.
    • A 'buyback' functionality exists, which will remove 1% of the liquidity, unlocks it into WOW & WBNB, swaps that WBNB for WOW (increasing the price), and burns 96% of the WOW.
    • It is theoretically possible that the benefit of this buyback be swept up by front-runners. If this happens, however, the team can effectively disable this functionality by increasing the minimum tokens required to a very high amount.
    • Anyone with more than 100 tokens can trigger a buyback every 2 hours; and the caller of the function receives the remaining 4% of the WOW tokens as a reward (to cover gas fees).
    • The team can update the buyback interval and distribution ratios at any time.
    • Due to the nature of this buyback function, liquidity providers for WOW/WBNB may experience increased volatility.

    • The presale allows users to buy 500 WOW per 1BNB invested.
    • ~74% of the BNB collected in the presale will be automatically added as liquidity for the platform. Liquidity will be unlocked and claimable by the team after 180 days.
    • Users can earn rewards in BNB for refering other users to the presale in the amount of 5 percent of the deposits of the users referred.
    • The remaining BNB will be delivered to the project team.
    • In case of a liquidity creation issue, users may recover 95% of the funds they have deposited as a refund. The remaining 5% is unavailable as it may have been already sent to users for referring others.

    • Users can stake their WOW tokens to earn additional WOW as rewards.
    • Upon staking, users' WOW tokens will be locked up for a minimum of 7 days.
    • Users can claim just their rewards but leave their stake in the contract; though this resets the 7-day timer.
    • Upon unstaking, 50% of user's rewards will be withdrawn. 7 days after the unstaking, the remainder of the user's rewards will be available to be claimed.
    • The team can update the lockup time and reward percentages at any time.

    • Users can also lock their WOW/BNB LP (from PancakeSwap) tokens in the farm to earn rewards in WOW token.
    • This contract receives some of the fees from transfers of the token and uses those tokens to provide WOW to fund rewards.
    • Users have the ability to claim just their rewards, or their entire stake with rewards. When unstaking, rewards are withdrawn as well.
    • The key difference between the stake and farm contracts is that the stake contract locks up WOW tokens, while farm contract locks up WOW/BNB LP tokens.
    • The team can update the reward rate at any time.

    • General Notes:
    • The team has worked with us to implement most of our recommended changes regarding gas optimizations and the level of owner control over the contracts.
    • Utilization of SafeMath throughout the platform to prevent overflow issues.

    Audit Findings Summary
    • No serious issues from external attackers were identified.
    • As with any presale, ensure trust in the project team prior to investing.
    • Date: March 8th, 2021
    • Update Date: March 12th, 2021 - Notes about possible front-running which can be easily addressed by the team if it occurs.

    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

    Function Graph

    Smart Contract Graph

    Inheritence Chart

    Smart Contract Inheritance

    Functions Overview

    
    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
    
     +  HasOwner 
        - [Pub]  #
        - [Pub] transferOwnership #
           - modifiers: onlyAdmin
    
     + [Lib] SafeMath 
        - [Int] add
        - [Int] sub
        - [Int] sub
        - [Int] mul
        - [Int] div
        - [Int] div
        - [Int] mod
        - [Int] mod
        - [Int] ceil
    
     + [Int] IBEP20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     +  WOW_farm (HasOwner)
        - [Pub]  #
        - [Ext] stake #
        - [Ext] unstake #
        - [Ext] claim #
        - [Pub] earned
        - [Int] updateReward #
        - [Ext] yourStaked
        - [Ext] yourEarnings
        - [Ext] yourUnstake
        - [Ext] ADDFUNDS #
        - [Ext] CALCDISTRIBUTION
        - [Ext] DISTRIBUTE #
           - modifiers: onlyAdmin
        - [Int] safeStakingTransfer #
        - [Int] safeRewardsTransfer #
        - [Pub] lastTimeRewardApplicable
        - [Pub] rewardPerToken
        - [Ext] unpause #
           - modifiers: onlyAdmin
      
    							

    Source Code

    Click here to download the source code as a .sol file.


    Function Graph

    Smart Contract Graph

    Inheritence Chart

    Smart Contract Inheritance

    Functions Overview

    
    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
    
     +  HasOwner 
        - [Pub]  #
        - [Pub] transferOwnership #
           - modifiers: onlyAdmin
    
     + [Lib] SafeMath 
        - [Int] add
        - [Int] sub
        - [Int] sub
        - [Int] mul
        - [Int] div
        - [Int] div
        - [Int] mod
        - [Int] mod
        - [Int] ceil
    
     + [Int] IBEP20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     + [Int] WOWtoken (IBEP20)
        - [Ext] burn #
        - [Ext] showAddrPancakePair
        - [Ext] teamAddress
    
     + [Int] IPancakeRouter01 
        - [Ext] factory
        - [Ext] WETH
        - [Ext] quote
        - [Ext] getAmountOut
        - [Ext] getAmountIn
        - [Ext] getAmountsOut
        - [Ext] getAmountsIn
        - [Ext] addLiquidityETH ($)
    
     + [Int] IPancakeRouter02 (IPancakeRouter01)
        - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
        - [Ext] removeLiquidityETH #
        - [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
    
     + [Int] IPancakeFactory 
        - [Ext] feeTo
        - [Ext] feeToSetter
        - [Ext] migrator
        - [Ext] getPair
        - [Ext] allPairs
        - [Ext] allPairsLength
        - [Ext] createPair #
        - [Ext] setFeeTo #
        - [Ext] setFeeToSetter #
        - [Ext] setMigrator #
    
     +  WOW_presale (HasOwner)
        - [Pub]  #
        - [Ext]  ($)
        - [Pub] buy ($)
        - [Int] payReferral #
        - [Pub] startPresale #
           - modifiers: onlyAdmin
        - [Pub] stopPresaleAndLockLiquidityOnPancake #
           - modifiers: onlyAdmin
        - [Ext] emergencyRefund ($)
        - [Pub] tokensRemainingForSale #
    							

    Source Code

    Click here to download the source code as a .sol file.


    Function Graph

    Smart Contract Graph

    Inheritence Chart

    Smart Contract Inheritance

    Functions Overview

    
    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
    
     +  HasOwner 
        - [Pub]  #
        - [Pub] transferOwnership #
           - modifiers: onlyAdmin
    
     + [Lib] SafeMath 
        - [Int] add
        - [Int] sub
        - [Int] sub
        - [Int] mul
        - [Int] div
        - [Int] div
        - [Int] mod
        - [Int] mod
        - [Int] ceil
    
     + [Int] IBEP20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     +  WOW_stake (HasOwner)
        - [Pub]  #
        - [Ext] stake #
        - [Ext] unstake #
        - [Ext] claim #
        - [Ext] getRestRewards #
        - [Int] updateDepositTime #
        - [Prv] pendingReward #
        - [Ext] ADDFUNDS #
        - [Ext] getUserAmount
        - [Pub] getUnstakeTimeout
        - [Pub] getRewardsLockTimeout
        - [Pub] getUserReferenceAmount
        - [Ext] yourStaked
        - [Ext] yourEarnings
        - [Ext] yourUnstake
        - [Ext] yourRestCoins
        - [Pub] getPendingReward
        - [Int] safeStakingTransfer #
        - [Int] safeRewardsTransfer #
        - [Ext] setRewardReleasePercentage #
           - modifiers: onlyAdmin
        - [Ext] setRewardLockedPeriod #
           - modifiers: onlyAdmin
        - [Ext] setDepositLockedPeriod #
           - modifiers: onlyAdmin
    
    							

    Source Code

    Click here to download the source code as a .sol file.


    Function Graph

    Smart Contract Graph

    Inheritence Chart

    Smart Contract Inheritance

    Functions Overview

    
    
     ($) = payable function
     # = non-constant function
     
     Int = Internal
     Ext = External
     Pub = Public
    
     +  Context 
        - [Int]  #
        - [Int] _msgSender
        - [Int] _msgData
    
     +  HasOwner (Context)
        - [Int]  #
        - [Pub] renounceOwnership #
           - modifiers: onlyAdmin
        - [Pub] transferOwnership #
           - modifiers: onlyAdmin
    
     + [Lib] SafeMath 
        - [Int] add
        - [Int] sub
        - [Int] sub
        - [Int] mul
        - [Int] div
        - [Int] div
        - [Int] mod
        - [Int] mod
        - [Int] ceil
    
     + [Int] WOWotherContract 
        - [Ext] ADDFUNDS #
    
     + [Int] IBEP20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     + [Int] IPancakeRouter01 
        - [Ext] factory
        - [Ext] WETH
        - [Ext] quote
        - [Ext] getAmountOut
        - [Ext] getAmountIn
        - [Ext] getAmountsOut
        - [Ext] getAmountsIn
        - [Ext] addLiquidityETH ($)
    
     + [Int] IPancakeRouter02 
        - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
        - [Ext] removeLiquidityETH #
        - [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
    
     + [Int] IPancakeFactory 
        - [Ext] feeTo
        - [Ext] feeToSetter
        - [Ext] migrator
        - [Ext] getPair
        - [Ext] allPairs
        - [Ext] allPairsLength
        - [Ext] createPair #
        - [Ext] setFeeTo #
        - [Ext] setFeeToSetter #
        - [Ext] setMigrator #
    
     + [Lib] Roles 
        - [Int] add #
        - [Int] remove #
        - [Int] has
    
     +  WOW (Context, IBEP20, HasOwner)
        - [Pub]  #
        - [Pub] name
        - [Pub] symbol
        - [Pub] decimals
        - [Pub] totalSupply
        - [Pub] balanceOf
        - [Pub] transfer #
        - [Pub] allowance
        - [Pub] approve #
        - [Pub] transferFrom #
        - [Pub] increaseAllowance #
        - [Pub] decreaseAllowance #
        - [Pub] burn #
        - [Int] _burn #
        - [Int] _approve #
        - [Int] _burnFrom #
        - [Int] _superTransfer #
        - [Int] _transfer #
        - [Ext] buyBack #
        - [Ext] whenNextBuyBack
        - [Ext] teamFunds #
        - [Ext] changeTeamAddress #
           - modifiers: onlyAdmin
        - [Ext] teamAddress
        - [Ext] changeMarketingAddress #
           - modifiers: onlyAdmin
        - [Ext] checkLockableSupply
        - [Ext] checkLockedSupply
        - [Ext] checkBurnedSupply
        - [Pub] checkBurnableLiquidity
        - [Pub] checkBurnedLiquidity
        - [Pub] checkLockedLiquidity
        - [Ext] getPancakeswapLastPrice
        - [Ext] createPancakePair #
           - modifiers: onlyAdmin
        - [Int] _createPancakePair #
        - [Ext] showAddrPancakePair
        - [Ext] checkReleaseLiquidityTime
        - [Ext] releaseLiquidityAfterTimeout #
           - modifiers: onlyAdmin
        - [Ext] startSTAKE #
           - modifiers: onlyAdmin
        - [Ext] startPRESALE #
           - modifiers: onlyAdmin
        - [Ext] startFARM #
           - modifiers: onlyAdmin
        - [Int] rewardStaking #
        - [Prv] _stakeaddfunds #
        - [Ext] toggleFeeless #
           - modifiers: onlyAdmin
        - [Ext] isUnpaused
        - [Ext] toggleAddrUntilPause #
           - modifiers: onlyAdmin
        - [Ext] unpause #
           - modifiers: onlyAdmin
        - [Ext] setBuyBackInterval #
           - modifiers: onlyAdmin
        - [Ext] setBuyBackUserMinBalance #
           - modifiers: onlyAdmin
        - [Ext] setBuyBackUserRewardPercentage #
           - modifiers: onlyAdmin
        - [Ext] setBuyBackRate #
           - modifiers: onlyAdmin
        - [Ext] setAnitDumpRate #
           - modifiers: onlyAdmin
    
     +  Balancer 
        - [Pub]  #
        - [Ext]  ($)
        - [Ext] rebalance #
        - [Prv] swapEthForTokens #
    
      
    							

    Source Code

    Click here to download the source code as a .sol file.