StreamFactory can be unable to createStreams neither initialize them
Summary
If wrongly assigned streamImplementation to address(0), StreamFactory.sol won't be able to create or initialize Streams
Vulnerability Detail
If streamImplementation is set to 0x0 in the StreamFactory.sol contract, the createStream() function will revert when it is called. This is because the function would call a non existing function in target address and therefore will revert.
Additionally, if streamImplementation is set to 0x0, the StreamFactory.sol contract will not be able to initialize Stream contracts, as it will not be able to call the Stream contract's initialize() function that is called inside createStream.
Impact
Factory not able to createStreams neither initialize them. Force of redeploy / gas wasted on deployments.
Deivitto
medium
StreamFactory can be unable to createStreams neither initialize them
Summary
If wrongly assigned
streamImplementation
toaddress(0)
,StreamFactory.sol
won't be able to create or initializeStream
sVulnerability Detail
If
streamImplementation
is set to0x0
in theStreamFactory.sol
contract, thecreateStream()
function will revert when it is called. This is because the function would call a non existing function in target address and therefore will revert.Additionally, if streamImplementation is set to
0x0
, theStreamFactory.sol
contract will not be able to initialize Stream contracts, as it will not be able to call the Stream contract'sinitialize()
function that is called insidecreateStream
.Impact
Factory
not able tocreateStreams
neither initialize them. Force of redeploy / gas wasted on deployments.Code Snippet
https://github.com/sherlock-audit/2022-11-nounsdao/blob/main/src/StreamFactory.sol#L202-L207 https://github.com/sherlock-audit/2022-11-nounsdao/blob/main/src/StreamFactory.sol#L208 https://github.com/sherlock-audit/2022-11-nounsdao/blob/main/src/StreamFactory.sol#L268-L272
Tool used
Manual Review
Recommendation
Add a check for not assigning
address(0)
tostreamImplementation
in constructor