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
LowCheck Effect Interaction Pattern ViolatedOpen

A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. ### External call(s) ```solidity=142 IERC20(tokenAddress).safeTransfer(msg.sender, totalAmount); ``` ### State variables written after the call(s) ```solidity=144 account.amountStake -= _amount; ``` ```solidity=146 account.missedReward = tokenPerStake * account.amountStake; ``` ```solidity=149 totalAmountStake -= _amount; ``` --- ### External call(s) ```solidity=164 IERC20(tokenAddress).safeTransfer(msg.sender, amount); ``` ### State variables written after the call(s) ```solidity=165 account.missedReward += amount * precision; ```

LowConfirm ChainIDOpen

The comment says "Mint initial supply to polygon", but the `block.chainid` of 80001 corresponds to the Mumbai testnet.

LowIncompatibility with Deflationary TokensOpen

When transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=110 IERC20(tokenAddress).safeTransferFrom(msg.sender, address(this), _amount); ``` - Transferring tokens by `_amount`. ```solidity=120 totalAmountStake += _amount; ``` - The `_amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.

LowPotential Insufficient Token Balance For reward DOpen

In the contract `StakingSample.sol`, rewards are distributed in the same `tokenAddress` token used to stake. If the owner does not deposit extra rewards tokens into the contract, then rewards will be paid from other users' deposits.

Lowredundant value re-assignmentOpen

The variable re-assignment below is considered redundant in the contract. ```sol=168 uint256 secondsPerSlice = vestingSlicePeriodSeconds; ```

LowState Variable Should Be Declared ConstantOpen

State variables that never change should be declared as `constant` to save gas. ```solidity=40 uint256 public vestingSlicePeriodSeconds = 60; ``` - `vestingSlicePeriodSeconds` should be declared `constant`.

LowUnnecessary Use of SafeMathOpen

The `SafeMath` library is used unnecessarily. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow. ```solidity=14 using SafeMath for uint256; ``` - `SafeMath` library is used for `uint256` type in `Vesting` contract. ```solidity=161 return totalAmountOfUser .mul((100 - startVestingPercentage)) .div(100) .sub(userAddressToAmountClaimed[_account]); ``` - `SafeMath.mul` is called in `_computeReleasableAmount` function of `Vesting` contract. *Note: Only a sample of 2 `SafeMath` library usage in this contract (out of 17) are shown above.*

LowVariables That Could Be Declared as ImmutableOpen

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