At YearnVaultAdapter.sol, we have vault, admin and decimals and at YaxisVaultAdapter.sol, we have vault and admin as global variables. They are set at constructor and never changed again. Therefore, it saves gas by making them immutable. It also increases code readibilty, since immutable variables are guaranteed to be constant after constructor.
Handle
0x0x0x
Vulnerability details
Proof of Concept
At
YearnVaultAdapter.sol
, we havevault
,admin
anddecimals
and atYaxisVaultAdapter.sol
, we havevault
andadmin
as global variables. They are set at constructor and never changed again. Therefore, it saves gas by making them immutable. It also increases code readibilty, since immutable variables are guaranteed to be constant after constructor.Tools Used
Manual analysis