code-423n4 / 2021-06-pooltogether-findings

0 stars 0 forks source link

'immutable' greatly reduces gas costs #99

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

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.

asselstine commented 3 years ago

See https://github.com/code-423n4/2021-06-pooltogether-findings/issues/7

dmvt commented 3 years ago

duplicate of #7

dmvt commented 3 years ago

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