Omniscia Echidna Finance Audit

EcdPtpStaking Code Style Findings

EcdPtpStaking Code Style Findings

EPS-01C: Inexistent Mutability Specifiers

TypeSeverityLocation
Gas OptimizationInformationalEcdPtpStaking.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 ecdPtpPerSec
42uint256 public DELAY = 1 days;
43
44/// @notice delayNewEcdPtpPerSec the new delay for new EcdPtpParSec
45uint256 public delayNewEcdPtpPerSec;
46
47/// @notice to be used to update ecdPtpPerSec
48uint256 public newEcdPtpPerSec;
49
50/// @notice amount ecdPtp staked
51mapping(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 lastRewardTimestamp
63 lastRewardTimestamp = block.timestamp;
64}

Recommendation:

We advise them to be set as constant and immutable accordingly.

Alleviation:

All variables had their mutability correspondingly assigned.