VSG

CertiKFiles named in the report

CertiK reviewed Vector Smart Gas (VSG) on 17 Sep 2024: 13 findings, 0 critical; 1 marked fixed, 3 acknowledged, 9 open.

No open critical findings
Open the reportOpen Vector Smart Gas’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings13

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

SeverityOpenAcknowledgedFixed
Critical000
High011
Medium020
Low900
LowMissing Emit EventsOpen

The smart contract contains one or more state changes related to arithmetic operations that do not emit events to communicate the changes outside the blockchain, which can lead to difficulties in tracking or verifying these changes and may affect the contract's transparency and auditability. ```solidity=446 devSplit = _devSplit; ``` ```solidity=447 marketingSplit = _marketingSplit; ``` ```solidity=448 lpSplit = _lpSplit; ``` ```solidity=441 sellTax = _newSellTax; ``` ```solidity=507 swapAtAmount = _newSwapAtAmount; ``` ```solidity=436 buyTax = _newBuyTax; ```

LowMissing Zero Address ValidationOpen

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=418 teamWallet = payable(_teamWallet); ``` - `_teamWallet` is not zero-checked before being used. ```solidity=417 marketingWallet = payable(_MarketingWallet); ``` - `_MarketingWallet` is not zero-checked before being used. ```solidity=456 marketingWallet = newMarketingWallet; ``` - `newMarketingWallet` is not zero-checked before being used. ```solidity=466 teamWallet = newTeamWallet; ``` - `newTeamWallet` is not zero-checked before being used.

LowPotential Incorrect Function Visibility Or NamingOpen

The current contract doesn't follow the naming convention specified by [Solidity DOC](https://docs.soliditylang.org/en/v0.8.20/style-guide.html#underscore-prefix-for-non-external-functions-and-variables), including the following: - The function name starts with `_`. However, the function is publicly/externally visible. This violates the naming convention, or even exposes the internal function to the public.

LowPotential Sandwich AttacksOpen

A sandwich attack can occur when an attacker notices a transaction involving token swaps or liquidity additions that lacks slippage restrictions or minimum output amount settings. The attacker can exploit this by frontrunning the transaction to purchase one of the assets, thereby manipulating the exchange rate, and then backrunning the transaction to sell the asset for a profit. The referenced functions are invoked without setting slippage restrictions or minimum output amounts, making transactions that trigger these functions particularly vulnerable to sandwich attacks, especially when large input amounts are involved.

LowState Variable Should Be Declared ConstantOpen

State variables that never change should be declared as `constant` to save gas. ```solidity=398 address dead = 0x000000000000000000000000000000000000dEaD; ``` - `dead` should be declared `constant`.

LowThird-Party Dependency UsageOpen

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=386 IRouter public Router; ``` - The contract `vectorsmartgas` interacts with third party contract with `IRouter` interface via `Router`.

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=595 ERC20(_tokenAddress).transfer(msg.sender, ERC20(_tokenAddress).balanceOf(address(this))); ```

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=579 try Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable dead, block.timestamp ) {} catch {revert("Failed to add liquidity");} ```

LowUsage of `transfer()` for sending EtherOpen

It is not recommended to use Solidity's `transfer()` and `send()` functions for transferring native tokens, 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=567 payable(marketingWallet).transfer(marketingAmount); ``` - `vectorsmartgas.SwapFees` uses `transfer()`.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (1)

  • contracts/vectorsmartgas.sol

Part of Vector Smart Gas’s security record

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