CertiK reviewed Biceps Coin (Biceps - audit) on 19 Apr 2024: 13 findings, 0 critical; 1 marked fixed, 3 acknowledged, 9 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 | 1 |
| Medium | 0 | 2 | 0 |
| Low | 9 | 0 | 0 |
The `initialize()` functions below are not called by another contract atomically after the contract is deployed, so it's possible for a malicious user to call `initialize()` which, if it's noticed in time, would require the project to re-deploy the contract in order to properly initialize. ----- Onchain Data The team successfully executed the deployment of this contract and its initialization within a single transaction: [0x7a3364a511fb1b25902bb78c4b9ca4bed9b9c336dd133dabc0fcc3e2fcb8cdfa](https://bscscan.com/tx/0x7a3364a511fb1b25902bb78c4b9ca4bed9b9c336dd133dabc0fcc3e2fcb8cdfa). However, should the contract be deployed anew, the same problem will persist.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.
Addresses are not validated before assignment or external calls, potentially allowing the use of zero addresses and leading to unexpected behavior or vulnerabilities. For example, transferring tokens to a zero address can result in a permanent loss of those tokens. ```solidity=344 rewardToken = _rewardToken; ``` - `_rewardToken` is not zero-checked before being used.
A sandwich attack may 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 frontrunning (executing before the target) a transaction to purchase one of the assets and make profits by backrunning (executing after the target) a transaction to sell the asset. The following 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: - `routerV2.swapExactTokensForETHSupportingFeeOnTransferTokens()` - `routerV2.swapExactTokensForTokensSupportingFeeOnTransferTokens()` - `routerV2.addLiquidityETH{value: ethAmount}()`
The use of `false` is redundant and does not affect the outcome, making the code less clear and potentially harder to maintain. Simplifying the condition to `if (_tatesPending > 0) {` enhances readability and maintains the intended functionality without unnecessary complexity. ```solidity=331 if (false || _tatesPending > 0) { ```
The contract is serving as the underlying entity to interact with one or more third party protocols. The scope of the audit treats third party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=43 IUniswapV2Router02 public routerV2; ``` - The contract `Biceps` interacts with third party contract with `IUniswapV2Router02` interface via `routerV2`.
The return values of the `transfer()` and `transferFrom()` calls in the smart contract are not checked. Some ERC-20 tokens' transfer functions return no values, while others return a bool value, they should be handled with care. If a function returns `false` instead of reverting upon failure, an unchecked failed transfer could be mistakenly considered successful in the contract. ```solidity=192 IERC20(rewardToken).transferFrom(msg.sender, address(this), amount); ``` --- ```solidity=13 IERC20(tokenAddress).transfer(owner(), amount); ```
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.
| Address | Chain | Source code |
|---|---|---|
| 0x8e5c…05f80x8e5cb7626dd949dff56fe2c130b75a8b6f1a05f8 | Chain: BNB Chain | 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