CertiK reviewed ADreward(AD) on 3 Mar 2023: 14 findings, 0 critical; 1 acknowledged, 13 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 | 1 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 13 | 0 | 0 |
Inside of the constructor in `TokenERC20`, `totalSupply` is calculated without SafeMath. The lack of SafeMath can allow for arithmetic overflow. As such the current calculation of `totalSupply` can overflow if the input from `initialSupply` is unusually high.
In the contract `TokenERC20`, the requirement check that balanceOf[_to] + _value > balanceOf[_to] disallows transfers of value 0. This could create incompatibility with third parties protocols. However, the check inside of `EGAMEAD` will pass on zero transfers.
The ERC-20 `approve` function has a well-known race condition whereby an adjustment of an existing approval can be exploited to utilize the full amount of the previously set approval, as well as the newly set approval by monitoring the transaction mempool. See also [ERC20 API: An Attack Vector on Approve/TransferFrom Methods](https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit#heading=h.m9fhqynw2xvt).
The function `release()` and modifier `OnlyReleased()` would be better described as `togglePause()` for the function and `whenNotPaused()` for the modifier.
Functions that affect the status of sensitive variables should be able to emit events as notifications to customers: - `release()`. - `transferOwnership()`. - `approveandCall()`. Additionally, since the `owner` is updated on deploy, the `constructor` should emit an event of this occurrence.
The following modifiers and functions should emit an error message in the require statement: Modifiers: - `onlyReleased()`. - `onlyOwner()`. ------- Functions: - `transferFrom()` - `release()`. - `_transfer()`. - `approve()`. - `burn()`. - `burnFrom()`.
The function `transferOwnership()` should check if the `newOwner` is not the zero address. If this function is intended to send ownership to the zero address, then the functionality should be separated.
The `assert` function should only be used to test for internal errors, and to check invariants. The `require` function should be used to ensure valid conditions, such as inputs, or contract state variables are met, or to validate return values from calls to external contracts.
In the function `release()`, it checks if the `msg.sender` is the owner. However, this is already checked inside of `OnlyOwner`.
The `_transfer()` function in `EGAMEAD` is almost identical to the `_transfer()` inside of `TokenERC20` except for the following checks: ```solidity=110 assert(balanceOf[_from].add(balanceOf[_to]) == previousBalances); ``` ```solidity=211 require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen ``` Instead of reusing the code, `super._transfer()` can be used to access the remaining logic from `TokenERC20`.
The contract, `EGAMEAD`, redundantly extends the contract `owned`. This functionality is already available through `TokenERC20`.
Solidity frequently releases new compiler versions. Using an old version prevents access to new Solidity security features. In addition the contracts have an unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to ambiguity when debugging, as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.
The following state variable never changes and should be declared as `constant` to save gas: - `decimals` The following state variables are not changed after they are updated in the `constructor`. If the compiler version is updated to version v0.6.5 or later, then the corresponding variables can be declared as `immutable` to save gas. - `name` - `symbol`
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
1,044 projects reviewed · 1,375 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