LooksRare Aggregator contest - corerouter's results

An NFT aggregator protocol.

General Information

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

LooksRare

Findings Distribution

Researcher Performance

Rank: 30/72

Findings: 1

Award: $151.33

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
2 (Med Risk)
satisfactory
duplicate-241

Awards

151.3257 USDC - $151.33

External Links

Lines of code

https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/LooksRareAggregator.sol#L109

Vulnerability details

Impact

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.

Proof of Concept

https://github.com/code-423n4/2022-11-looksrare/blob/main/contracts/lowLevelCallers/LowLevelETH.sol#L43-L49

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter