Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constructor should guard against zero addresses #20

Open
code423n4 opened this issue Dec 1, 2021 · 2 comments
Open

constructor should guard against zero addresses #20

code423n4 opened this issue Dec 1, 2021 · 2 comments
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)

Comments

@code423n4
Copy link
Contributor

Handle

jayjonah8

Vulnerability details

Impact

The constructor in LockeERC20.sol does not check to make sure the depositToken is not a zero address. This can help guard against costly mistakes during deployment.

Proof of Concept

https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/LockeERC20.sol#L56

Tools Used

Manual code review

Recommended Mitigation Steps

require(depositToken != address(0)) should be added to the constructor in LockeERC20.sol

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Dec 1, 2021
code423n4 added a commit that referenced this issue Dec 1, 2021
@brockelmore
Copy link
Collaborator

I guess this is an okay suggestion but likely should be a gas optimization not a bug report

@brockelmore brockelmore added the disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) label Dec 2, 2021
@0xean
Copy link
Collaborator

0xean commented Jan 16, 2022

Marking down to low-risk

@0xean 0xean added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
Projects
None yet
Development

No branches or pull requests

3 participants