In MultiInvoker.sol::invoke transfer will not be compatible with some wallets
Summary
The transfer function used in invoke won't be compatible with multi-Sig wallets & smart contract wallets.
Vulnerability Detail
In the last line of the invoke we can see remaining balance of contract is being sent to msg.sender with transfer, this is a concern because some wallets like a multi-sig wallet use more than 2300 gas so transfer wont work on those wallets leading to a revert
Impact
the transfer will revert whenever sending to any wallet that consumes more than 2300 gas
Code Snippet
function invoke(Invocation[] calldata invocations) external payable {
...
// Eth must not remain in this contract at rest
@--> payable(msg.sender).transfer(address(this).balance);
}
Tool used
Manual Review
Recommendation
Another method that takes into consideration all the types of wallet should be used.
4b
medium
In
MultiInvoker.sol::invoke
transfer will not be compatible with some walletsSummary
The transfer function used in
invoke
won't be compatible with multi-Sig wallets & smart contract wallets.Vulnerability Detail
In the last line of the
invoke
we can see remaining balance of contract is being sent tomsg.sender
withtransfer
, this is a concern because some wallets like a multi-sig wallet use more than 2300 gas so transfer wont work on those wallets leading to a revertImpact
the transfer will revert whenever sending to any wallet that consumes more than 2300 gas
Code Snippet
Tool used
Manual Review
Recommendation
Another method that takes into consideration all the types of wallet should be used.
Duplicate of #7