Open code423n4 opened 2 years ago
pants
These state variables can be immutables since they are only set once, at the constructor:
immutable
MetaVault.sol
token3CRV
tokenYAX
Reading from immutable state variables is much cheaper than from regular state variables.
https://blog.soliditylang.org/2020/05/13/immutable-keyword/
Manual code review.
Define these state variables as immutables.
Marking this as a valid issue. MetaVault.sol may or may not be used as the chosen vault within the YaxisVaultAdapter.sol contract which is an in-scope contract.
YaxisVaultAdapter.sol
Handle
pants
Vulnerability details
Vulnerability details
These state variables can be
immutable
s since they are only set once, at the constructor:MetaVault.sol
line 32:token3CRV
MetaVault.sol
line 33:tokenYAX
Impact
Reading from immutable state variables is much cheaper than from regular state variables.
Proof of Concept
https://blog.soliditylang.org/2020/05/13/immutable-keyword/
Tool Used
Manual code review.
Recommended Mitigation Steps
Define these state variables as
immutable
s.