ToDing

CertiK1 address on BNB Chain

CertiK reviewed ToDing on 1 Aug 2024: 10 findings, 0 critical; 4 marked fixed, 6 open.

No open critical findings
Open the reportOpen ToDing’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
High101
Medium001
Low502
HighInitial Token DistributionOpen

70% of the `ToDing` tokens are sent to the contract deployer, 30% of the `ToDing` tokens are provided to the DEX pair for liquidity, and all liquidity tokens are subsequently 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.

LowApproved to send excess tokens to routersOpen

In the `startTrade()` function, the contract grants the `_swapRouter` an unlimited allowance: ```solidity=410 function startTrade() external payable onlyOwner { require(0 == startTradeBlock, "trading"); _approve(address(this), address(_swapRouter), ~uint256(0)); ``` Additionally, the `swapToEth()` function explicitly approves the `amount` of tokens to `_swapRouter` each time a token swap is executed: ```solidity=632 function swapToEth(address token, uint256 amount, address to) private { IERC20(token).approve(address(_swapRouter), amount); ``` Since an unlimited approval has already been granted in the `startTrade()` function, this additional approval in `swapToEth()` is redundant.

LowFunction `approve` of Contract `ToDing` Does NotOpen

It is expected that calls of the form `approve(spender, amount)` fail if the address in `spender` is the zero address.

LowLack of Error Handling in `_safeTransferETH()` FuOpen

The `_safeTransferETH()` function transfers BNB to a `to` address. It uses a low-level `call` to send the specified amount of BNB (`value`). However, the function does not properly handle cases where the `call` operation fails. This lack of error handling can lead to undetected failed transfers. ```solidity=331 function _safeTransferETH(address to, uint value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); if (success) {} } ```

LowUse `.call()` Instead Of `.transfer()`Open

The `.transfer()` function intends to transfer an ETH amount with a fixed amount of 2300 gas. This function is not equipped to handle changes in the underlying `.transfer()` function which may supply different amounts of gas in the future. Additionally, if the recipient implements a fallback function containing some sort of logic, this may inevitably revert, meaning the vault and owner of the contract will never be able to call certain sensitive functions.

LowVariables That Could Be Declared as ImmutableOpen

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

Contracts in scope1

AddressChainSource code
0x1592c5704f9e8c20bf7707c5d42626cecda912c0Chain: BNB ChainSource code: Verified source

Part of ToDing’s security record

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