CertiK reviewed Coinhound on 5 May 2023: 12 findings, 0 critical; 4 acknowledged, 8 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 3 | 0 |
| Medium | 0 | 1 | 0 |
| Low | 8 | 0 | 0 |
In the function `_transfer()`, the difference in the contracts ETH before and after the swap are not checked, causing any ETH that has accidentally been sent to the contract to be included in the distribution of fees.
The `amount` that is added to the balance of the `recipient` to check that it does not exceed the `maxTokenPerWallet` does not take into account the fees. If fee is taken on the transfer, then the amount transferred will be `amount - allFee` so that the transaction may fail stating that the `maxTokenPerWallet` was exceeded, when it will not be.
There should always be events emitted in the sensitive functions that are controlled by centralization roles. The following functions do not emit events: - `excludeFromFee()`; - `excludeFromMaxTokenPerWallet()`; - `migrateETH()`
A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. **We mark this as informational considering reentrancy is only possible if the development wallet is set as a contract that makes external calls** If the `developmentWallet` is set as a contract that makes an external call in its `fallback()` or `receive()` function, then when ether is transffered to the contract, the external call may be used in order to re-enter the contract. ### External call(s) ```solidity=221 payable(developmentWallet).transfer(developmentPart); ``` ### State variables written after the call(s) ```solidity=223 swapping = false; ``` ```solidity=228 super._transfer(sender, recipient, amount); ``` * This function call executes the following assignment(s). * In `ERC20._transfer`, * `_balances[from] = fromBalance - amount` * In `ERC20._transfer`, * `_balances[to] += amount` ```solidity=235 super._transfer(sender, address(this), allFee); ``` * This function call executes the following assignment(s). * In `ERC20._transfer`, * `_balances[from] = fromBalance - amount` * In `ERC20._transfer`, * `_balances[to] += amount` *Note: Only a sample of 3 assignments (out of 4) are shown above.*
The contract `Coinhound` uses an old solidity version. ```solidity=20 pragma solidity 0.8.2; ```
Literals with many digits are difficult to read and review. ```solidity=87 maxTokenPerWallet = 5000000 * (10 ** 18); ``` --- ```solidity=88 maxTokenPerTxn = 10000000 * (10 ** 18); ``` --- ```solidity=89 swapTokensAtAmount = 100000 * (10 ** 18); ``` --- ```solidity=94 _mint(msg.sender, 1000000000 * (10 ** 18)); ```
In the function `_transfer()` the following checks are performed: ```solidity require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); ``` However, it any case `super._transfer(sender, recipient, amount)` or `super._transfer(sender, recipient, amount - allFee)` will be called. The `_transfer()` function in Openzeppelin's `ERC20` contract preforms these checks making it unnecessary to check them again.
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. The following lines use solidities `transfer()` function for transferring Ether. ```solidity=221 payable(developmentWallet).transfer(developmentPart); ``` ```solidity=277 recipient.transfer(address(this).balance); ```
| Address | Chain | Source code |
|---|---|---|
| 0xec50…6da10xec505c81d6a7567b5bde804870b1038832fe6da1 | Chain: Ethereum | Source code: Verified source |
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething 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