Basenji - audit 1

CertiK1 address on Base

CertiK reviewed Basenji (Basenji - audit 1) on 12 Apr 2024: 15 findings, 0 critical; 7 marked fixed, 7 acknowledged, 1 open.

No open critical findings
Open the reportOpen Basenji’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings15

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High101
Medium003
Low073
LowIncorrect calculation of the ETH for DevAcknowledged

In the function `swapBack()`, the `BENJI` tokens are swapped for ETH and then assigned to `devWallet` and `marketingWallet`. Based on lines 1609 to 1612, where the swapping of tokens reduces half of the liquidity, the resulting ETH is distributed among `Dev`, `Marketing`, and a half for `Liquidity`. Therefore, line 1620 should divide the `amountToSwapForETH` instead of `totalTokensToSwap`.

LowMiscalculation of Max HoldingAcknowledged

The transaction may be charged fees, so the max holding of the receiver should be the sum of the held tokens and the amount received from the transfer. The fees should not be included in the max holding. ```solidity=1503 require( amount + balanceOf(to) <= maxWallet, "Max wallet exceeded" ); ``` - Max holding is checked. ```solidity=1568 amount -= fees; ``` - Receiving amount is adjusted. ```solidity=493 _balances[recipient] = _balances[recipient].add(amount); ``` - Balance is increased by the adjusted amount.

LowMissing Slippage Check for Dex swap operationsAcknowledged

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. ```solidity=1585 uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); ```

LowRedundant use of SafeMathAcknowledged

olidity version >=0.8.0 includes checked arithmetic operations and underflow/overflow by default, making SafeMath redundant.

LowThird-Party Dependency UsageAcknowledged

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=1065 IUniswapV2Router02 public immutable uniswapV2Router; ``` - The contract `Basenji` interacts with third party contract with `IUniswapV2Router02` interface via `uniswapV2Router`.

LowUnused EventAcknowledged

Some events are never emitted, which can lead to confusion and code maintainability issues. ```solidity=1132 event UpdateUniswapV2Router( address indexed newAddress, address indexed oldAddress ); ``` ```solidity=1151 event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event AutoNukeLP(); event ManualNukeLP(); ``` ```solidity=1418 event BoughtEarly(address indexed sniper); ```

LowUnused State VariableAcknowledged

Some state variables are not used in the codebase. Removing the unused variable and related code could reduce the gas consumption on deployment. ```solidity=1077 uint256 public launchedAtCoefficient; ``` ```solidity=1111 uint256 feeCalculationData; ```

Contracts in scope1

AddressChainSource code
0xbc45647ea894030a4e9801ec03479739fa2485f0Chain: BaseSource code: Verified source

Part of Basenji’s security record

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