QuickSwap and StellaSwap contest - lukris02's results

A concentrated liquidity DEX with dynamic fees.

General Information

Platform: Code4rena

Start Date: 26/09/2022

Pot Size: $50,000 USDC

Total HM: 13

Participants: 113

Period: 5 days

Judge: 0xean

Total Solo HM: 6

Id: 166

League: ETH

QuickSwap and StellaSwap

Findings Distribution

Researcher Performance

Rank: 57/113

Findings: 2

Award: $76.06

🌟 Selected for report: 0

🚀 Solo Findings: 0

QA Report for QuickSwap and StellaSwap contest

Overview

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

â„–TitleRisk RatingInstance Count
NC-1Maximum line length exceededNon-Critical32
NC-2Order of FunctionsNon-Critical3

Non-Critical Risk Findings (2)

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

Reorder functions where possible.

Gas Optimizations Report for QuickSwap and StellaSwap contest

Overview

During the audit, 4 gas issues were found.

Gas Optimizations Findings (4)

G-1. Postfix increment and decrement

Description

Prefix increment and decrement cost less gas than postfix.

Instances
Recommendation

Consider using prefix increment and decrement where it is relevant.

G-2. <>.length in loops

Description

Reading the length of an array at each iteration of the loop consumes extra 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.
For example: for (uint256 i; i < array.length; ++i) {

G-4. x += y is more expensive than x = x + y

Instances
Recommendation

Use x = x + y instead of x += y. Use x = x - y instead of x -= y.

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