Art Gobblers contest - delfin454000'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: 63/109

Findings: 1

Award: $55.20

🌟 Selected for report: 0

🚀 Solo Findings: 0

Missing @param statement


ArtGobblers.sol: L278-300

    /// @notice Sets VRGDA parameters, mint config, relevant addresses, and URIs.
    /// @param _merkleRoot Merkle root of mint mintlist.
    /// @param _mintStart Timestamp for the start of the VRGDA mint.
    /// @param _goo Address of the Goo contract.
    /// @param _team Address of the team reserve.
    /// @param _community Address of the community reserve.
    /// @param _randProvider Address of the randomness provider.
    /// @param _baseUri Base URI for revealed gobblers.
    /// @param _unrevealedUri URI for unrevealed gobblers.
    constructor(
        // Mint config:
        bytes32 _merkleRoot,
        uint256 _mintStart,
        // Addresses:
        Goo _goo,
        Pages _pages,
        address _team,
        address _community,
        RandProvider _randProvider,
        // URIs:
        string memory _baseUri,
        string memory _unrevealedUri
    )

@param statement is missing for _pages



Long single line comments

In theory, comments over 79 characters should wrap using multi-line comment syntax. Even if somewhat longer comments are acceptable and a scroll bar is provided, very long comments can interfere with readability. Most of the long comments in Art Gobblers are very informative and do wrap. However their readability could be improved by the indentation of the second and any subsequent lines. Below are five examples of lines that may or may not already wrap, but in any case could benefit from indentation:


ArtGobblers.sol: L474-476

    /// @notice Calculate the legendary gobbler price in terms of gobblers, according to a linear decay function.
    /// @dev The price of a legendary gobbler decays as gobblers are minted. The first legendary auction begins when
    /// 1 LEGENDARY_AUCTION_INTERVAL worth of gobblers are minted, and the price decays linearly while the next interval of
    /// gobblers are minted. Every time an additional interval is minted, a new auction begins until all legendaries have been sold.

Suggestion:

    /// @notice Calculate the legendary gobbler price in terms of gobblers, 
    ///   according to a linear decay function.
    /// @dev The price of a legendary gobbler decays as gobblers are minted. 
    ///   The first legendary auction begins when 1 LEGENDARY_AUCTION_INTERVAL 
    ///   worth of gobblers are minted, and the price decays linearly while the
    ///   next interval of gobblers are minted. Every time an additional interval
    ///   is minted, a new auction begins until all legendaries have been sold.

ArtGobblers.sol: L485-486

            // The number of gobblers minted at the start of the auction is computed by multiplying the # of
            // intervals that must pass before the next auction begins by the number of gobblers in each interval.

Suggestion:

            // The number of gobblers minted at the start of the auction 
            //   is computed by multiplying the # of intervals that must pass before
            //   the next auction begins by the number of gobblers in each interval.

ArtGobblers.sol: L489

            // If not enough gobblers have been minted to start the auction yet, return how many need to be minted.

Suggestion:

            // If not enough gobblers have been minted to start the auction yet, 
            //   return how many need to be minted.

GobblersERC1155B.sol: L6

/// @notice ERC1155B implementation optimized for ArtGobblers by using the ownerOf storage slot to store attribute data.

Suggestion:

/// @notice ERC1155B implementation optimized for ArtGobblers by using 
///   the ownerOf storage slot to store attribute data.

LibGOO.sol: L13-16

    /// @notice Compute goo balance based on emission multiple, last balance, and time elapsed.
    /// @param emissionMultiple The multiple on emissions to consider when computing the balance.
    /// @param lastBalanceWad The last checkpointed balance to apply the emission multiple over time to, scaled by 1e18.
    /// @param timeElapsedWad The time elapsed since the last checkpoint, scaled by 1e18.

Suggestion:

    /// @notice Compute goo balance based on emission multiple, 
    ///   last balance, and time elapsed.
    /// @param emissionMultiple The multiple on emissions to consider 
    ///   when computing the balance.
    /// @param lastBalanceWad The last checkpointed balance to apply the
    ///   emission multiple over time to, scaled by 1e18.
    /// @param timeElapsedWad The time elapsed since the last checkpoint, 
    ///   scaled by 1e18.


Indications of unfinished work or open items should be addressed

Language referring to open items should be addressed and modified or removed. Below are two instances:


ArtGobblers.sol: L378-381

        // price, either from virtual balance or ERC20 balance.
        useVirtualBalance
            ? updateUserGooBalance(msg.sender, currentPrice, GooBalanceUpdateType.DECREASE)
            : goo.burnForGobblers(msg.sender, currentPrice);

ArtGobblers.sol: L746-748

        isERC1155
            ? ERC1155(nft).safeTransferFrom(msg.sender, address(this), id, 1, "")
            : ERC721(nft).transferFrom(msg.sender, address(this), id);


#0 - GalloDaSballo

2022-10-06T19:10:37Z

2 NC

This report looks good but has no substance, I would close it with the new rules

#1 - GalloDaSballo

2022-10-19T21:43:34Z

Because the presentation looks good, and because I set the bar at 5 exclusively for this first contest with new rules, am saving this one.

I will close similar "low substance" submissions in the future

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