In the contract GSPFunding.sol , ThenonReentrant keyword is used Without any proper imports from openzepplin or modifier,
Vulnerability Detail
In the GSPFunding contract thebuyShares function as well assellShares function havenonReentrant modifier but neither the openzepplin reentrency guard is not imported nor a nonReentrant modifier is written in the contract.
Invalid, reentrancy implemented by GSPStorage.solhere inherited by GSPVault.sol which is inturn inherited by GSPFunding.sol. Same case for GSPTrader.sol
0xBhumii
medium
Unclear Reentrency implementation
Summary
In the contract
GSPFunding.sol
, ThenonReentrant
keyword is used Without any proper imports from openzepplin or modifier,Vulnerability Detail
In the
GSPFunding
contract thebuyShares function
as well assellShares function
havenonReentrant
modifier but neither the openzepplin reentrency guard is not imported nor a nonReentrant modifier is written in the contract.Impact
Loss/Sealing of funds due to Reentrecny attacks
Code Snippet
https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSPFunding.sol#L33
also here https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSPFunding.sol#L99
Tool used
Manual Review
Recommendation
Use openzepplin ReentrancyGuard to protect from reentrency attacks .