Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low

Functions calling contracts/addresses with transfer hooks are missing reentrancy guards

Summary

[L-05] Functions calling contracts/addresses with transfer hooks are missing reentrancy guards

Even if the function follows the best practice of check-effects-interaction, not using a reentrancy guard when there may be transfer hooks will open the users of this protocol up to read-only reentrancies with no way to protect against it, except by block-listing the whole protocol.

file: /src/Distributor.sol
164 token.safeTransfer(STADIUM_ADDRESS, token.balanceOf(address(this)));

https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L164

file: /src/Distributor.sol
147 erc20.safeTransfer(winners[i], amount);

https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L147

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.