Omniscia Colony Lab Audit

AuthorizedStaking Code Style Findings

AuthorizedStaking Code Style Findings

ASG-01C: Redundant Storage Assignment

Description:

The linked assignment is redundant as it assigns the default value the migrator variable holds to it.

Example:

contracts/StakingV2/AuthorizedStaking.sol
75/**
76 * @dev Constructor/Initializer
77 * @param stakeToken_ The address of stake token contract
78 * @param authorizedStakeAmount_ minimum stake amount in wei
79 * @param authorizedStakePeriod_ period in seconds needed to become authorized
80 */
81function initialize (
82 address stakeToken_,
83 uint256 authorizedStakeAmount_,
84 uint256 authorizedStakePeriod_
85) public virtual initializer {
86 __Ownable_init();
87 StakingDeposit.initialize(stakeToken_);
88 migrator = address(0);
89 authorizedStakeAmount = authorizedStakeAmount_;
90 authorizedStakePeriod = authorizedStakePeriod_;
91}

Recommendation:

We advise it to be safely omitted unless the implementation is meant to upgrade an existing AuthorizedStaking deployment.

Alleviation:

The contract's logic has been migrated to the StakingV2.sol contract and the redundant ininitialization is no longer present alleviating this exhibit.