code-423n4 / 2022-01-sherlock-findings

0 stars 0 forks source link

SherBuy: Redundant ZeroArgument check for _sherlockPosition #213

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

GreyArt

Vulnerability details

Impact

The stakingPeriods() is called on _sherlockPosition to validate that PERIOD is active. Hence, checking that _sherlockPosition is non-zero is redundant.

Recommended Mitigation Steps

Remove the check if (address(_sherlockPosition) == address(0)) revert ZeroArgument();

jack-the-pug commented 2 years ago

The error is not the same.