The Green World - Audit

CertiKFiles named in the report

CertiK reviewed The Green World (The Green World - Audit) on 11 Oct 2024: 10 findings, 0 critical; 3 acknowledged, 7 open.

No open critical findings
Open the reportOpen The Green World’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings10

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

SeverityOpenAcknowledgedFixed
Critical000
High030
Medium000
Low700
HighCentralization RisksAcknowledged

In the contract `TheGreenWorld`, the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the token buying contract, add a dex address, prevent ownership transfer, retrieve lost tokens from the contract, update the PancakeSwap router, remove the dex address, and renounce ownership with a revert message. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-7c1f-8d37f5e0-b140-bdb840bafc72/diagrams/centralization_tgwtoken-TheGreenWorld-_owner.svg) In the contract `TheGreenWorld`, the role `dexAddresses` has authority over the functions shown in the diagram below. Any compromise to the `dexAddresses` account may allow the hacker to take advantage of this authority and prevent ownership transfer. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-7c1f-8d37f5e0-b140-bdb840bafc72/diagrams/centralization_tgwtoken-TheGreenWorld-dexAddresses.svg) In the contract `TheGreenWorld`, the role `owner` has authority over the functions shown in the diagram below. Any compromise to the `owner` account may allow the hacker to take advantage of this authority and set the token buying contract, remove dex address, add dex address, retrieve and transfer lost tokens, update PancakeSwap router, revert ownership transfer, and renounce ownership disallowed. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-7c1f-8d37f5e0-b140-bdb840bafc72/diagrams/centralization_tgwtoken-TheGreenWorld-owner.svg)

HighIncorrect Check on Buy OperationAcknowledged

The `transferFrom` function allows a spender to transfer tokens from the `from` account to the `to` account. The following check includes a comment indicating that the function cannot be used during a buy operation: ```solidity function transferFrom(address from, address to, uint256 amount) public override returns(bool) { require(to != address(0), "Transfers to the zero address (burn) are not allowed"); @> require(!_isBuyingOnPancakeSwap(from, to), "Buying from PancakeSwap is restricted"); emit TokenTransferFrom(msg.sender, from, to, amount); return super.transferFrom(from, to, amount); } ``` A similar validation is held by `transfer` as well. However, this check is incorrect in validating whether a token transfer occurs during a buy transaction. A buy operation involves users transferring another asset to the pair address and receiving `TGW` tokens in return from the pair. In this scenario, the token sender is the pair address, and the receiver (`to`) is the user's address. According to the logic in the following code: ```solidity function _isBuyingOnPancakeSwap(address from, address to) internal view returns (bool) { return from != pancakeSwapPair && to == pancakeSwapPair; } ``` `_isBuyingOnPancakeSwap` will return `false`. Consequently, the check `require(!_isBuyingOnPancakeSwap(from, to), "Buying from PancakeSwap is restricted")` will return `true`, allowing the user to initiate a buy operation via this function, which violates the intended design.

HighInitial Token DistributionAcknowledged

All of the `The Green World` tokens are sent to the contract deployer. This is a centralization risk because the deployer can distribute tokens without obtaining the consensus of the community. Any compromise to these addresses may allow a hacker to steal and sell tokens on the market, resulting in severe damage to the project.

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)

  • tgwtoken.sol

Part of The Green World’s security record

The Green World
Audits1 audit by 1 firmLast audit Oct 2024, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open The Green World’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