Omniscia Alliance Block Audit

StakeReceiverAutoStake Static Analysis Findings

StakeReceiverAutoStake Static Analysis Findings

SRA-01S: Variable Shadowing

Description:

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

Example:

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

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.