WOWswap is a decentralized leveraged trading protocol that runs on top of Pancakeswap DEX based on Binance Smart Chain.
With WowSwap traders can buy and sell their favorite tokens with up to 5X leverage by borrowing extra BNB from the lending pool.
Liquidity providers can supply BNB to the lending pool and receive interest paid by the traders.
WOWSale.buyTokens() (#242-263) ignores return value by token.transfer(msg.sender,buyAmount) (#260)
WOWSale.close() (#265-282) ignores return value by token.transfer(msg.sender,tokensLeft) (#271)
Use SafeERC20, or ensure that the transfer/transferFrom return value is checked.
Additional information: link
WOWSale.close() (#265-282) uses a dangerous strict equality:
- require(bool,string)(block.timestamp >= endSale || tokensLeft == 0,Close requirements are not met) (#267)
Don't use strict equality to determine if an account has enough Ether or tokens.
Additional information: link
Contract ownership is not renounced (belongs to a wallet)
WOWSale.buyTokens() (#242-263) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)((block.timestamp >= startSale && block.timestamp < endSale),Crowdsale is over) (#243)
WOWSale.close() (#265-282) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp >= endSale || tokensLeft == 0,Close requirements are not met) (#267)
Avoid relying on block.timestamp.
Additional information: link
SafeMath.mod(uint256,uint256,string) (#157-160) is never used and should be removed
SafeMath.mod(uint256,uint256) (#140-142) is never used and should be removed
Remove unused functions.
Additional information: link
WOWToken._totalSupply (#297) is set pre-construction with a non-constant function or state variable:
- 1000000 * DEC
WOWToken.DEC (#296) is set pre-construction with a non-constant function or state variable:
- 10 ** uint256(decimals)
Remove any initialization of state variables via non-constant state variables or function calls. If variables must be set upon contract deployment, locate initialization in the constructor instead.
Additional information: link
Variable WOWToken._totalSupply (#297) is not in mixedCase
Variable WOWToken.DEC (#296) is not in mixedCase
Variable WOWSale.DEC (#217) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Reentrancy in WOWSale.buyTokens() (#242-263):
External calls:
- address(msg.sender).transfer(payBack) (#255)
Event emitted after the call(s):
- Sold(msg.sender,buyAmount) (#261)
Reentrancy in WOWSale.close() (#265-282):
External calls:
- address(msg.sender).transfer(collectedBNB) (#277)
Event emitted after the call(s):
- CloseSale() (#280)
Apply the check-effects-interactions pattern.
Additional information: link
WOWToken.slitherConstructorVariables() (#290-354) uses literals with too many digits:
- _totalSupply = 1000000 * DEC (#297)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
WOWSale.totalSold (#210) should be constant
WOWSale.tokenPrice (#212) should be constant
WOWSale.startSale (#213) should be constant
WOWToken.decimals (#295) should be constant
WOWSale.maxBNB (#215) should be constant
WOWToken.name (#294) should be constant
WOWToken.symbol (#293) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
WOWSale.buyTokens() (#242-263) performs a multiplication on the result of a division:
-tokenPriceInBNB = rate.mul(DEC).div(tokenPrice) (#247)
-buyAmount = value.mul(tokenPriceInBNB).div(DEC) (#259)
Consider ordering multiplication before division.
Additional information: link
Owned.transferOwnership(address) (#175-177) should emit an event for:
- owner = newOwner (#176)
Emit an event for critical parameter changes.
Additional information: link
WOWSale.changeEndSale(uint256) (#234-237) should emit an event for:
- endSale = newEndSale (#235)
Emit an event for critical parameter changes.
Additional information: link
Owned.transferOwnership(address).newOwner (#175) lacks a zero-check on :
- owner = newOwner (#176)
Check that the address is not zero.
Additional information: link
Reentrancy in WOWSale.buyTokens() (#242-263):
External calls:
- token.transfer(msg.sender,buyAmount) (#260)
External calls sending eth:
- address(msg.sender).transfer(payBack) (#255)
Event emitted after the call(s):
- Sold(msg.sender,buyAmount) (#261)
Reentrancy in WOWSale.close() (#265-282):
External calls:
- token.transfer(msg.sender,tokensLeft) (#271)
External calls sending eth:
- address(msg.sender).transfer(collectedBNB) (#277)
Event emitted after the call(s):
- CloseSale() (#280)
Apply the check-effects-interactions pattern.
Additional information: link
transfer(address,uint256) should be declared external:
- WOWToken.transfer(address,uint256) (#315-320)
changeEndSale(uint256) should be declared external:
- WOWSale.changeEndSale(uint256) (#234-237)
balanceOf(address) should be declared external:
- WOWToken.balanceOf(address) (#311-313)
transferOwnership(address) should be declared external:
- Owned.transferOwnership(address) (#175-177)
totalSupply() should be declared external:
- WOWToken.totalSupply() (#307-309)
decreaseAllowance(address,uint256) should be declared external:
- WOWToken.decreaseAllowance(address,uint256) (#332-334)
approveAndCall(address,uint256,bytes) should be declared external:
- WOWToken.approveAndCall(address,uint256,bytes) (#348-352)
allowance(address,address) should be declared external:
- WOWToken.allowance(address,address) (#344-346)
transferFrom(address,address,uint256) should be declared external:
- WOWToken.transferFrom(address,address,uint256) (#336-342)
close() should be declared external:
- WOWSale.close() (#265-282)
increaseAllowance(address,uint256) should be declared external:
- WOWToken.increaseAllowance(address,uint256) (#328-330)
changeRate(uint256) should be declared external:
- WOWSale.changeRate(uint256) (#228-232)
Use the external attribute for functions never called from the contract.
Additional information: link
Unable to find Youtube account