Closed code423n4 closed 2 years ago
csanuragjain
Gas savings
Navigate to contract https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/RocketJoeStaking.sol
Observe that joe variable is meant to be declared only once and hence can be declared immutable
In deposit function check if deposited amount>0 by adding require(_amount>0)
Duplicate of #62
per #62, this contract is proxied so immutable can't be used.
Handle
csanuragjain
Vulnerability details
Impact
Gas savings
Proof of Concept
Navigate to contract https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/RocketJoeStaking.sol
Observe that joe variable is meant to be declared only once and hence can be declared immutable
In deposit function check if deposited amount>0 by adding require(_amount>0)