LooksRare Aggregator contest - 0xc0ffEE'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: 27/72

Findings: 2

Award: $187.67

QA:
grade-b

🌟 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 https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/lowLevelCallers/LowLevelETH.sol#L43-L49

Vulnerability details

Impact

ETH is returned to originator at the end of function LooksRareAggregator#execute(...). However, this logic does not check for returned value from originator in case originator is a contract and reverts when receiving ether. The result is that the transaction succeeds but the ether is not returned to originator This issue could cause the originator's ether locked in LooksRareAggregator contract if originator is not aware of this and passing msg.value higher than needed

Proof of Concept

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

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

Tools Used

Manual review

Should check for returned value in function _returnETHIfAny. If it fails, revert the transaction or consider returning wrapped ether to originator

#0 - c4-judge

2022-11-21T08:47:01Z

Picodes marked the issue as duplicate of #241

#1 - c4-judge

2022-12-16T14:00:49Z

Picodes marked the issue as satisfactory

Lines of code

https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/TokenTransferrer.sol#L22 https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/proxies/LooksRareProxy.sol#L107-L134

Vulnerability details

Impact

After the order is executed, the maker ask token is transferred to recipient using IERC721.transferFrom(...). In case the recipient is a contract and is not aware of receiving ERC721 tokens, the tokens is locked in that contract forever.

Proof of Concept

https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/TokenTransferrer.sol#L22 https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/proxies/LooksRareProxy.sol#L107-L134

Tools Used

Manual review

Consider using IERC721.safeTransferFrom(...) instead

#0 - c4-judge

2022-11-21T08:43:44Z

Picodes marked the issue as duplicate of #174

#1 - c4-judge

2022-12-11T16:33:55Z

Picodes marked the issue as not a duplicate

#2 - c4-judge

2022-12-11T16:34:09Z

Picodes changed the severity to QA (Quality Assurance)

#3 - c4-judge

2022-12-11T16:34:23Z

Picodes marked the issue as grade-b

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