Timeswap contest - popular00'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: 48/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)
edited-by-warden
Q-30

External Links

QA Report

General Comments

  • Overall the codebase is well-written and intention is generally clear. Variable and function names are descriptive, the code appears to have been written with security issues like reentrancy, overflows, etc. in mind.
  • I would personally recommend against the practice of including extensive libraries in struct and enum files. Some files - e.g. v2-pool/src/structs/Param.sol, v2-pool/src/structs/Pool.sol, and /v2-option/src/enums/Transaction.sol - include both struct/enum declarations as well as a library for manipulation. These libraries may be better suited in the package's respective /libraries/ directory.
  • Tests are mostly lacking informational comments and still contain many commented-out lines of code. Tests are also largely positive tests to ensure functions work given correct conditions, rather than negative tests to ensure the protocol reverts when it is supposed to.

Low Severity #1 - Newly-created options/pools never pushed to getByIndex array in factories

The dynamic address[] array getByIndex in TimeswapV2OptionFactory.sol and TimeswapV2PoolFactory.sol is never pushed to when a new option/pool is created. This will result in the numberOfPairs() functions in the option/pool factories always returning 0. Note that TimeswapV2Option.sol has a separate numberOfPools() function that behaves as expected.

#0 - c4-judge

2023-02-02T11:34:49Z

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