Carrieverse - audit

CertiKFiles named in the report

CertiK reviewed Carrieverse (Carrieverse - audit) on 28 Oct 2022: 7 findings, 0 critical; 5 marked fixed, 2 acknowledged.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium000
Low005
LowCheck Effect Interaction Pattern ViolatedFixed

In the function `EmployeeTokenLock.withdraw()`, `lockupInfo[_lockupIndex]` is deleted after transferring the tokens, which violates the check-effect-interaction pattern. If the token has a hook, it can reenter the same function and drain token balance. Functions `EmployeeTokenLock.withdraws()`, `TokenLock.withdraw()`, and `TokenLock.withdraws()` share the same issue. ```solidity=249 function withdraw(uint256 _lockupIndex) public onlyLock(_lockupIndex) returns(uint256 withdrawBalance){ uint256 balance = getBalance(_lockupIndex); require(balance > 0, "EmployeeTokenLock: NOT_AMOUNT"); require(IERC20(token).transferFrom(address(this), msg.sender, balance)); delete lockupInfo[_lockupIndex]; uint256 index = 0; for( index; index < accountToLockupIndex[msg.sender].length; index++ ){ if( accountToLockupIndex[msg.sender][index] == _lockupIndex ){ break; } } if( accountToLockupIndex[msg.sender].length > 0 ){ accountToLockupIndex[msg.sender][index] = accountToLockupIndex[msg.sender][accountToLockupIndex[msg.sender].length-1]; accountToLockupIndex[msg.sender].pop(); } totalAmount -= balance; lockupCount--; withdrawBalance = balance; emit withdrawEvent(msg.sender, _lockupIndex, balance); } ```

LowLack of Input ValidationFixed

In contract `TokenLock`, the `setLockup()` function checks for address, amount and duration as following, but the `setLockups()` function does not contain these checks. ```solidity=87 require( _account != address(0), "TokenLock: NOT_ADDRESS"); require( _amount > 0, "TokenLock: NOT_AMOUNT"); require( _duration > 0, "TokenLock: NOT_DURATION"); ``` This also applies to contract `EmployeeTokenLock`.

LowMissing Error MessagesFixed

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.

LowMissing Zero Address ValidationFixed

The following addresses should be checked before assignment to make sure they are not zero addresses. In contract `EmployeeTokenLock`: ```solidity=49 admin = _admin; token = _token; ``` In contract `TokenLock`: ```solidity=44 admin = _admin; token = _token; ```

LowVariables That Could Be Declared as ImmutableFixed

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.

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 (11)

  • contracts/token/ERC20/ERC20.sol
  • contracts/token/ERC20/IERC20.sol
  • contracts/interfaces/IERC20.sol
  • contracts/TokenLock.sol
  • contracts/CarrieVerseToken.sol
  • contracts/token/ERC20/extensions/IERC20Metadata.sol
  • contracts/EmployeeTokenLock.sol
  • contracts/token/ERC20/utils/SafeERC20.sol
  • contracts/utils/Context.sol
  • contracts/utils/Address.sol
  • contracts/access/Ownable.sol

Part of Carrieverse’s security record

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