Greenplaneteco - Audit

CertiKFiles named in the report

CertiK reviewed Green Planet ECO (Greenplaneteco - Audit) on 17 May 2023: 12 findings, 0 critical; 11 marked fixed, 1 acknowledged.

No open critical findings
Open the reportOpen Green Planet ECO’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings12

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High010
Medium002
Low009
MediumIncorrect check on the number of tokens availableFixed

In the function `mintForPartners()`, the unit of input parameter `amount` is `ether`, the maximum number of tokens that can be minted for partners cannot exceed `mintableTokenAmountForPartners`, whose unit is `wei`. ```solidity=478 require( amount <= mintableTokenAmountForPartners, "Required amount is over of mintable amount." ); ``` The `require` statement does not multiply the `amount` by `1e18`, resulting in minting an excess token amount still pass the check. This issue also exists in `privateSale()` and `publicSale()` functions.

MediumMap `automatedMarketMakerPairs` is not initiatedFixed

The mapping `automatedMarketMakerPairs` is an empty map because it is never initiated. So, the following condition is always evaluated to false, and the `swapTokenAndSendEthToWallet()` function will not be called. As a result, all fees are locked in the `ECO` contract. ```solidity=211 if (canSwap && !swapping && automatedMarketMakerPairs[to]) { ```

LowConstant `MAX_SUPPLY` is redundantFixed

The mintable token amount cannot exceed the maximum value of `uint` type, making the use of `MAX_SUPPLY` redundant. ```solidity=19 uint public constant MAX_SUPPLY = type(uint).max; ```

LowGrant an unlimited amount of tokens to the routeFixed

The `ECO` contract approves the `uniswapV2Router` address for an unlimited number of tokens. This can be a security risk if the router contract is compromised.

LowInconsistent Comment and CodeFixed

The comment states "Max buy fee is 20% and max sell fee is 30%". However, the maximum buy fee is 2% and the maximum sale fee is 3%.

LowMaximum transaction limit applies to token transfFixed

If `maxTransactionLimitEnabled` is enabled and wallets are not excluded from the maximum transaction limit, then transfers of tokens between user wallets must also follow maximum transfer limits, and the token amount cannot exceed the value returned by the `maxTransferAmountSell()` function. As the name of the `maxTransferAmountSell()` function implies, it is intended for selling transactions but not wallet-to-wallet token transfers.

LowMissing Emit EventsFixed

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

LowMissing Zero Address ValidationFixed

Addresses should be checked before assignment or external call to make sure they are not zero addresses. ```solidity=534 payable(ownerWallet).transfer(address(this).balance); ``` - `ownerWallet` is not zero-checked before being used.

LowState Variable Should Be Declared ConstantFixed

State variables that never change should be declared as `constant` to save gas. ```solidity=43 uint public mintableTokenAmountForFounders = (INIT_TOTAL_SUPPLY * SHARE_OF_FOUNDERS) / 1000; ``` - `mintableTokenAmountForFounders` should be declared `constant`. --- ```solidity=59 uint public tokenPriceForPartners = 0.00002 ether; ``` - `tokenPriceForPartners` should be declared `constant`. --- ```solidity=60 uint public tokenPriceForPrivate = 0.00003 ether; ``` - `tokenPriceForPrivate` should be declared `constant`. --- ```solidity=61 uint public tokenPriceForPublic = 0.00004 ether; ``` - `tokenPriceForPublic` should be declared `constant`. --- ```solidity=71 address public walletOfFounder1 = 0xF9e347F9837A07c3b0778011Db4720E252B7b6a0; ``` - `walletOfFounder1` should be declared `constant`. --- ```solidity=73 address public walletOfFounder2 = 0x21E41D5efC9A5FC24D7212A0151Bb18983c79Dc4; ``` - `walletOfFounder2` should be declared `constant`. --- ```solidity=75 address public walletOfFounder3 = 0x56F877f0bF4f8502c29afa4474692F8219C98bef; ``` - `walletOfFounder3` should be declared `constant`. --- ```solidity=79 address public walletOfEcosystem = 0xe0FcFd2a0aFE8c9F3707Beb34291C518D2FC00Cf; ``` - `walletOfEcosystem` should be declared `constant`. --- ```solidity=81 address public walletOfCommunity = 0xbe3a59FD4Cbed7D850f1F622F788Bf16c8CA4bDa; ``` - `walletOfCommunity` should be declared `constant`. --- ```solidity=83 address public walletOfListing = 0x89B3Fe584e4Ea44115fFcA6DD41B6621DF8c37EC; ``` - `walletOfListing` should be declared `constant`. --- ```solidity=84 address public walletOfMarketing = 0x39FC2c432cA5098301a97817aF894d75685bc496; ``` - `walletOfMarketing` should be declared `constant`. --- ```solidity=89 address private walletOfBurn = 0x000000000000000000000000000000000000dEaD; ``` - `walletOfBurn` should be declared `constant`.

LowUnnecessary Use of SafeMathFixed

The `SafeMath` library is used unnecessarily. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow. ```solidity=13 using SafeMath for uint256; ``` - `SafeMath` library is used for `uint256` type in `ECO` contract.

Show 1 more
LowUsage of `transfer`/`send` for sending EtherFixed

It is not recommended to use Solidity's `transfer()` and `send()` functions for transferring Ether, since some contracts may not be able to receive the funds. Those functions forward only a fixed amount of gas (2300 specifically) and the receiving contracts may run out of gas before finishing the transfer. Also, EVM instructions' gas costs may increase in the future. Thus, some contracts that can receive now may stop working in the future due to the gas limitation. ```solidity=534 payable(ownerWallet).transfer(address(this).balance); ``` - `ECO.withdraw` uses `transfer()`.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (1)

  • contracts/ECO.sol

Part of Green Planet ECO’s security record

Green Planet ECO
Audits1 audit by 1 firmLast audit May 2023, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Green Planet ECO’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us