Sparkn

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

Missing contract-existence checks before low-level calls

Summary

[L-04] Missing contract-existence checks before low-level calls

Low-level calls return success if there is no code present at the specified address. In addition to the zero-address checks, add a check to verify that

.code.length > 0

file: /src/ProxyFactory.sol
250 (bool success,) = proxy.call(data);

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

file: /src/Distributor.sol
139 uint256 totalAmount = erc20.balanceOf(address(this));

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

Support

FAQs

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