CertiK reviewed Edain (Edain-(Staking)) on 3 May 2022: 10 findings, 0 critical; 6 marked fixed, 2 acknowledged, 2 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 2 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 2 | 6 |
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/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 20, Contract `Staking`) ```solidity address[] public _validators; ``` - Variable `_validators` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 21, Contract `Staking`) ```solidity mapping(address => bool) _addressToIsValidator; ``` - Variable `_addressToIsValidator` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 22, Contract `Staking`) ```solidity mapping(address => uint256) _addressToStakedAmount; ``` - Variable `_addressToStakedAmount` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 23, Contract `Staking`) ```solidity mapping(address => uint256) _addressToValidatorIndex; ``` - Variable `_addressToValidatorIndex` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 63, Function `Staking.stake`) ```solidity function stake(address _validatorNode) external payable returns (bool) { ``` - Parameter `_validatorNode` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 72, Function `Staking.unstake`) ```solidity function unstake(address _validatorNode) ``` - Parameter `_validatorNode` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 117, Function `ValidatorStaking.verify`) ```solidity address _signer, ``` - Parameter `_signer` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 118, Function `ValidatorStaking.verify`) ```solidity address _validatorNodeAddress, ``` - Parameter `_validatorNodeAddress` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 119, Function `ValidatorStaking.verify`) ```solidity string memory _message, ``` - Parameter `_message` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 129, Function `ValidatorStaking.recoverSigner`) ```solidity bytes32 _ethSignedMessageHash, ``` - Parameter `_ethSignedMessageHash` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 130, Function `ValidatorStaking.recoverSigner`) ```solidity bytes memory _signature ``` - Parameter `_signature` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 139, Function `ValidatorStaking.getEthSignedMessageHash`) ```solidity function getEthSignedMessageHash(bytes32 _messageHash) ``` - Parameter `_messageHash` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 23, Function `ValidatorStaking.getMessageHash`) ```solidity address _validatorNodeAddress, ``` - Parameter `_validatorNodeAddress` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/ValidatorStaking.sol (Line 24, Function `ValidatorStaking.getMessageHash`) ```solidity string memory _message ``` - Parameter `_message` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/XidenERC20.sol (Line 102, Function `XidenERC20.unstake`) ```solidity function unstake(address _validatorNodeAddress, string calldata _machineId) ``` - Parameter `_machineId` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/XidenERC20.sol (Line 102, Function `XidenERC20.unstake`) ```solidity function unstake(address _validatorNodeAddress, string calldata _machineId) ``` - Parameter `_validatorNodeAddress` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/XidenERC20.sol (Line 136, Function `XidenERC20.mint`) ```solidity function mint(address _account, uint256 _amount) external onlyOwner { ``` - Parameter `_account` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-contracts/contracts/XidenERC20.sol (Line 136, Function `XidenERC20.mint`) ```solidity function mint(address _account, uint256 _amount) external onlyOwner { ``` - Parameter `_amount` is not in `camelCase`. --- File: projects/cryptodata-com/staking-smart-cont
Multiple Solidity versions are used in the codebase. Versions used: `^0.8.0`, `^0.8.7`, `>=0.4.22<0.9.0` File: projects/cryptodata-com/staking-smart-contracts/node_modules/@openzeppelin/contracts/access/Ownable.sol (Line 4) ```solidity pragma solidity ^0.8.0; ``` File: projects/cryptodata-com/staking-smart-contracts/contracts/Staking.sol (Line 2) ```solidity pragma solidity ^0.8.7; ``` File: projects/cryptodata-com/staking-smart-contracts/contracts/Migrations.sol (Line 2) ```solidity pragma solidity >=0.4.22 <0.9.0; ```
Notes: `msg.value` is the number of `wei` sent with a message `VALIDATOR_THRESHOLD` is equal to `2,000,000 * (1e18)` The function `stake()` requires `msg.value` to be greater than `VALIDATOR_THRESHOLD`. Therefore we must have 2 million ether passed for the function to pass the require check.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
The signature malleability is possible within the Elliptic Curve cryptographic system. An Elliptic Curve is symmetric on the X-axis, meaning two points can exist with the same `X` value. In the `r`, `s` and `v` representation this permits us to carefully adjust `s` to produce a second valid signature for the same `r`, thus breaking the assumption that a signature cannot be replayed in what is known as a replay-attack.
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (3)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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