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

Unused function parameters #3

Open
code423n4 opened this issue Nov 18, 2021 · 1 comment
Open

Unused function parameters #3

code423n4 opened this issue Nov 18, 2021 · 1 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 sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

jayjonah8

Vulnerability details

Impact

The initializer2() function in UnlockDiscountTokenV2.sol has the __ERC20Permit_init_unsafe(name()); function call with name() passed in as a variable while the arg name() is never used.

Also in ERC20Patched.sol the function __ERC20Permit_init_unchained(name) has the name argument which is never used.

Proof of Concept

https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/UnlockDiscountTokenV2.sol#L29

https://github.com/code-423n4/2021-11-unlock/blob/main/smart-contracts/contracts/ERC20Patched.sol#L997

Tools Used

Manual code review

Recommended Mitigation Steps

All unused arguments should be removed

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Nov 18, 2021
code423n4 added a commit that referenced this issue Nov 18, 2021
@julien51 julien51 added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Jan 3, 2022
@julien51
Copy link
Collaborator

julien51 commented Jan 3, 2022

These changes were actually introduced by the OpenZeppelin team for us as a way to re-initialize the contracts...

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 sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

2 participants