Forgotten Runes Warrior Guild contest - Funen's results

16,000 Warrior NFTs sold in a phased Dutch Auction.

General Information

Platform: Code4rena

Start Date: 03/05/2022

Pot Size: $30,000 USDC

Total HM: 6

Participants: 93

Period: 3 days

Judge: gzeon

Id: 118

League: ETH

Forgotten Runes

Findings Distribution

Researcher Performance

Rank: 68/93

Findings: 2

Award: $45.73

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. MIT License doesn't used in any contract This particular said used MIT as license but no used in any contract, it can be changed by using "// SPDX-License-Identifier: MIT" in ForgottenRunesWarriorsGuild.sol and ForgottenRunesWarriorsMinter.sol

##Tool Used Manual Review

  1. Unnecessary Comment In This particular comment was notice * @notice I wouldn't if I were you , since this particular comment was unnecessary it can be deleted instead

##Tool Used Manual Review

#0 - liveactionllama

2022-05-10T17:18:13Z

Warden accidentally submitted this via the bunker.finance contest form originally at 18:58 UTC on 05/05/2022 (prior to the contest close for Forgotten Runes). They reached out via C4 help request to ask that this submission be moved over to the Forgotten Runes contest on their behalf.

  1. Title : another way for += 1 for saving more gas

This code can be changed by using increment postfix e.g numSold++; or it can be better by using prefix ++numSold

##Tool Used Manual Review, Remix

##Another Occurance 1. ForgottenRunesWarriorsGuild.sol#L104 2. ForgottenRunesWarriorsMinter.sol#L248

  1. Title : Using ++i than i++ for saving more gas

Using i++ instead ++i for all the loops, the variable i is incremented using i++. It is known that implementation by using ++i costs less gas per iteration than i++.

Tools Used

Manual Review, Remix

##Occurances

1. ForgottenRunesWarriorsMinter.sol#L162 2. ForgottenRunesWarriorsMinter.sol#L220 3. ForgottenRunesWarriorsMinter.sol#L162

  1. Title : Title : change uint256 i = 0 into uint i for saving more gas

using this implementation can saving more gas for each loops.

##Tool Used Manual Review & Remix

##Recommended Mitigation Change it

##Occurances

1. ForgottenRunesWarriorsMinter.sol#L162 2. ForgottenRunesWarriorsMinter.sol#L220 3. ForgottenRunesWarriorsMinter.sol#L162

  1. Saving gas by removing = 0

https://github.com/code-423n4/2022-05-runes/blob/060b4f82b79c8308fe65674a39a07c44fa586cd3/contracts/ForgottenRunesWarriorsGuild.sol#L2

If a variable was not set/initialized, it is assumed to have default value to 0 this implementation was used for saving more gas by removing = 0

##TOOLS USED Remix, Manual Review

##Mitigation Step Remove = 0

  1. Using short reason string can be used for saving more gas

Every reason string takes at least 32 bytes. Use short reason strings that fits in 32 bytes or it will become more expensive.

##Tool Used Manual Review

##Occurance :

main/contracts/ForgottenRunesWarriorsGuild.sol#L70 main/contracts/ForgottenRunesWarriorsGuild.sol#L116 main/contracts/ForgottenRunesWarriorsMinter.sol#L142 main/contracts/ForgottenRunesWarriorsMinter.sol#L212
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