The batchTransferOutAndCallV5 function is used for batch processing of _transferOutAndCallV5 calls. However, due to the implementation of _transferOutAndCallV5 not supporting batch calls for ETH, batch processing of batchTransferOutAndCallV5 with ETH may fail.
Lines of code
https://github.com/code-423n4/2024-06-thorchain/blob/e3fd3c75ff994dce50d6eb66eb290d467bd494f5/chain/ethereum/contracts/THORChain_Router.sol#L397
Vulnerability details
Impact
The batchTransferOutAndCallV5 function is used for batch processing of _transferOutAndCallV5 calls. However, due to the implementation of _transferOutAndCallV5 not supporting batch calls for ETH, batch processing of batchTransferOutAndCallV5 with ETH may fail.
Proof of Concept
If the asset is ETH, _transferOutAndCallV5 will pass in the entire msg.value to target.This may result in insufficient ETH for payment in the following ETH processing github:https://github.com/code-423n4/2024-06-thorchain/blob/e3fd3c75ff994dce50d6eb66eb290d467bd494f5/chain/ethereum/contracts/THORChain_Router.sol#L310
Tools Used
Manual audit
Recommended Mitigation Steps
Assessed type
ETH-Transfer