Ondo Finance contest - lukris02's results

Institutional-Grade Finance. On-Chain. For Everyone.

General Information

Platform: Code4rena

Start Date: 11/01/2023

Pot Size: $60,500 USDC

Total HM: 6

Participants: 69

Period: 6 days

Judge: Trust

Total Solo HM: 2

Id: 204

League: ETH

Ondo Finance

Findings Distribution

Researcher Performance

Rank: 44/69

Findings: 1

Award: $36.24

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA Report for Ondo Finance contest

Overview

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

â„–TitleRisk RatingInstance Count
NC-1Order of FunctionsNon-Critical9
NC-2Order of LayoutNon-Critical13
NC-3TyposNon-Critical7
NC-4Unused named return variablesNon-Critical1
NC-5Missing and extra leading underscoresNon-Critical3
NC-6Missing NatSpecNon-Critical10

Non-Critical Risk Findings(6)

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

External functions should be placed before public:

External functions should be placed before private:

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

Events should be placed right after state variables:

Modifiers should be placed between events and functions:

Pragma directive should be placed before import directive:

NC-3. Typos

Instances

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 and extra leading underscores

Instances

Internal immutables should have a leading underscore:

Public constants - should not:

Recommendation

Add and remove leading underscores where needed.

NC-6. Missing NatSpec

Description

NatSpec is missing for 10 functions in 4 contracts.

Instances
Recommendation

Add NatSpec for all functions.

#0 - c4-judge

2023-01-23T13:43:57Z

trust1995 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