Closed code423n4 closed 2 years ago
Funen
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L60 the floor price used to be read-only, so immutable can saving more gas
floor price
Manual Review
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L60
uint256 public floorPrice;
changed into
uint256 public immunable floorPrice;
We are using initialize method, immutable variables can only be set in constructor.
Sponsor is correct. This is invalid.
Handle
Funen
Vulnerability details
Proof of Concept
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L60 the
floor price
used to be read-only, so immutable can saving more gasTools Used
Manual Review
Recommended Mitigation Steps
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L60
uint256 public floorPrice;
changed into
uint256 public immunable floorPrice;