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

modifier canAddLiquidity and function _canAddLiquidity #19

Open
code423n4 opened this issue Jun 22, 2021 · 1 comment
Open

modifier canAddLiquidity and function _canAddLiquidity #19

code423n4 opened this issue Jun 22, 2021 · 1 comment
Assignees

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

modifier canAddLiquidity calls internal function _canAddLiquidity. This function is not called anywhere else so I do not see a reason why all the logic can't be moved to the modifier to save some gas by reducing the extra call.

Recommended Mitigation Steps

Remove function _canAddLiquidity, place its logic directly in the canAddLiquidity modifier.

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Jun 22, 2021
code423n4 added a commit that referenced this issue Jun 22, 2021
@asselstine
Copy link
Collaborator

I believe our intention was to have an external function to check; so in fact the fix here would be to add the external function

canAddLiquidity

@kamescg kamescg self-assigned this Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants