Use Of transfer or send Instead Of call To Send Native Assets
[L-04] Use Of transfer or send Instead Of call To Send Native Assets
Severity
Impact: Low
Likelihood: Medium
Description
The use of transfer() in the contracts may have unintended outcomes on the native asset being sent to the receiver. The transaction will fail when:
The receiver address is a smart contract that does not implement a payable function.
The receiver address is a smart contract that implements a payable fallback function which uses more than 2300 gas units.
The receiver address is a smart contract that implements a payable fallback function that needs less than 2300 gas units but is called through proxy, raising the call's gas usage above 2300.
Additionally, using a gas value higher than 2300 might be mandatory for some multi-signature wallets.
Number Of Instances Found
1
Code Location
Click to show findings
```solidity
Path: ./perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol
166: payable(msg.sender).transfer(address(this).balance); // @audit-issue
```
*GitHub*: [166](https://github.com/sherlock-audit/2023-10-perennial/blob/main/./perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol#L166-L166)
kaancaglan
false
Use Of
transfer
orsend
Instead Ofcall
To Send Native Assets[L-04] Use Of
transfer
orsend
Instead Ofcall
To Send Native AssetsSeverity
Description
The use of
transfer()
in the contracts may have unintended outcomes on the native asset being sent to the receiver. The transaction will fail when:Number Of Instances Found
1
Code Location
Click to show findings
```solidity Path: ./perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol 166: payable(msg.sender).transfer(address(this).balance); // @audit-issue ``` *GitHub*: [166](https://github.com/sherlock-audit/2023-10-perennial/blob/main/./perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol#L166-L166)