Timeswap contest - Jujic's results

Like Uniswap, but for lending & borrowing.

General Information

Platform: Code4rena

Start Date: 04/01/2022

Pot Size: $75,000 USDC

Total HM: 17

Participants: 33

Period: 7 days

Judge: 0xean

Total Solo HM: 14

Id: 74

League: ETH

Timeswap

Findings Distribution

Researcher Performance

Rank: 22/33

Findings: 1

Award: $97.53

🌟 Selected for report: 1

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0x0x0x

Also found by: Dravee, Jujic, WatchPug, defsec, fatima_naz, rfa, ye0lde

Labels

bug
duplicate
G (Gas Optimization)

Awards

4.452 USDC - $4.45

External Links

Handle

Jujic

Vulnerability details

Impact

!= 0 is a cheaper operation compared to > 0, when dealing with uint.

Proof of Concept

https://github.com/code-423n4/2022-01-timeswap/blob/bf50d2a8bb93a5571f35f96bd74af54d9c92a210/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L369

if (assetIn > 0) Callback.pay(asset, assetIn, data);

Tools Used

Remix

#0 - amateur-dev

2022-01-14T11:10:39Z

Similar issue reported over here #172 ; hence closing this

Findings Information

🌟 Selected for report: Jujic

Labels

bug
G (Gas Optimization)
resolved
sponsor confirmed

Awards

93.0809 USDC - $93.08

External Links

Handle

Jujic

Vulnerability details

Impact

Here you could use unchecked{++i} to save gas since it is more efficient then i++.

for (uint256 i; i < ids.length; i++) {

Proof of Concept

https://github.com/code-423n4/2022-01-timeswap/blob/bf50d2a8bb93a5571f35f96bd74af54d9c92a210/Timeswap/Timeswap-V1-Core/contracts/TimeswapPair.sol#L359

Tools Used

Remix

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