Omniscia Dapp Radar Audit

StakingRewardsProxy Static Analysis Findings

StakingRewardsProxy Static Analysis Findings

SRP-01S: Literal Equality of bool Variable

Description:

The linked bool comparison is performed between a variable and a bool literal.

Example:

contracts/StakingRewardsProxy.sol
114require(nonceRegistry[_nonce] == false, "This nonce was already processed");

Recommendation:

We advise the bool variable to be utilized directly either in its negated (!) or original form.

Alleviation:

The bool variable is now utilized directly instead of the comparison statement in its negated form as required.

SRP-02S: Redundant Variable Assignments

Description:

The linked variables are assigned to redundantly to the default value of each relevant data type (i.e. uint256 assigned to 0, address assigned to address(0) etc.).

Example:

contracts/StakingRewardsProxy.sol
22uint8 public paused = 0;

Recommendation:

We advise the assignments to be safely omitted optimizing the codebase.

Alleviation:

The redundant assignments have been omitted for the storage level instance and have been left as is for the local variables, however, we consider this an adequate resolution to the exhibit.