EGO

CertiKFiles named in the report

CertiK reviewed EgoCoin (EGO) on 4 May 2023: 19 findings, 0 critical; 7 marked fixed, 4 acknowledged, 8 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings19

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

SeverityOpenAcknowledgedFixed
Critical000
High031
Medium010
Low806
HighIncorrect claim amount calculation - missing starFixed

The `_computeReleasableAmount` function is called by `claim` function and is responsible for calculating the tokens that will be sent to the user. If the user claims the token after the vesting end time, the function will return less than the total number of claimable tokens defined in the variable `totalAmountOfUser`. The calculation should not exclude the "startAmount" after the vesting schedule ends. Due to the error, users will not be able to claim the full reward amount after the vesting period ends. ```solidity if (currentTime < vestingStartTime) { return 0; } else if (currentTime >= vestingEndTime) { return totalAmountOfUser .mul((100 - startVestingPercentage)) .div(100) .sub(userAddressToAmountClaimed[_account]); } else { ... } ```

Low`update()` should be called in the `setStakingRulFixed

The "setStakingRules" function can be used to modify the reward token and record release configuration. It is generally a best practice to call the "update" function to update relevant reward state variables before updating the contract reward configuration. This can ensure that the reward before the change was properly calculated with old configurations.

LowInappropriate `onlyRole(ADMIN_ROLE)` modifierFixed

The code comment for the `getViewData` function states that 'With this function user can see information...'; however, the function is protected with the `onlyRole(ADMIN_ROLE)` modifier, which restricts access to only the admin. The function should not have such an access restriction. ```sol=176 /** * @notice With this function user can see information about contract, including tokens addresses, amount of reward tokens, that will be paid to all of user in some epoch, duration of epoch and the minimum period of time for which the reward is received. * @return viewData - structure with information about contract. */ function getViewData() external view onlyRole(ADMIN_ROLE) returns (ViewData memory viewData) ```

LowIncorrect Event ParameterFixed

The first parameter of the "FalseSender" event should be "sourceChain," but the code uses "sourceAddress," which is an incorrect event parameter. ```sol=70 event FalseSender(string sourceChain, string sourceAddress); ``` ```sol=263 emit FalseSender(sourceAddress, sourceAddress); ```

LowRedundant StatementsFixed

The code check if the msg.sender claimed the "StartAmount"; if not, the calculation will perform the ".sub(userAddressToAmountClaimed[_account])" in the calculation. ```sol=178 if (!isStartAmountClaimed[msg.sender]) { vestedAmount = vestedAmount.add(startAmount).sub( userAddressToAmountClaimed[_account] ); ``` However, based on the code logic in the "claim" function, the value of "isStartAmountClaimed" will be set to true only if "userAddressToAmountClaimed" is not equal to zero. On the contrary, if the "isStartAmountClaimed[address]" is not equal to true, the "isStartAmountClaimed[address]" will always equal zero, making the ".sub(userAddressToAmountClaimed[_account])" meaningless. ```sol=103 userAddressToAmountClaimed[msg.sender] += _amount; isStartAmountClaimed[msg.sender] = true; ```

LowThe `require` and role check should be moved to tFixed

Some functions place the role check and `require` check at the end of the function call, which wastes gas for the previous code execution if the transaction reverts. ```sol=190 require( trustedRemotes[destinationChain], "Chain does not supported" ); ``` ```sol=307 _checkRole(BRIDGE_MASTER_ROLE, to); require( maxSupply >= totalSupply() + amount, "Total supply of token reached" ); ```

LowUnchecked ERC-20 `transfer()`/`transferFrom()` CaFixed

The return value of the transfer()/transferFrom() call is not checked. ```solidity=133 IERC20(_token).transfer(_receiver, _amount); ```

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

  • contracts/ERC20/interfaces/IERC20CrossChain.sol
  • contracts/ERC20/EgoERC20GotBit.sol
  • contracts/InvestorPortal/VestingV1.sol
  • contracts/InvestorPortal/StakingSample.sol

Part of EgoCoin’s security record

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