Art Gobblers contest - csanuragjain's results

Experimental Decentralized Art Factory By Justin Roiland and Paradigm.

General Information

Platform: Code4rena

Start Date: 20/09/2022

Pot Size: $100,000 USDC

Total HM: 4

Participants: 109

Period: 7 days

Judge: GalloDaSballo

Id: 163

League: ETH

Art Gobblers

Findings Distribution

Researcher Performance

Rank: 28/109

Findings: 1

Award: $696.90

🌟 Selected for report: 0

🚀 Solo Findings: 0

Zero address check missing

Contract: https://github.com/code-423n4/2022-09-artgobblers/blob/main/src/utils/token/GobblersERC1155B.sol#L55

Issue: In ownerOf function, invalid id will result in returning zero address owner

Recommendation: Change it to require((owner = getGobblerData[id].owner) != address(0), "NOT_MINTED");


Approval check missing

Contract: https://github.com/code-423n4/2022-09-artgobblers/blob/main/src/utils/token/GobblersERC721.sol#L92

Issue: In approve function, approved user wont be allowed to call the approve function which is incorrect

Recommendation: Add getApproved[id]==msg.sender to the list of allowed user. Same goes for PagesERC721.sol

2 step owner change

Contract: https://github.com/transmissions11/solmate/blob/bff24e835192470ed38bf15dbed6084c2d723ace/src/auth/Owned.sol#L40

Issue: In setOwner function, an incorrectly passed argument address will be set as admin of contract which will prohibit all function calls which are admin only. This can impact GobblerReserve (withdraw function), ArtGobblers (upgradeRandProvider)

Recommendation: Kindly change this address change to a 2 step process (Pending admin, confirm admin) and also add checks for 0 address

#0 - GalloDaSballo

2022-10-06T19:09:50Z

Zero address check missing

L

Approval check missing

Disagree as it's consistent with Solmate, feel free to follow up https://github.com/transmissions11/solmate/blob/62e0943c013a66b2720255e2651450928f4eed7a/src/tokens/ERC721.sol#L66

2 step owner change

NC

1L 1NC

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