Description: The contract contains multiple functions marked as payable, allowing users to send native tokens to the contract during those function calls.
However, if a user accidentally sends native tokens to these functions, they get locked up in the contract's balance. Hence, subsequent transactions could snatch the excessive native tokens to be returned to the user.
The above function is marked payable to save on gas, but whenever native tokens are sent, they get locked up in the contract.
Recommendation: Consider removing the payable keyword from the above-mentioned function and other related functions to avoid this scenario (or) block snatching by not returning address(this).balance in native swaps.
Impact: Likelihood: VERY LOW + Impact: HIGH = Severity: LOW
Context: GenericSwapFacetV3.sol#L142
Description: The contract contains multiple functions marked as
payable,
allowing users to send native tokens to the contract during those function calls.However, if a user accidentally sends native tokens to these functions, they get locked up in the contract's balance. Hence, subsequent transactions could snatch the excessive native tokens to be returned to the user.
For example, consider the following function:
The above function is marked
payable
to save on gas, but whenever native tokens are sent, they get locked up in the contract.Recommendation: Consider removing the
payable
keyword from the above-mentioned function and other related functions to avoid this scenario (or) block snatching by not returningaddress(this).balance
in native swaps.Impact: Likelihood: VERY LOW + Impact: HIGH = Severity: LOW
LI.FI:
Researcher: