Closed sherlock-admin2 closed 9 months ago
bareli
medium
There is wrong implementation of K as it in the comment it is shown it should be greater than 0. but we have implemented that it can be 0.
k should be greater than 0 and less than 1018 as it is shown in the comment. require(k <= 1018); K = k;
here K can be less than 0;
https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSP.sol#L58 require(k <= 10**18);
Manual Review
require(k > 0 && k<= 10**36);
Duplicate of #76
bareli
medium
Wrong implementation:K should be greater than 0.
Summary
There is wrong implementation of K as it in the comment it is shown it should be greater than 0. but we have implemented that it can be 0.
Vulnerability Detail
k should be greater than 0 and less than 1018 as it is shown in the comment. require(k <= 1018); K = k;
here K can be less than 0;
Impact
Code Snippet
https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSP.sol#L58 require(k <= 10**18);
Tool used
Manual Review
Recommendation
require(k > 0 && k<= 10**36);
Duplicate of #76