code-423n4 / 2022-10-paladin-findings

2 stars 0 forks source link

QA Report #231

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

QA Report for Paladin - Warden Pledges contest

Overview

During the audit, 1 low and 5 non-critical issues were found.

Title Risk Rating Instance Count
L-1 Missing check for zero address Low 3
NC-1 Misleading function name Non-Critical 1
NC-2 Order of Functions Non-Critical 2
NC-3 Spaces between the control structures Non-Critical 65
NC-4 Maximum line length exceeded Non-Critical 3
NC-5 Typos Non-Critical 14

Low Risk Findings (1)

L-1. 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.

Non-Critical Risk Findings (5)

NC-1. Misleading function name

Instances
Recommendation

Consider changing the name to pledgesLength() or pledgesAmount().

#

NC-2. Order of Functions

Description

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: 1) constructor 2) receive function (if exists) 3) fallback function (if exists) 4) external 5) public 6) internal 7) private

Instances

Internal function should be after external:

Public function should be after external:

Recommendation

Reorder functions where possible.

#

NC-3. Spaces between the control structures

Description

According to Style Guide, there should be a single space between the control structures if, while, and for and the parenthetic block representing the conditional.

Instances
Recommendation

Change:

if(...) 

to:

if (...) 

#

NC-4. Maximum line length exceeded

Description

Some lines of code are too long.

Instances
Recommendation

According to Style Guide, maximum suggested line length is 120 characters.
Make the lines shorter.

#

NC-5. Typos

Instances
c4-judge commented 2 years ago

kirk-baird marked the issue as grade-b