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

using memory pointer instead storage #86

Open
code423n4 opened this issue Nov 13, 2021 · 2 comments
Open

using memory pointer instead storage #86

code423n4 opened this issue Nov 13, 2021 · 2 comments
Labels

Comments

@code423n4
Copy link
Contributor

Handle

rfa

Vulnerability details

Impact

When referencing data, using memory is more expansive than using storage https://github.com/code-423n4/2021-11-vader/blob/main/contracts/tokens/vesting/LinearVesting.sol#L103,
this can happen because if you are referencing using a memory, it will copy the data to the memory, but in the storage pointer it will referencing the data directly from the storage.

Proof of Concept

https://github.com/code-423n4/2021-11-vader/blob/main/contracts/tokens/vesting/LinearVesting.sol#L103

Tools Used

Recommended Mitigation Steps

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

Duplicate of #85

@SamSteinGG SamSteinGG added the duplicate This issue or pull request already exists label Nov 25, 2021
@SamSteinGG SamSteinGG marked this as a duplicate of #85 Nov 25, 2021
@alcueca
Copy link
Collaborator

alcueca commented Dec 10, 2021

Not a duplicate, barely.

@alcueca alcueca removed the duplicate This issue or pull request already exists label Dec 10, 2021
@alcueca alcueca reopened this Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants