Open code423n4 opened 2 years ago
pedroais
Save gas
The cheaper operation should be done first to save gas . auctionStart == 0 is cheaper than block.timestamp < auctionStart https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/LaunchEvent.sol#L291
Fix: https://github.com/traderjoe-xyz/rocket-joe/pull/148
Handle
pedroais
Vulnerability details
Impact
Save gas
Proof of Concept
The cheaper operation should be done first to save gas . auctionStart == 0 is cheaper than block.timestamp < auctionStart https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/LaunchEvent.sol#L291