CertiK reviewed Binemon (Apple(AMB)-Binemon NFT) on 11 Nov 2022: 19 findings, 0 critical; 4 acknowledged, 15 open.
Report hosted on skynet.certik.com.
Statuses are the security firm’s own, from this report. 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 | 4 | 0 |
| Medium | 1 | 0 | 0 |
| Low | 14 | 0 | 0 |
Generally, deflationary tokens are incompatible with DEX and special rules need to be coded for DEX addresses eg. excluding them from reward. Otherwise, a hacker can exploit the protocol using the reflection mechanism. The balance of accounts that include rewards is calculated by `rAmount/rate`, where the rate is determined base on the total supply. If the `deliver()` function is executed with significant input, it can significantly decrease `rTotal`, thereby allowing for manipulation of the rate.
Performing integer division before multiplication truncates the low bits, losing the precision of calculation. File: Apple.sol (Line 683, Function `Apple.swapTokens`) ```solidity transferToAddressETH(treasuryAddress, transferredBalance.div(_liquidityFee).mul(treasuryDivisor)); ```
The `AMB` is a decentralized finance(Defi) token deployed on the BSC.\ Each transaction is taxed with fees totaling `_taxFee` + `_liquidityFee` of the transaction amount. `_liquidityFee` will be added to the contract address when the balance of the contract exceeds `minimumBeforeSwapToTreasury`: - the balance will be converted to `WETH`. - 1/3 `WETH` of the contract will be transferred to the `treasuryAddress`. When `AMB` contract enables buying back, 1% of the remaining balance of `WETH` will be used to exchange for `AMB` which will be sent to the dead address. The owner can do this operation and set `_taxFee`, `_liquidityFee` and `treasuryAddress` manually.
State variables are inline initialized using either non-constant state variable or function calls that are not pure/constant. Since inline initialization occurs before constructor call, some non-constant state variables may not be initialized and non-constant functions may behave in an unexpected way. File: Apple.sol (Line 435, Contract `Apple`) ```solidity uint256 private _rTotal = (MAX - (MAX % _tTotal)); ``` --- File: Apple.sol (Line 444, Contract `Apple`) ```solidity uint256 private _previousTaxFee = _taxFee; ``` --- File: Apple.sol (Line 447, Contract `Apple`) ```solidity uint256 private _previousLiquidityFee = _liquidityFee; ```
`public` functions that are never called by the contract could be declared as `external`. `external` functions are more efficient than `public` functions.
The error message in `require(_isExcluded[account], "Account is already excluded")` does not describe the error correctly.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
Addresses should be checked before assignment or external call to make sure they are not zero addresses. File: Apple.sol (Line 923, Function `Apple.setTreasuryAddress`) ```solidity treasuryAddress = payable(_treasuryAddress); ``` - `_treasuryAddress` is not zero-checked before being used.
A sandwich attack might happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by front-running (before the transaction being attacked) a transaction to purchase one of the assets and make profits by back-running (after the transaction being attacked) a transaction to sell the asset. The functions are called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large.
The linked statements do not affect the functionality of the codebase and appear to be either leftovers from test code or older functionality.
A local variable is shadowing another component defined elsewhere. File: Apple.sol (Line 530, Function `Apple.allowance`) ```solidity function allowance(address owner, address spender) public view override returns (uint256) { ``` - Local variable `owner` shadows the function `owner` in `Ownable`. File: Apple.sol (Line 164, Contract `Ownable`) ```solidity function owner() public view returns (address) { ``` --- File: Apple.sol (Line 621, Function `Apple._approve`) ```solidity function _approve(address owner, address spender, uint256 amount) private { ``` - Local variable `owner` shadows the function `owner` in `Ownable`. File: Apple.sol (Line 164, Contract `Ownable`) ```solidity function owner() public view returns (address) { ```
The contract is serving as the underlying entity to interact with third party **PancakeSwap** protocols. The scope of the audit treats 3rd party entities as black boxes and assume their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of 3rd parties can possibly create severe impacts, such as increasing fees of 3rd parties, migrating to new LP pools, etc.
The contract has 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 an 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 return value of an external call is not stored in a local or state variable. File: Apple.sol (Line 736-743, Function `Apple.addLiquidity`) ```solidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); ```
The linked variables could be declared as `constant` since these state variables are never modified.
| Address | Chain | Source code |
|---|---|---|
| 0x9597…30d40x95977a9daa14a00258f89a14f75b6e35d5b730d4 | Chain: BNB Chain | Source code: Verified source |
1,044 projects reviewed · 1,393 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