CALL() SHOULD BE USED INSTEAD OF TRANSFER() ON AN ADDRESS PAYABLE
The use of the deprecated transfer() function for an address will inevitably make the transaction fail when:
-The claimer smart contract does implement a payable fallback which uses more than 2300 gas unit.
-The claimer smart contract 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 and using higher than 2300 gas might be mandatory for some multisig wallets.
-The claimer smart contract does not implement a payable function.
Lines of code
https://github.com/Plex-Engineer/zeroswap/blob/03507a80322112f4f3c723fc68bed0f138702836/contracts/mocks/WETH9Mock.sol#L26 https://github.com/Plex-Engineer/zeroswap/blob/0fa049912bc14c27ba60efbada23fc1cc18b04e4/test/SushiToken.test.ts#L46 https://github.com/Plex-Engineer/zeroswap/blob/0fa049912bc14c27ba60efbada23fc1cc18b04e4/test/SushiMaker.test.ts#L52 https://github.com/Plex-Engineer/zeroswap/blob/0fa049912bc14c27ba60efbada23fc1cc18b04e4/contracts/SushiBar.sol#L49
Vulnerability details
Vulnerability details
CALL() SHOULD BE USED INSTEAD OF TRANSFER() ON AN ADDRESS PAYABLE
The use of the deprecated transfer() function for an address will inevitably make the transaction fail when:
-The claimer smart contract does implement a payable fallback which uses more than 2300 gas unit. -The claimer smart contract 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 and using higher than 2300 gas might be mandatory for some multisig wallets. -The claimer smart contract does not implement a payable function.