Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
Enigma.swapBack() (#702-740) sends eth to arbitrary user
Dangerous calls:
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in Enigma._transferFrom(address,address,uint256) (#580-627):
External calls:
- rebase() (#600)
- pairContract.sync() (#521)
- addLiquidity() (#604)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#679-685)
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
- swapBack() (#608)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#716-722)
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
External calls sending eth:
- addLiquidity() (#604)
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
- swapBack() (#608)
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
State variables written after the call(s):
- _gonBalances[sender] = _gonBalances[sender].sub(gonAmount) (#612)
- _gonBalances[recipient] = _gonBalances[recipient].add(gonAmountReceived) (#616-618)
- gonAmountReceived = takeFee(sender,recipient,gonAmount) (#613-615)
- _gonBalances[firePit] = _gonBalances[firePit].add(gonAmount.div(feeDenominator).mul(firePitFee)) (#644-646)
- _gonBalances[address(this)] = _gonBalances[address(this)].add(gonAmount.div(feeDenominator).mul(_treasuryFee.add(InsuranceFundFee))) (#647-649)
- _gonBalances[autoLiquidityReceiver] = _gonBalances[autoLiquidityReceiver].add(gonAmount.div(feeDenominator).mul(liquidityFee)) (#650-652)
- swapBack() (#608)
- inSwap = true (#446)
- inSwap = false (#448)
Apply the check-effects-interactions pattern.
Additional information: link
Enigma._name (#402) shadows:
- ERC20Detailed._name (#368)
Enigma._symbol (#403) shadows:
- ERC20Detailed._symbol (#369)
Enigma._decimals (#404) shadows:
- ERC20Detailed._decimals (#370)
Remove the state variable shadowing.
Additional information: link
Too many vulnerabilities (Unchecked transfer, Reentrancy vulnerability, etc.). High risk of a scam. DYOR & manual audit are advised.
Enigma.swapBack().success (#728) is written in both
(success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
(success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
Fix or remove the writes.
Additional information: link
Combination 1: Reentrancy vulnerabilities + Functions that send Ether to arbitraty destination. Usual for scams. May be justified by some complex mechanics (e.g. rebase, reflections). DYOR & manual audit are advised.
Enigma.rebase() (#497-524) performs a multiplication on the result of a division:
-times = deltaTime.div(900) (#503)
-epoch = times.mul(15) (#504)
Enigma.rebase() (#497-524) performs a multiplication on the result of a division:
-times = deltaTime.div(900) (#503)
-_lastRebasedTime = _lastRebasedTime.add(times.mul(900)) (#519)
Enigma.takeFee(address,address,uint256) (#629-656) performs a multiplication on the result of a division:
-feeAmount = gonAmount.div(feeDenominator).mul(_totalFee) (#642)
Enigma.takeFee(address,address,uint256) (#629-656) performs a multiplication on the result of a division:
-_gonBalances[firePit] = _gonBalances[firePit].add(gonAmount.div(feeDenominator).mul(firePitFee)) (#644-646)
Enigma.takeFee(address,address,uint256) (#629-656) performs a multiplication on the result of a division:
-_gonBalances[address(this)] = _gonBalances[address(this)].add(gonAmount.div(feeDenominator).mul(_treasuryFee.add(InsuranceFundFee))) (#647-649)
Enigma.takeFee(address,address,uint256) (#629-656) performs a multiplication on the result of a division:
-_gonBalances[autoLiquidityReceiver] = _gonBalances[autoLiquidityReceiver].add(gonAmount.div(feeDenominator).mul(liquidityFee)) (#650-652)
Enigma.getLiquidityBacking(uint256) (#894-902) performs a multiplication on the result of a division:
-liquidityBalance = _gonBalances[pair].div(_gonsPerFragment) (#899)
-accuracy.mul(liquidityBalance.mul(2)).div(getCirculatingSupply()) (#900-901)
Consider ordering multiplication before division.
Additional information: link
Enigma.addLiquidity() (#658-700) ignores return value by router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
Ensure that all the return values of the function calls are used.
Additional information: link
Enigma.setRateAfterFirstYear(uint256) (#531-533) should emit an event for:
- rateAfterFirstYear = newRate (#532)
Emit an event for critical parameter changes.
Additional information: link
Enigma.setFeeReceivers(address,address,address,address)._autoLiquidityReceiver (#883) lacks a zero-check on :
- autoLiquidityReceiver = _autoLiquidityReceiver (#888)
Enigma.setFeeReceivers(address,address,address,address)._treasuryReceiver (#884) lacks a zero-check on :
- treasuryReceiver = _treasuryReceiver (#889)
Enigma.setFeeReceivers(address,address,address,address)._InsuranceFundReceiver (#885) lacks a zero-check on :
- InsuranceFundReceiver = _InsuranceFundReceiver (#890)
Enigma.setFeeReceivers(address,address,address,address)._firePit (#886) lacks a zero-check on :
- firePit = _firePit (#891)
Enigma.setPairAddress(address)._pairAddress (#913) lacks a zero-check on :
- pairAddress = _pairAddress (#914)
Check that the address is not zero.
Additional information: link
Reentrancy in Enigma.addLiquidity() (#658-700):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#679-685)
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
External calls sending eth:
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
State variables written after the call(s):
- _lastAddLiquidityTime = block.timestamp (#699)
Reentrancy in Enigma.constructor() (#466-495):
External calls:
- pair = IPancakeSwapFactory(router.factory()).createPair(router.WETH(),address(this)) (#469-472)
State variables written after the call(s):
- InsuranceFundReceiver = 0xF21b83e9C0E41CFD8238ED82b664119182d01925 (#476)
- _allowedFragments[address(this)][address(router)] = uint256(- 1) (#479)
- _autoAddLiquidity = true (#489)
- _autoRebase = true (#488)
- _gonBalances[treasuryReceiver] = TOTAL_GONS (#484)
- _gonsPerFragment = TOTAL_GONS.div(_totalSupply) (#485)
- _initRebaseStartTime = block.timestamp (#486)
- _isFeeExempt[treasuryReceiver] = true (#490)
- _isFeeExempt[address(this)] = true (#491)
- _lastRebasedTime = block.timestamp (#487)
- _transferOwnership(treasuryReceiver) (#493)
- _owner = newOwner (#363)
- _totalSupply = INITIAL_FRAGMENTS_SUPPLY (#483)
- autoLiquidityReceiver = 0x2aEE8028DF043a7b3d87600Ec90Ba87b0548166A (#474)
- firePit = 0x3f7912cF94C67030EA10831401d1A1497d7f5580 (#477)
- pairAddress = pair (#480)
- pairContract = IPancakeSwapPair(pair) (#481)
- treasuryReceiver = 0x1Cc24be2c04dCfe69E3a992149784C73A0Ce6337 (#475)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in Enigma._transferFrom(address,address,uint256) (#580-627):
External calls:
- rebase() (#600)
- pairContract.sync() (#521)
- addLiquidity() (#604)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#679-685)
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
- swapBack() (#608)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#716-722)
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
External calls sending eth:
- addLiquidity() (#604)
- router.addLiquidityETH{value: amountETHLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#690-697)
- swapBack() (#608)
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount.div(_gonsPerFragment)) (#654)
- gonAmountReceived = takeFee(sender,recipient,gonAmount) (#613-615)
- Transfer(sender,recipient,gonAmountReceived.div(_gonsPerFragment)) (#621-625)
Reentrancy in Enigma.constructor() (#466-495):
External calls:
- pair = IPancakeSwapFactory(router.factory()).createPair(router.WETH(),address(this)) (#469-472)
Event emitted after the call(s):
- OwnershipTransferred(_owner,newOwner) (#362)
- _transferOwnership(treasuryReceiver) (#493)
- Transfer(address(0x0),treasuryReceiver,_totalSupply) (#494)
Reentrancy in Enigma.rebase() (#497-524):
External calls:
- pairContract.sync() (#521)
Event emitted after the call(s):
- LogRebase(epoch,_totalSupply) (#523)
Apply the check-effects-interactions pattern.
Additional information: link
Enigma.rebase() (#497-524) uses timestamp for comparisons
Dangerous comparisons:
- deltaTimeFromInit < (31536000) (#506)
- i < times (#512)
Enigma.shouldRebase() (#768-775) uses timestamp for comparisons
Dangerous comparisons:
- _autoRebase && (_totalSupply < MAX_SUPPLY) && msg.sender != pair && ! inSwap && block.timestamp >= (_lastRebasedTime + 900) (#769-774)
Enigma.shouldAddLiquidity() (#777-783) uses timestamp for comparisons
Dangerous comparisons:
- _autoAddLiquidity && ! inSwap && msg.sender != pair && block.timestamp >= (_lastAddLiquidityTime + 172800) (#778-782)
Avoid relying on block.timestamp.
Additional information: link
Enigma.isContract(address) (#929-933) uses assembly
- INLINE ASM (#931)
Do not use evm assembly.
Additional information: link
SafeMath.mod(uint256,uint256) (#90-93) is never used and should be removed
SafeMathInt.abs(int256) (#35-38) is never used and should be removed
SafeMathInt.add(int256,int256) (#29-33) is never used and should be removed
SafeMathInt.div(int256,int256) (#17-21) is never used and should be removed
SafeMathInt.mul(int256,int256) (#9-15) is never used and should be removed
SafeMathInt.sub(int256,int256) (#23-27) is never used and should be removed
Remove unused functions.
Additional information: link
Enigma.totalFee (#431) is set pre-construction with a non-constant function or state variable:
- liquidityFee.add(treasuryFee).add(InsuranceFundFee).add(firePitFee)
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
Pragma version^0.7.4 (#3) allows old versions
solc-0.7.4 is not recommended for deployment
Deploy with any of the following Solidity versions: 0.5.16 - 0.5.17, 0.6.11 - 0.6.12, 0.7.5 - 0.7.6 Use a simple pragma version that allows any of these versions. Consider using the latest version of Solidity for testing.
Additional information: link
Low level call in Enigma.swapBack() (#702-740):
- (success) = address(treasuryReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(treasuryFee).div(treasuryFee.add(InsuranceFundFee))}() (#728-733)
- (success,None) = address(InsuranceFundReceiver).call{gas: 30000,value: amountETHToTreasuryAndSIF.mul(InsuranceFundFee).div(treasuryFee.add(InsuranceFundFee))}() (#734-739)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IPancakeSwapPair.DOMAIN_SEPARATOR() (#140) is not in mixedCase
Function IPancakeSwapPair.PERMIT_TYPEHASH() (#141) is not in mixedCase
Function IPancakeSwapPair.MINIMUM_LIQUIDITY() (#158) is not in mixedCase
Function IPancakeSwapRouter.WETH() (#178) is not in mixedCase
Parameter Enigma.setAutoRebase(bool)._flag (#791) is not in mixedCase
Parameter Enigma.setAutoAddLiquidity(bool)._flag (#800) is not in mixedCase
Parameter Enigma.checkFeeExempt(address)._addr (#863) is not in mixedCase
Parameter Enigma.setFeeReceivers(address,address,address,address)._autoLiquidityReceiver (#883) is not in mixedCase
Parameter Enigma.setFeeReceivers(address,address,address,address)._treasuryReceiver (#884) is not in mixedCase
Parameter Enigma.setFeeReceivers(address,address,address,address)._InsuranceFundReceiver (#885) is not in mixedCase
Parameter Enigma.setFeeReceivers(address,address,address,address)._firePit (#886) is not in mixedCase
Parameter Enigma.setWhitelist(address)._addr (#904) is not in mixedCase
Parameter Enigma.setBotBlacklist(address,bool)._botAddress (#908) is not in mixedCase
Parameter Enigma.setBotBlacklist(address,bool)._flag (#908) is not in mixedCase
Parameter Enigma.setPairAddress(address)._pairAddress (#913) is not in mixedCase
Parameter Enigma.setLP(address)._address (#917) is not in mixedCase
Variable Enigma._name (#402) is not in mixedCase
Variable Enigma._symbol (#403) is not in mixedCase
Variable Enigma._decimals (#404) is not in mixedCase
Variable Enigma._isFeeExempt (#407) is not in mixedCase
Variable Enigma._maxTxAmount (#419) is not in mixedCase
Variable Enigma._maxWalletSize (#420) is not in mixedCase
Variable Enigma.InsuranceFundFee (#428) is not in mixedCase
Variable Enigma.DEAD (#433) is not in mixedCase
Variable Enigma.ZERO (#434) is not in mixedCase
Variable Enigma.InsuranceFundReceiver (#438) is not in mixedCase
Variable Enigma._autoRebase (#454) is not in mixedCase
Variable Enigma._autoAddLiquidity (#455) is not in mixedCase
Variable Enigma._initRebaseStartTime (#456) is not in mixedCase
Variable Enigma._lastRebasedTime (#457) is not in mixedCase
Variable Enigma._lastAddLiquidityTime (#458) is not in mixedCase
Variable Enigma._totalSupply (#459) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IPancakeSwapRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#183) is too similar to IPancakeSwapRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#184)
Prevent variables from having similar names.
Additional information: link
Enigma.slitherConstructorVariables() (#395-937) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#433)
Enigma.slitherConstructorVariables() (#395-937) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#434)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
SafeMathInt.MAX_INT256 (#7) is never used in SafeMathInt (#5-39)
Remove unused state variables.
Additional information: link
Enigma.DEAD (#433) should be constant
Enigma.InsuranceFundFee (#428) should be constant
Enigma.ZERO (#434) should be constant
Enigma._decimals (#404) should be constant
Enigma._name (#402) should be constant
Enigma._symbol (#403) should be constant
Enigma.feeDenominator (#424) should be constant
Enigma.firePitFee (#429) should be constant
Enigma.liquidityFee (#427) should be constant
Enigma.rateFirstYear (#422) should be constant
Enigma.sellFee (#430) should be constant
Enigma.treasuryFee (#426) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
renounceOwnership() should be declared external:
- Ownable.renounceOwnership() (#351-354)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#356-358)
name() should be declared external:
- ERC20Detailed.name() (#382-384)
symbol() should be declared external:
- ERC20Detailed.symbol() (#386-388)
decimals() should be declared external:
- ERC20Detailed.decimals() (#390-392)
setMaxTxnAmount(uint256) should be declared external:
- Enigma.setMaxTxnAmount(uint256) (#527-529)
setRateAfterFirstYear(uint256) should be declared external:
- Enigma.setRateAfterFirstYear(uint256) (#531-533)
setMaxWalletSize(uint256) should be declared external:
- Enigma.setMaxWalletSize(uint256) (#535-537)
setSwap() should be declared external:
- Enigma.setSwap() (#539-541)
getLiquidityBacking(uint256) should be declared external:
- Enigma.getLiquidityBacking(uint256) (#894-902)
setPairAddress(address) should be declared external:
- Enigma.setPairAddress(address) (#913-915)
Use the external attribute for functions never called from the contract.
Additional information: link
Unable to find website, listings and other project-related information
Young tokens have high risks of scam / price dump / death
Token has no active CoinGecko listing / rank
Token has no active CoinMarketCap listing / rank
Unable to find Telegram and Twitter accounts