Sonic Inu

CertiK1 address on BNB Chain

CertiK reviewed Sonic Inu on 18 May 2023: 18 findings, 0 critical; 2 marked fixed, 16 open.

No open critical findings
Open the reportOpen Sonic Inu’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings18

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

SeverityOpenAcknowledgedFixed
Critical000
High101
Medium201
Low1300
HighInitial Distribution Centralization RiskOpen

All `SonicInu` tokens are sent to the owner when deploying the contract. Therefore the owner completely determines the token distribution.

MediumMissing Input Validation for Fee AddressOpen

The functions `updateOpsWallet()`, `updateDevWallet()`, and `updateMarketingWallet()` do not perform any input validation on the `newWallet` parameter. This means that any address can be set as the new wallet, including the contract itself, which can result in the contract gaining tokens through fees.

MediumVariable `_rOwned[account]` Not Updated in FunctiOpen

The function `includeInReward` below has a known rate issue. If an excludedFromReward account sends or receives tokens, its tOwned balance is updated. However _rOwned was not updated. This results in an incorrect increase in the return value of `_getRate`. ```solidity function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } ```

Low`RValues` Calculations Done SeparatelyOpen

In the codebase, the calculation of the r values for the fees is divided into two separate functions, `_getRValues1()` and `_getRValues2()`. However, neither of the functions is used separately, and they could be merged into a single function to improve the code's readability.

LowCheck Effect Interaction Pattern ViolatedOpen

The order of an external call or transfer with respect to a storage manipulation action should follow the check effect interaction pattern. In this case, the function `_transfer()` is called before `_approve()`.

LowFee Exemption not RevokedOpen

The owner is exempt from fees by default. Yet when ownership is reset through `transferOwnership()`, the exemptions are not granted to the new owner nor are they revoked from the previous owner.

LowMissing Emit EventsOpen

Functions that update state variables should emit relevant events as notifications.

LowPotential Reentrancy AttackOpen

The `_transfer()` function is open to an reentrancy attack if `uniswapV2Router` is set maliciously. The function call of `swapAndLiquify()` would eventually send `ethAmount` via `uniswapV2Router.addLiquidityETH()`, and state variable `_rOwned` is changed later in the function call of `_tokenTransfer()`.

LowState Variable Should Be Declared ConstantOpen

The following are state variables that are never changed. To save gas they can be declared as constants. ```solidity=143 uint256 private _tTotal = 42e16 * 10**_decimals; ``` - `_tTotal` should be declared `constant`. --- ```solidity=151 address public deadWallet = 0x000000000000000000000000000000000000dEaD; ``` - `deadWallet` should be declared `constant`.

LowTypoOpen

There is a typos in the codebase: - "UNLICENSE" should be "UNLICENSED"

Show 6 more
LowUnchecked ERC-20 `transfer()`/`transferFrom()` CaOpen

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=742 IBEP20(_tokenAddr).transfer(_to, _amount); ```

LowUnused FeesChanged EventOpen

The event `FeesChanged` was defined in the contract `Sonic Inu` but was not used on the codebase.

LowUnused Return ValueOpen

The smart contract does not check or store the return value of an external call in a local or state variable, which may introduce vulnerabilities due to the unhandled outcome. ```solidity=674 router.addLiquidityETH{ value: bnbAmount }( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable deadWallet, block.timestamp ); ```

LowUnused State VariableOpen

The variable `_lastSell` is not used in the codebase. ```solidity=135 mapping(address => uint256) private _lastSell; ```

LowUsage of `msg.sender` instead of `_msgSender()`Open

The linked functions use `msg.sender` to retrieve the sender of the transaction instead of using the function `_msgSender()`. Given that the function is inherited from the contract `AccessControl`, which in turns inherits from `Context`, the return value will be the same, but there will be consistency across the contract.

LowUsage of `transfer`/`send` for sending EtherOpen

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. ```solidity=736 payable(msg.sender).transfer(weiAmount); ```

Contracts in scope1

AddressChainSource code
0x066cda0cca84e9c6ed0a4ecb92aa036a9582544bChain: BNB ChainSource code: Verified source

Part of Sonic Inu’s security record

Sonic Inu
Audits1 audit by 1 firmLast audit May 2023, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Sonic Inu’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 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