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

'immutable' greatly reduces gas costs #99

Closed
code423n4 opened this issue Jun 23, 2021 · 3 comments
Closed

'immutable' greatly reduces gas costs #99

code423n4 opened this issue Jun 23, 2021 · 3 comments
Labels
0 (Non-critical) bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

There are variables that do not change so they can be marked as immutable to greatly improve the gas costs. Examples of such variables are:
contract ATokenYieldSource aToken, lendingPoolAddressesProviderRegistry.
contract IdleYieldSource idleToken, underlyingAsset.
contract YearnV2YieldSource vault, token.
contract ControlledToken controller.

Recommended Mitigation Steps

Mark such variables with the 'immutable' keyword.

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

See #7

@dmvt
Copy link
Collaborator

dmvt commented Jul 31, 2021

duplicate of #7

@dmvt
Copy link
Collaborator

dmvt commented Jul 31, 2021

Consolidating around the non-critical risk level in deference to the sponsor's choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants