Nouns DAO contest - lukris02's results

A DAO-driven NFT project on Ethereum.

General Information

Platform: Code4rena

Start Date: 22/08/2022

Pot Size: $50,000 USDC

Total HM: 4

Participants: 160

Period: 5 days

Judge: gzeon

Total Solo HM: 2

Id: 155

League: ETH

Nouns DAO

Findings Distribution

Researcher Performance

Rank: 65/160

Findings: 2

Award: $52.11

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA Report for Nouns DAO contest

Overview

During the audit, 3 non-critical issues were found.

â„–TitleRisk RatingInstance Count
NC-1Order of FunctionsNon-Critical5+
NC-2Floating pragmaNon-Critical6
NC-3Scientific notationNon-Critical3

Non-Critical Risk Findings (3)

NC-1. Order of Functions

Description

fallback() and receive() functions are placed after internal functions. External functions are placed after public.

Instances
  • contracts/base/ERC721Checkpointable.sol: Line 151.
  • contracts/governance/NounsDAOProxy.sol: Line 130, Line 138.
  • contracts/governance/NounsDAOLogicV1.sol: Line 274 and more.
  • contracts/governance/NounsDAOLogicV2.sol: Line 285 and more.
Recommendation

According to Style Guide, ordering helps readers identify which functions they can call and to find the constructor and fallback definitions easier.
Functions should be grouped according to their visibility and ordered:

  • constructor
  • receive function (if exists)
  • fallback function (if exists)
  • external
  • public
  • internal
  • private

NC-2. Floating pragma

Description

Contracts should be deployed with the same compiler version. It 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
Recommendation

According to SWC-103, pragma version should be locked.

NC-3. Scientific notation

Description

For readability, it is better to use scientific notation.

Instances
Recommendation

Replace 10000 with 10e4.

Gas Optimizations Report for Nouns DAO contest

Overview

During the audit, 3 gas issues were found.

Gas Optimizations Findings (3)

G-1. Postfix increment

Description

Prefix increment cost less gas than postfix.

Instances
Recommendation

Use prefix increment where it is relevant .

G-2. <>.length in loops

Description

Reading the length of an array at each iteration of the loop consumes more gas.

Instances
Recommendation

Store the length of an array in a variable before the loop, and use it.

G-3. Initializing variables with default value

Description

It costs gas to initialize integer variables with 0 or bool variables with false but it is not necessary.

Instances
Recommendation

Remove initialization for default values.

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