LooksRare Aggregator contest - Chom'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: 48/72

Findings: 1

Award: $36.34

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

If someone accidentally sends ERC20 / ETH to the LooksRareAggregator contract, the next user using the aggregator will be given these token

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

        if (tokenTransfersLength > 0) _returnERC20TokensIfAny(tokenTransfers, originator);
        _returnETHIfAny(originator);

These two lines will give the accidentally sent tokens and ETH to the next originator for free!

LooksRareAggregator may be used to sell NFTs / mass accept offers instead of buying them in the future. Expose a risk for a hacker to steal approved NFTs in case the governance key got compromised

If LooksRareAggregator is used to sell NFTs / mass accept offers, ERC721 or ERC1155 must be approved by the LooksRareAggregator contract.

Hackers may hack into the governance private key and whitelist a malicious contract to perform ERC721.transferFrom(victim, attacker, tokenId) on the delegated call

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

(bool success, bytes memory returnData) = singleTradeData.proxy.delegatecall(proxyCalldata);

#0 - c4-judge

2022-11-21T17:08:19Z

Picodes marked the issue as grade-b

#1 - 0xhiroshi

2022-11-24T18:25:13Z

If someone accidentally sends ERC20 / ETH to the LooksRareAggregator contract, the next user using the aggregator will be given these token - invalid, it's free for all LooksRareAggregator may be used to sell NFTs / mass accept offers instead of buying them in the future. Expose a risk for a hacker to steal approved NFTs in case the governance key got compromised - invalid, there is no code to sell NFT in this contract

#2 - c4-sponsor

2022-11-24T18:25:17Z

0xhiroshi marked the issue as sponsor disputed

#3 - Picodes

2022-12-11T22:20:16Z

The second one is valid to me has any allowance to LooksRareAggregator or ERC20EnabledLooksRareAggregator could be exploited by a malicious owner: you just need to addFunction.

#4 - 0xhiroshi

2022-12-12T08:26:05Z

@Picodes ERC20EnabledLooksRareAggregator has no owner, and if we want to add a function to sell NFTs, we will follow a similar architecture as ERC20EnabledLooksRareAggregator, which does not grant NFT approvals to LooksRareAggregator so even if LooksRareAggregator is compromised the attacker cannot transfer NFTs out of users' wallets.

#5 - Picodes

2022-12-12T08:53:38Z

You are right, my bad

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