Some sanity checks are missing and can lead to unexpected scenarios
Vulnerability Details
Numerical user inputs and external call returns that are subject to thresholds due to the contract's logic should be checked for sanity to avoid undesirable behavior or reverts in later logic and wasting unnecessary gas in the process.
Impact
Missing sanity checks can lead to wrong an unexpected behaviors or even sending value to address(0).
Tools Used
Manual Review
Recommendations
Add the sanity checks for the values for implementation and for input values of distribute
Missing sanity checks can lead to wrong scenarios
Severity
Low Risk
Relevant GitHub Links
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L92
https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Proxy.sol#L45
Summary
Some sanity checks are missing and can lead to unexpected scenarios
Vulnerability Details
Numerical user inputs and external call returns that are subject to thresholds due to the contract's logic should be checked for sanity to avoid undesirable behavior or reverts in later logic and wasting unnecessary gas in the process.
Impact
Missing sanity checks can lead to wrong an unexpected behaviors or even sending value to
address(0)
.Tools Used
Manual Review
Recommendations
Add the sanity checks for the values for
implementation
and for input values ofdistribute