EarthFi is a Charity Foundation Aggregator offering an NFT marketplace and generator for charities. With its own NFT collection EarthFi enables token and NFT staking. EAFI develops a hyper casual P2E game to incentivize investors to save the earth and earn passive income. ✅ KYC verified Team / Audited Contract through Dessert Finance ✅ Massive marketing planned with biggest BSC influencers ✅ 1% of all trade volume will be donated to people and charities in Ukraine🇺🇦❤️
Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
EarthFi.swapBack() (#648-684) sends eth to arbitrary user
Dangerous calls:
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in EarthFi._transfer(address,address,uint256) (#525-612):
External calls:
- swapBack() (#569)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
- (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
External calls sending eth:
- swapBack() (#569)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
- (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
State variables written after the call(s):
- super._transfer(from,operationsAddress,penaltyAmount) (#587)
- _balances[sender] = senderBalance - amount (#199)
- _balances[recipient] += amount (#201)
- super._transfer(from,address(this),fees) (#605)
- _balances[sender] = senderBalance - amount (#199)
- _balances[recipient] += amount (#201)
- super._transfer(from,to,amount) (#611)
- _balances[sender] = senderBalance - amount (#199)
- _balances[recipient] += amount (#201)
- swapping = false (#571)
- tokensForDevelopment += fees * sellDevelopmentFee / sellTotalFees (#594)
- tokensForDevelopment += fees * buyDevelopmentFee / buyTotalFees (#601)
- tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees (#592)
- tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees (#599)
- tokensForOperations += fees * sellOperationsFee / sellTotalFees (#593)
- tokensForOperations += fees * buyOperationsFee / buyTotalFees (#600)
Apply the check-effects-interactions pattern.
Additional information: link
EarthFi.swapBack().success (#658) is written in both
(success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
(success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
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.
Contract ownership is not renounced (belongs to a wallet)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-fees = amount * sellTotalFees / 100 (#591)
-tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees (#592)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-tokensForOperations += fees * sellOperationsFee / sellTotalFees (#593)
-fees = amount * buyTotalFees / 100 (#598)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-tokensForDevelopment += fees * sellDevelopmentFee / sellTotalFees (#594)
-fees = amount * buyTotalFees / 100 (#598)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-fees = amount * buyTotalFees / 100 (#598)
-tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees (#599)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-fees = amount * buyTotalFees / 100 (#598)
-tokensForOperations += fees * buyOperationsFee / buyTotalFees (#600)
EarthFi._transfer(address,address,uint256) (#525-612) performs a multiplication on the result of a division:
-fees = amount * buyTotalFees / 100 (#598)
-tokensForDevelopment += fees * buyDevelopmentFee / buyTotalFees (#601)
Consider ordering multiplication before division.
Additional information: link
Reentrancy in EarthFi.swapBack() (#648-684):
External calls:
- swapTokensForEth(contractBalance - liquidityTokens) (#663)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
State variables written after the call(s):
- tokensForDevelopment = 0 (#675)
- tokensForLiquidity = 0 (#673)
- tokensForOperations = 0 (#674)
Apply the check-effects-interactions pattern.
Additional information: link
EarthFi._transfer(address,address,uint256) (#525-612) uses tx.origin for authorization: require(bool,string)(_holderLastTransferTimestamp[tx.origin] < block.number - 1 && _holderLastTransferTimestamp[to] < block.number - 1,_transfer:: Transfer Delay enabled. Try again later.) (#541)
Do not use tx.origin for authorization.
Additional information: link
EarthFi.addLiquidity(uint256,uint256) (#633-646) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
Ensure that all the return values of the function calls are used.
Additional information: link
EarthFi.constructor().totalSupply (#382) shadows:
- ERC20.totalSupply() (#135-137) (function)
- IERC20.totalSupply() (#20) (function)
Rename the local variables that shadow another component.
Additional information: link
EarthFi.updateSwapTokensAtAmount(uint256) (#462-466) should emit an event for:
- swapTokensAtAmount = newAmount (#465)
EarthFi.updateBuyFees(uint256,uint256,uint256) (#504-510) should emit an event for:
- buyOperationsFee = _operationsFee (#505)
- buyLiquidityFee = _liquidityFee (#506)
- buyDevelopmentFee = _developmentFee (#507)
- buyTotalFees = buyOperationsFee + buyLiquidityFee + buyDevelopmentFee (#508)
EarthFi.updateSellFees(uint256,uint256,uint256) (#512-518) should emit an event for:
- sellOperationsFee = _operationsFee (#513)
- sellLiquidityFee = _liquidityFee (#514)
- sellDevelopmentFee = _developmentFee (#515)
- sellTotalFees = sellOperationsFee + sellLiquidityFee + sellDevelopmentFee (#516)
Emit an event for critical parameter changes.
Additional information: link
EarthFi.swapTokensForEth(uint256) (#614-631) has external calls inside a loop: path[1] = uniswapV2Router.WETH() (#619)
EarthFi.swapTokensForEth(uint256) (#614-631) has external calls inside a loop: uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
EarthFi.addLiquidity(uint256,uint256) (#633-646) has external calls inside a loop: uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
EarthFi.swapBack() (#648-684) has external calls inside a loop: (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
EarthFi.swapBack() (#648-684) has external calls inside a loop: (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
Favor pull over push strategy for external calls.
Additional information: link
Reentrancy in EarthFi.constructor() (#370-412):
External calls:
- uniswapV2Pair = IDexFactory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#379)
State variables written after the call(s):
- _createInitialSupply(newOwner,totalSupply) (#410)
- _balances[account] += amount (#210)
- excludeFromFees(newOwner,true) (#403)
- _isExcludedFromFees[account] = excluded (#521)
- excludeFromFees(address(this),true) (#404)
- _isExcludedFromFees[account] = excluded (#521)
- excludeFromFees(address(0xdead),true) (#405)
- _isExcludedFromFees[account] = excluded (#521)
- _setAutomatedMarketMakerPair(address(uniswapV2Pair),true) (#380)
- _isExcludedMaxTransactionAmount[updAds] = isExcluded (#469)
- _excludeFromMaxTransaction(newOwner,true) (#399)
- _isExcludedMaxTransactionAmount[updAds] = isExcluded (#469)
- _excludeFromMaxTransaction(address(this),true) (#400)
- _isExcludedMaxTransactionAmount[updAds] = isExcluded (#469)
- _excludeFromMaxTransaction(address(0xdead),true) (#401)
- _isExcludedMaxTransactionAmount[updAds] = isExcluded (#469)
- transferOwnership(newOwner) (#411)
- _owner = newOwner (#255)
- _createInitialSupply(newOwner,totalSupply) (#410)
- _totalSupply += amount (#209)
- _setAutomatedMarketMakerPair(address(uniswapV2Pair),true) (#380)
- automatedMarketMakerPairs[pair] = value (#497)
- buyDevelopmentFee = 3 (#391)
- buyLiquidityFee = 1 (#390)
- buyOperationsFee = 2 (#389)
- buyTotalFees = buyOperationsFee + buyLiquidityFee + buyDevelopmentFee (#392)
- developmentAddress = address(0x344922fd56324A7E68d7FB590Aad29db03F9a281) (#408)
- maxBuyAmount = totalSupply * 5 / 1000 (#384)
- maxSellAmount = totalSupply * 5 / 1000 (#385)
- maxWalletAmount = totalSupply * 2 / 100 (#386)
- operationsAddress = address(0x77a08386d428B24b503990656cE7CF7209642027) (#407)
- sellDevelopmentFee = 5 (#396)
- sellLiquidityFee = 3 (#395)
- sellOperationsFee = 12 (#394)
- sellTotalFees = sellOperationsFee + sellLiquidityFee + sellDevelopmentFee (#397)
- swapTokensAtAmount = totalSupply * 25 / 100000 (#387)
Reentrancy in EarthFi.swapBack() (#648-684):
External calls:
- swapTokensForEth(contractBalance - liquidityTokens) (#663)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
External calls sending eth:
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
State variables written after the call(s):
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
- _allowances[owner][spender] = amount (#222)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in EarthFi._transfer(address,address,uint256) (#525-612):
External calls:
- swapBack() (#569)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
- (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
External calls sending eth:
- swapBack() (#569)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
- (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
Event emitted after the call(s):
- Transfer(sender,recipient,amount) (#203)
- super._transfer(from,address(this),fees) (#605)
- Transfer(sender,recipient,amount) (#203)
- super._transfer(from,operationsAddress,penaltyAmount) (#587)
- Transfer(sender,recipient,amount) (#203)
- super._transfer(from,to,amount) (#611)
Reentrancy in EarthFi.constructor() (#370-412):
External calls:
- uniswapV2Pair = IDexFactory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#379)
Event emitted after the call(s):
- ExcludeFromFees(account,excluded) (#522)
- excludeFromFees(address(0xdead),true) (#405)
- ExcludeFromFees(account,excluded) (#522)
- excludeFromFees(address(this),true) (#404)
- ExcludeFromFees(account,excluded) (#522)
- excludeFromFees(newOwner,true) (#403)
- MaxTransactionExclusion(updAds,isExcluded) (#470)
- _excludeFromMaxTransaction(address(0xdead),true) (#401)
- MaxTransactionExclusion(updAds,isExcluded) (#470)
- _excludeFromMaxTransaction(address(this),true) (#400)
- MaxTransactionExclusion(updAds,isExcluded) (#470)
- _excludeFromMaxTransaction(newOwner,true) (#399)
- MaxTransactionExclusion(updAds,isExcluded) (#470)
- _setAutomatedMarketMakerPair(address(uniswapV2Pair),true) (#380)
- OwnershipTransferred(_owner,newOwner) (#254)
- transferOwnership(newOwner) (#411)
- SetAutomatedMarketMakerPair(pair,value) (#501)
- _setAutomatedMarketMakerPair(address(uniswapV2Pair),true) (#380)
- Transfer(address(0),account,amount) (#211)
- _createInitialSupply(newOwner,totalSupply) (#410)
Reentrancy in EarthFi.swapBack() (#648-684):
External calls:
- swapTokensForEth(contractBalance - liquidityTokens) (#663)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#624-630)
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
External calls sending eth:
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,address(0xdead),block.timestamp) (#638-645)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#223)
- addLiquidity(liquidityTokens,ethForLiquidity) (#678)
Reentrancy in EarthFi.transferForeignToken(address,address) (#686-692):
External calls:
- _sent = IERC20(_token).transfer(_to,_contractBalance) (#690)
Event emitted after the call(s):
- TransferForeignToken(_token,_contractBalance) (#691)
Apply the check-effects-interactions pattern.
Additional information: link
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- swapping = true (#567)
EarthFi.swapBack() (#648-684) has costly operations inside a loop:
- tokensForLiquidity = 0 (#673)
EarthFi.swapBack() (#648-684) has costly operations inside a loop:
- tokensForOperations = 0 (#674)
EarthFi.swapBack() (#648-684) has costly operations inside a loop:
- tokensForDevelopment = 0 (#675)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- swapping = false (#571)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees (#592)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForOperations += fees * sellOperationsFee / sellTotalFees (#593)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForDevelopment += fees * sellDevelopmentFee / sellTotalFees (#594)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees (#599)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForOperations += fees * buyOperationsFee / buyTotalFees (#600)
EarthFi._transfer(address,address,uint256) (#525-612) has costly operations inside a loop:
- tokensForDevelopment += fees * buyDevelopmentFee / buyTotalFees (#601)
Use a local variable to hold the loop computation result.
Additional information: link
Context._msgData() (#10-13) is never used and should be removed
Remove unused functions.
Additional information: link
Pragma version0.8.11 (#3) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
solc-0.8.11 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 EarthFi.swapBack() (#648-684):
- (success,None) = address(developmentAddress).call{value: ethForDevelopment}() (#681)
- (success,None) = address(operationsAddress).call{value: address(this).balance}() (#683)
Low level call in EarthFi.withdrawStuckETH() (#695-698):
- (success,None) = address(msg.sender).call{value: address(this).balance}() (#697)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IDexRouter.WETH() (#261) is not in mixedCase
Parameter EarthFi.addPresaleAddressForExclusions(address)._presaleAddress (#426) is not in mixedCase
Parameter EarthFi.updateBuyFees(uint256,uint256,uint256)._operationsFee (#504) is not in mixedCase
Parameter EarthFi.updateBuyFees(uint256,uint256,uint256)._liquidityFee (#504) is not in mixedCase
Parameter EarthFi.updateBuyFees(uint256,uint256,uint256)._developmentFee (#504) is not in mixedCase
Parameter EarthFi.updateSellFees(uint256,uint256,uint256)._operationsFee (#512) is not in mixedCase
Parameter EarthFi.updateSellFees(uint256,uint256,uint256)._liquidityFee (#512) is not in mixedCase
Parameter EarthFi.updateSellFees(uint256,uint256,uint256)._developmentFee (#512) is not in mixedCase
Parameter EarthFi.transferForeignToken(address,address)._token (#686) is not in mixedCase
Parameter EarthFi.transferForeignToken(address,address)._to (#686) is not in mixedCase
Parameter EarthFi.setOperationsAddress(address)._operationsAddress (#700) is not in mixedCase
Parameter EarthFi.setDevelopmentAddress(address)._developmentAddress (#706) is not in mixedCase
Variable EarthFi._isExcludedMaxTransactionAmount (#337) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#11)" inContext (#5-14)
Remove redundant statements if they congest code but offer no value.
Additional information: link
EarthFi.constructor() (#370-412) uses literals with too many digits:
- swapTokensAtAmount = totalSupply * 25 / 100000 (#387)
EarthFi.updateSwapTokensAtAmount(uint256) (#462-466) uses literals with too many digits:
- require(bool,string)(newAmount >= totalSupply() * 1 / 100000,Swap amount cannot be lower than 0.001% total supply.) (#463)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
name() should be declared external:
- ERC20.name() (#123-125)
symbol() should be declared external:
- ERC20.symbol() (#127-129)
decimals() should be declared external:
- ERC20.decimals() (#131-133)
transfer(address,uint256) should be declared external:
- ERC20.transfer(address,uint256) (#143-146)
allowance(address,address) should be declared external:
- ERC20.allowance(address,address) (#148-150)
approve(address,uint256) should be declared external:
- ERC20.approve(address,uint256) (#152-155)
transferFrom(address,address,uint256) should be declared external:
- ERC20.transferFrom(address,address,uint256) (#157-171)
increaseAllowance(address,uint256) should be declared external:
- ERC20.increaseAllowance(address,uint256) (#173-176)
decreaseAllowance(address,uint256) should be declared external:
- ERC20.decreaseAllowance(address,uint256) (#178-186)
Use the external attribute for functions never called from the contract.
Additional information: link
Contract has 6% buy tax and 12% sell tax.
Taxes are suspiciously high (over 10%) and contract ownership is not renounced. Token has a high risk of becoming a honeypot.
Average 30d PancakeSwap liquidity is low.
Average 30d PancakeSwap volume is low.
Average 30d number of PancakeSwap swaps is low.
Average PancakeSwap trading volume, liqudity, number of swaps are low. Token seems to be inactive.
Token is deployed only at one blockchain
Token has only one trading pair
Unable to find website, listings and other project-related information
Token has no active CoinGecko listing / rank
Token has no active CoinMarketCap listing / rank
Young tokens have high risks of price dump / death
Young tokens have high risks of price dump / death
Twitter account has relatively few followers
Unable to find Youtube account
Unable to find Discord account