Closed code423n4 closed 2 years ago
saian
Variable PRECISION is set once in constructor and not updated later, it can be changed to immutable to save gas.
https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/RocketJoeStaking.sol#L70
Manual Analysis
Change variable to immutable
Duplicate of #239
Per sponsor, this is invalid because the contract in question is proxied.
Handle
saian
Vulnerability details
Impact
Variable PRECISION is set once in constructor and not updated later, it can be changed to immutable to save gas.
Proof of Concept
https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/RocketJoeStaking.sol#L70
Tools Used
Manual Analysis
Recommended Mitigation Steps
Change variable to immutable