Timeswap contest - lukris02's results

Like Uniswap, but for lending & borrowing.

General Information

Platform: Code4rena

Start Date: 20/01/2023

Pot Size: $90,500 USDC

Total HM: 10

Participants: 59

Period: 7 days

Judge: Picodes

Total Solo HM: 4

Id: 206

League: ETH

Timeswap

Findings Distribution

Researcher Performance

Rank: 35/59

Findings: 1

Award: $65.35

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

65.3481 USDC - $65.35

Labels

bug
grade-b
QA (Quality Assurance)
Q-25

External Links

QA Report for Timeswap contest

Overview

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

â„–TitleRisk RatingInstance Count
NC-1Order of FunctionsNon-Critical4
NC-2Order of LayoutNon-Critical1
NC-3Missing leading underscoresNon-Critical5
NC-4Unused named return variablesNon-Critical11
NC-5Missing NatSpecNon-Critical23
NC-6TyposNon-Critical81
NC-7Maximum line length exceededNon-Critical112

Non-Critical Risk Findings(7)

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

constructor should be placed before private functions:

external function should be placed before public function:

private functions should be placed after external and public functions:

Recommendation

Reorder functions where possible.

NC-2. 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

State variables should be placed before constructor:

NC-3. Missing leading underscores

Description

Private state variables should have a leading underscore.

Instances
Recommendation

Add leading underscores.

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. Missing NatSpec

Description

NatSpec is missing for 23 functions in 7 contracts.

Instances
Recommendation

Add NatSpec for all functions.

NC-6. Typos

Instances

NC-7. Maximum line length exceeded

Description

According to Style Guide, maximum suggested line length is 120 characters. Longer lines make the code harder to read.

Instances
Recommendation

Make the lines shorter.

#0 - c4-judge

2023-02-01T23:46:57Z

Picodes 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