ENS Contest - lukris02's results

Decentralised naming for web3

General Information

Platform: Code4rena

Start Date: 14/04/2023

Pot Size: $90,500 USDC

Total HM: 7

Participants: 59

Period: 14 days

Judge: LSDan

Total Solo HM: 3

Id: 232

League: ETH

ENS

Findings Distribution

Researcher Performance

Rank: 30/59

Findings: 1

Award: $59.79

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA Report for ENS contest

Overview

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

â„–TitleRisk RatingInstance Count
L-1Use the two-step-transfer of ownershipLow1
L-2Missing check for zero addressLow2
L-3Add more information in the eventsLow3
NC-1TyposNon-Critical3
NC-2Unused eventNon-Critical1
NC-3Order of LayoutNon-Critical5
NC-4Unused named return variablesNon-Critical8
NC-5Use mixedCase for state variables and SNAKE_CASE for constantsNon-Critical7
NC-6Visibility is not setNon-Critical11
NC-7Missing leading underscoresNon-Critical15
NC-8Natspec is incompleteNon-Critical5
NC-9Missing NatSpecNon-Critical31

Low Risk Findings(3)

L-1. Use the two-step-transfer of ownership

Description

If the owner accidentally transfers ownership to an incorrect address, protected functions may become permanently inaccessible.

Instances
Recommendation

Consider using a two-step-transfer of ownership: the current owner would nominate a new owner, and to become the new owner, the nominated account would have to approve the change, so that the address is proven to be valid.

L-2. Missing check for zero address

Description

If address(0x0) is set it may cause the contract to revert or work wrong.

Instances
Recommendation

Add checks.

L-3. Add more information in the events

Description

Some events are missing important information.

Instances

Non-Critical Risk Findings(9)

NC-1. Typos

Instances

NC-2. Unused event

Instances
Recommendation

Check if the event was meant to be used but forgotten. Consider deleting it if it is not needed.

NC-3. Order of Layout

Description

According to Order of Layout, inside each contract, library or interface, use the following order:

  1. Type declarations
  2. State variables
  3. Events
  4. Modifiers
  5. Functions
Instances

Modifiers should be placed before functions and constructor:

Constants should be placed before functions:

Recommendation

Place modifiers and all constants before constructor.

NC-4. Unused named return variables

Description

Both named return variable(s) and return statement are used.

Instances
Recommendation

To improve clarity use only named return variables.
For example, change:

function functionName() returns (uint id) { return x;

to

function functionName() returns (uint id) { id = x;

NC-5. Use mixedCase for state variables and SNAKE_CASE for constants

Description

According to Naming Conventions, state variables should use mixedCase (See), and constants should use SNAKE_CASE (See).

Instances

Use mixedCase:

Use SNAKE_CASE:

Recommendation

For example, change to: uint256 otherOffset

NC-6. Visibility is not set

Instances
Recommendation

It is better to specify visibility explicitly.

NC-7. Missing leading underscores

Description

Internal and private functions should have a leading underscore.

Instances
Recommendation

Add leading underscores where needed.

NC-8. Natspec is incomplete

Description

Not all function parameters are described in NatSpec.

Instances

NC-9. Missing NatSpec

Description

NatSpec is missing for 31 functions in 12 contracts:

Instances
Recommendation

Add NatSpec for all functions.

#0 - thereksfour

2023-05-02T03:38:42Z

L-2 NC-1 is valid

#1 - c4-judge

2023-05-09T10:40:22Z

dmvt marked the issue as grade-b

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