Art Gobblers contest - Sm4rty'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: 74/109

Findings: 1

Award: $55.20

🌟 Selected for report: 0

🚀 Solo Findings: 0

_safeMint() should be used rather than _mint() wherever possible

_mint() is discouraged in favor of _safeMint() which ensures that the recipient is either an EOA or implements IERC721Receiver. Both open OpenZeppelin and solmate have versions of this function so that NFTs aren’t lost if they’re minted to contracts that cannot transfer them back out.

Instances

src/Goo.sol:102: _mint(to, amount); src/ArtGobblers.sol:356: _mint(msg.sender, gobblerId); src/ArtGobblers.sol:389: _mint(msg.sender, gobblerId); src/ArtGobblers.sol:469: _mint(msg.sender, gobblerId); src/Pages.sol:211: _mint(msg.sender, pageId); src/Pages.sol:251: for (uint256 i = 0; i < numPages; i++) _mint(community, ++lastMintedPageId); lib/solmate/src/tokens/ERC721.sol:194: _mint(to, id); lib/solmate/src/tokens/ERC721.sol:209: _mint(to, id);

Recommendations:

Use _safeMint() instead of _mint().


Avoid using Floating Pragma:

Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Instances:

src/Goo.sol:2:pragma solidity >=0.8.0; src/utils/rand/ChainlinkV1RandProvider.sol:2:pragma solidity >=0.8.0; src/utils/GobblerReserve.sol:2:pragma solidity >=0.8.0; src/utils/token/GobblersERC721.sol:2:pragma solidity >=0.8.0; src/utils/token/GobblersERC1155B.sol:2:pragma solidity >=0.8.0; src/utils/token/PagesERC721.sol:2:pragma solidity >=0.8.0; src/ArtGobblers.sol:2:pragma solidity >=0.8.0; src/Pages.sol:2:pragma solidity >=0.8.0; script/deploy/DeployRinkeby.s.sol:2:pragma solidity >=0.8.0; script/deploy/DeployBase.s.sol:2:pragma solidity >=0.8.0; lib/goo-issuance/src/LibGOO.sol:2:pragma solidity >=0.8.0; lib/solmate/src/utils/LibString.sol:2:pragma solidity >=0.8.0; lib/solmate/src/utils/FixedPointMathLib.sol:2:pragma solidity >=0.8.0; lib/solmate/src/utils/SignedWadMath.sol:2:pragma solidity >=0.8.0; lib/solmate/src/utils/MerkleProofLib.sol:2:pragma solidity >=0.8.0; lib/solmate/src/auth/Owned.sol:2:pragma solidity >=0.8.0; lib/solmate/src/tokens/ERC721.sol:2:pragma solidity >=0.8.0; lib/VRGDAs/src/LogisticToLinearVRGDA.sol:2:pragma solidity >=0.8.0; lib/VRGDAs/src/LinearVRGDA.sol:2:pragma solidity >=0.8.0; lib/VRGDAs/src/VRGDA.sol:2:pragma solidity >=0.8.0; lib/VRGDAs/src/LogisticVRGDA.sol:2:pragma solidity >=0.8.0;

Recommend using fixed solidity version

References:

https://code4rena.com/reports/2022-04-phuture#g-20-use-a-more-recent-version-of-solidity


#0 - GalloDaSballo

2022-10-06T18:53:24Z

_safeMint() should be used rather than _mint() wherever possible 1L

Avoid using Floating Pragma: NC

Would 100% close with new rules

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