PassThroughWalletImpl passThroughTokens function is not checking for empty input
Summary
The passThroughTokens function in PassThroughWalletImpl.sol does not check for empty input, which could lead to unnecessary gas consumption and potential Denial of Service (DoS) attacks.
Vulnerability Detail
The passThroughTokens function in PassThroughWalletImpl.sol accepts an array of tokens as input but does not check if the input array is empty. If an empty array is provided, the function will still execute, consuming gas without performing any meaningful action.
Impact
This vulnerability could lead to unnecessary gas consumption and potential DoS attacks on the contract, impacting its availability and functionality.
Consider implementing a check for empty input arrays in the passThroughTokens function to prevent unnecessary gas consumption and potential DoS attacks. This could be achieved by adding a require statement to ensure that the input array is not empty.
moneyversed
medium
PassThroughWalletImpl passThroughTokens function is not checking for empty input
Summary
The passThroughTokens function in PassThroughWalletImpl.sol does not check for empty input, which could lead to unnecessary gas consumption and potential Denial of Service (DoS) attacks.
Vulnerability Detail
The passThroughTokens function in PassThroughWalletImpl.sol accepts an array of tokens as input but does not check if the input array is empty. If an empty array is provided, the function will still execute, consuming gas without performing any meaningful action.
Impact
This vulnerability could lead to unnecessary gas consumption and potential DoS attacks on the contract, impacting its availability and functionality.
Code Snippet
https://github.com/sherlock-audit/2023-04-splits/blob/main/splits-pass-through-wallet/src/PassThroughWalletImpl.sol#L120
Tool used
Manual Review
Recommendation
Consider implementing a check for empty input arrays in the
passThroughTokens
function to prevent unnecessary gas consumption and potential DoS attacks. This could be achieved by adding arequire
statement to ensure that the input array is not empty.