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

Unnecessary storage variables can be changed to immutable to save gas #200

Closed
code423n4 opened this issue Nov 15, 2021 · 0 comments
Closed
Labels
bug Something isn't working G (Gas Optimization) resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") StakingRewards

Comments

@code423n4
Copy link
Contributor

Handle

WatchPug

Vulnerability details

https://github.com/code-423n4/2021-11-vader/blob/429970427b4dc65e37808d7116b9de27e395ce0c/contracts/staking-rewards/StakingRewards.sol#L24-L25

Some storage variables include rewardsToken and stakingToken are unnecessary as they will never be changed.

Change to immutable can save gas.

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Nov 15, 2021
code423n4 added a commit that referenced this issue Nov 15, 2021
@0xstormtrooper 0xstormtrooper added StakingRewards sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels Nov 16, 2021
@0xstormtrooper 0xstormtrooper added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working G (Gas Optimization) resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") StakingRewards
Projects
None yet
Development

No branches or pull requests

3 participants