Cyfrin / 2023-08-sparkn

Other
11 stars 15 forks source link

Missing sanity checks can lead to wrong scenarios #918

Closed codehawks-bot closed 1 year ago

codehawks-bot commented 1 year ago

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 of distribute

PatrickAlphaC commented 1 year ago

Vague. Not sure what checks you're referring to.