Edain-(EdainAI)

CertiKFiles named in the report

CertiK reviewed Edain (Edain-(EdainAI)) on 15 Apr 2022: 6 findings, 0 critical; all acknowledged, none fixed.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings6

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

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium000
Low040
HighCentralization Related Risks in `EDAINToken.sol`Acknowledged

In the contract `[EDAINToken]`, the role `[MINTER_ROLE]` has authority over the following functions: - mint() Any compromise to the `[MINTER_ROLE]` account may allow a hacker to take advantage of this authority and mint tokens to themselves or to anyone they please.

HighInitial Token DistributionAcknowledged

All of the [Edain] tokens are sent to the contract deployer when deploying the contract. This could be a centralization risk as the deployer can distribute [Edain] tokens without obtaining the consensus of the community.

LowDeclaration Naming ConventionAcknowledged

One or more declarations do not conform to the [Solidity style guide](https://solidity.readthedocs.io/en/v0.7.3/style-guide.html#naming-conventions) with regards to its naming convention. Particularly: - `camelCase`: Should be applied to function names, argument names, local and state variable names, modifiers - `UPPER_CASE`: Should be applied to `constant` variables - `CapWords`: Should be applied to contract names, struct names, event names and enums File: projects/edain-smartcontracts/contracts/EDAINStaking.sol (Line 177, Function `EDAINStaking.hasStake`) ```solidity function hasStake(address _staker) ``` - Parameter `_staker` is not in `camelCase`. --- File: projects/edain-smartcontracts/contracts/EDAINStaking.sol (Line 55, Contract `EDAINStaking`) ```solidity function __EDAINStaking_init() public initializer { ``` - Function `__EDAINStaking_init` is not in `camelCase`. --- File: projects/edain-smartcontracts/contracts/EDAINToken.sol (Line 145, Function `EDAINToken.withdrawStake`) ```solidity function withdrawStake(uint256 amount, uint256 stake_index) external { ``` - Parameter `stake_index` is not in `camelCase`. --- File: projects/edain-smartcontracts/contracts/Migrations.sol (Line 6, Contract `Migrations`) ```solidity uint public last_completed_migration; ``` - Variable `last_completed_migration` is not in `camelCase`.

LowDifferent Solidity VersionsAcknowledged

Multiple Solidity versions are used in the codebase. Versions used: `^0.8.2`, `^0.8.0`, `^0.8.1`, `>=0.4.22<0.9.0` File: projects/edain-smartcontracts/contracts/EDAINToken.sol (Line 2) ```solidity pragma solidity ^0.8.2; ``` File: projects/edain-smartcontracts/node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol (Line 4) ```solidity pragma solidity ^0.8.0; ``` File: projects/edain-smartcontracts/node_modules/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol (Line 4) ```solidity pragma solidity ^0.8.1; ``` File: projects/edain-smartcontracts/contracts/Migrations.sol (Line 2) ```solidity pragma solidity >=0.4.22 <0.9.0; ```

LowDivide Before MultiplyAcknowledged

Performing integer division before multiplication truncates the low bits, losing the precision of calculation. In the `EDAINStaking.sol` contract the `currentReward` is calculated as follows, ```solidity uint256 _coinAge = (block.timestamp - _current_stake.timestamp).div( 1 days ); ``` ```solidity uint256 currentReward = _coinAge * interest * _current_stake.amount; ```

LowUnlocked Compiler VersionAcknowledged

The contract has unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to different compiler versions. This can lead to an ambiguity when debugging as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

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

  • contracts/EDAINToken.sol
  • contracts/EDAINStaking.sol

Part of Edain’s security record

Edain
Audits2 audits by 1 firmLast audit May 2022, by CertiK.
Critical findingsNo open critical findingsAcross 2 reports.
Open Edain’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