Open code423n4 opened 2 years ago
Tomio
Expensive gas
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L574
Remix
add unchecked to save gas
function getRJoeAmount(uint256 _avaxAmount) public view returns (uint256) { unchecked{ return _avaxAmount * rJoePerAvax; } }
Handle
Tomio
Vulnerability details
Impact
Expensive gas
Proof of Concept
https://github.com/code-423n4/2022-01-trader-joe/blob/main/contracts/LaunchEvent.sol#L574
Tools Used
Remix
Recommended Mitigation Steps
add unchecked to save gas