Omniscia Echidna Finance Audit
EcdPtpStaking Code Style Findings
EcdPtpStaking Code Style Findings
EPS-01C: Inexistent Mutability Specifiers
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | EcdPtpStaking.sol:L32, L35, L42, L58, L59 |
Description:
The linked variables are assigned to only once either during their declaration or the constructor
's execution.
Example:
contracts/rewards/EcdPtpStaking.sol
41/// @notice DELAY to update ecdPtpPerSec42uint256 public DELAY = 1 days;43
44/// @notice delayNewEcdPtpPerSec the new delay for new EcdPtpParSec45uint256 public delayNewEcdPtpPerSec;46
47/// @notice to be used to update ecdPtpPerSec48uint256 public newEcdPtpPerSec;49
50/// @notice amount ecdPtp staked51mapping(address => UserInfo) private _users;52
53constructor(54 IERC20 ecdPtp_,55 IMintable ecd_,56 uint256 ecdPerSec_57) {58 ecdPtp = ecdPtp_;59 ecd = ecd_;60 ecdPerSec = ecdPerSec_;61
62 // initialize lastRewardTimestamp63 lastRewardTimestamp = block.timestamp;64}
Recommendation:
We advise them to be set as constant
and immutable
accordingly.
Alleviation:
All variables had their mutability correspondingly assigned.