Description: The function _swapAndCompleteBridgeTokens executes a destination chain swap post-stargate bridging. This function is invoked through the lzCompose call from the Layerzero endpoint.
This function has a parameter called reserveRecoverGas, which is always passed as true in all possible paths. Hence, the function could be simplified by removing the parameter to optimize gas.
Recommendation: Consider removing the unused parameter from the function.
Context: ReceiverStargateV2.sol#L147
Description: The function
_swapAndCompleteBridgeTokens
executes a destination chain swap post-stargate bridging. This function is invoked through thelzCompose
call from the Layerzero endpoint.This function has a parameter called
reserveRecoverGas,
which is always passed astrue
in all possible paths. Hence, the function could be simplified by removing the parameter to optimize gas.Recommendation: Consider removing the unused parameter from the function.
LI.FI:
Researcher: