Nested Finance contest - asutorufos's results

The one-stop Defi app to build, manage and monetize your portfolio.

General Information

Platform: Code4rena

Start Date: 15/06/2022

Pot Size: $35,000 USDC

Total HM: 1

Participants: 36

Period: 3 days

Judge: Jack the Pug

Total Solo HM: 1

Id: 137

League: ETH

Nested Finance

Findings Distribution

Researcher Performance

Rank: 36/36

Findings: 1

Award: $34.72

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

34.7201 USDC - $34.72

Labels

bug
G (Gas Optimization)
valid

External Links

G-1 Don't Initialize Variables with Default Values Unititialized variables are assigned with the type default. When you initializing a variable with its default value cost unnecasary gas. OperatorResolver.sol L#40 OperatorResolver.sol L#60 OperatorResolver.sol L#75 NestedFactory.sol L#124 NestedFactory.sol L#136 [NestedFactory.sol L#196]https://github.com/code-423n4/2022-06-nested/blob/main/contracts/NestedFactory.sol#:~:text=_msgSender()%2C%20_originalTokenId)%3B-,for%20(uint256%20i%20%3D%200%3B%20i%20%3C%20batchedOrdersLength%3B%20i%2B%2B)%20%7B,-(uint256%20fees NestedFactory.sol L#256 [NestedFactory.sol L#315]https://github.com/code-423n4/2022-06-nested/blob/main/contracts/NestedFactory.sol#:~:text=NF%3A%20RESERVE_MISMATCH%22)%3B-,for%20(uint256%20i%20%3D%200%3B%20i%20%3C%20batchedOrdersLength%3B%20i%2B%2B)%20%7B,-(uint256%20fees [NestedFactory.sol L#333]https://github.com/code-423n4/2022-06-nested/blob/main/contracts/NestedFactory.sol#:~:text=NF%3A%20RESERVE_MISMATCH%22)%3B-,for%20(uint256%20i%20%3D%200%3B%20i%20%3C%20batchedOrdersLength%3B%20i%2B%2B)%20%7B,-(uint256%20feesAmount

G-2 Unnecessary checked arithmetic in for loops Usually there is no risk that the loop counter can overflow. Using Solidity unchecked block saves the overflow checks. By using unchecked { ++i } OperatorResolver.sol L#40 OperatorResolver.sol L#75 [NestedFactory.sol L#196]https://github.com/code-423n4/2022-06-nested/blob/main/contracts/NestedFactory.sol#:~:text=_msgSender()%2C%20_originalTokenId)%3B-,for%20(uint256%20i%20%3D%200%3B%20i%20%3C%20batchedOrdersLength%3B%20i%2B%2B)%20%7B,-(uint256%20fees NestedFactory.sol L#256

#0 - Yashiru

2022-06-24T15:39:24Z

G-1 Don't Initialize Variables with Default Values (Duplicated)

Duplicated of #2 at For loop optimizaion

G-2 Unnecessary checked arithmetic in for loops (Duplicated)

Duplicated of #2 at For loop optimizaion

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