Omniscia Alliance Block Audit

StakeReceiverFeature Static Analysis Findings

StakeReceiverFeature Static Analysis Findings

SRF-01S: Variable Shadowing

Description:

The delegateStake function's stake argument shadows the stake function implementation of RewardsPoolBase.

Example:

contracts/pool-features/StakeReceiverFeature.sol
13function delegateStake(address staker, uint256 stake) virtual override public {
14 require(stake > 0, "delegateStake::No stake sent");
15 require(staker != address(0x0), "delegateStake::Invalid staker");
16 _stake(stake, staker, false);
17}

Recommendation:

We advise that the shadowing collission is alleviated by renaming the stake argument to _stake.

Alleviation:

The variable shadowing was left as is in the codebase as it is an instance of a function versus variable shadowing with inexistent impact.