Platform: Code4rena
Start Date: 08/11/2022
Pot Size: $60,500 USDC
Total HM: 6
Participants: 72
Period: 5 days
Judge: Picodes
Total Solo HM: 2
Id: 178
League: ETH
Rank: 30/72
Findings: 1
Award: $151.33
🌟 Selected for report: 0
🚀 Solo Findings: 0
151.3257 USDC - $151.33
It is possible that a user's ETH will be trapped inside the contracts.
https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/LooksRareAggregator.sol#L109 _returnETHIfAny(originator);
But in the implementation of the _returnETHIfAny() function, it will just silently return even the returning ETH transaction fails. As a result, even if the user fails to claims back his ETH, the transaction will succeed which will cause the user's ETH is trapped inside the contract and may be claimed by others later.
It is suggested to modify the implementation of the _returnETHIfAny() function to make it revert when the transaction fails. The modified version of the function is shown as follows:
function _returnETHIfAny(address recipient) internal { bool status = true;
assembly { if gt(selfbalance(), 0) { status := call(gas(), recipient, selfbalance(), 0, 0, 0, 0) } } if (!status) revert ETHTransferFail();
}
#0 - c4-judge
2022-11-21T10:56:11Z
Picodes marked the issue as duplicate of #241
#1 - c4-judge
2022-12-16T13:59:11Z
Picodes marked the issue as satisfactory