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

decodeDataAndRequire() can be declared pure #85

Closed
code423n4 opened this issue Nov 16, 2021 · 1 comment
Closed

decodeDataAndRequire() can be declared pure #85

code423n4 opened this issue Nov 16, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

palina

Vulnerability details

Impact

OperatorHelpers::decodeDataAndRequire(bytes memory _data, address _inputToken, address _outputToken) does not read or modify the storage and can, therefore, be declared pure.

Proof of Concept

https://github.com/code-423n4/2021-11-nested/blob/5d113967cdf7c9ee29802e1ecb176c656386fe9b/contracts/libraries/OperatorHelpers.sol#L49

Tools Used

Manual Analysis

Recommended Mitigation Steps

Consider adding pure modifier to the function signature.

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Nov 16, 2021
code423n4 added a commit that referenced this issue Nov 16, 2021
@maximebrugel maximebrugel added the duplicate This issue or pull request already exists label Nov 16, 2021
@maximebrugel
Copy link
Collaborator

Duplicated : #48

@alcueca alcueca added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed G (Gas Optimization) labels Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants