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

2 stars 0 forks source link

Functions can be external #262

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

sirhashalot

Vulnerability details

Impact

The withdrawAVAX() function of LaunchEvent.sol and initialize() function of RocketJoeStaking.sol can be declared external for gas savings

Proof of Concept

Recommended Mitigation Steps

Declare functions as external instead of public when possible

cryptofish7 commented 2 years ago

Fix: https://github.com/traderjoe-xyz/rocket-joe/pull/130/files