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

2 stars 0 forks source link

Gas savings #172

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

csanuragjain

Vulnerability details

Impact

Gas savings

Proof of Concept

  1. Navigate to contract https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/RocketJoeStaking.sol

  2. Observe that joe variable is meant to be declared only once and hence can be declared immutable

  3. In deposit function check if deposited amount>0 by adding require(_amount>0)

cryptofish7 commented 2 years ago

Duplicate of #62

dmvt commented 2 years ago

per #62, this contract is proxied so immutable can't be used.