code-423n4 / 2022-01-trader-joe-findings

2 stars 0 forks source link

Gas Optimization: Variables that could be set constant #293

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

gzeon

Vulnerability details

Impact

Some variables could be set immutable to save gas, e.g. https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/RocketJoeStaking.sol#L39

    uint256 private PRECISION;

can be set as constant 1e18

cryptofish7 commented 2 years ago

Duplicate of #239

dmvt commented 2 years ago

Per sponsor, this is invalid because the contract in question is proxied.