JPEG'd contest - dirk_y's results

Bridging the gap between DeFi and NFTs.

General Information

Platform: Code4rena

Start Date: 07/04/2022

Pot Size: $100,000 USDC

Total HM: 20

Participants: 62

Period: 7 days

Judge: LSDan

Total Solo HM: 11

Id: 107

League: ETH

JPEG'd

Findings Distribution

Researcher Performance

Rank: 59/62

Findings: 1

Award: $80.65

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

80.65 USDC - $80.65

Labels

bug
G (Gas Optimization)
sponsor acknowledged

External Links

Gas Optimisations

Through my review of this repo I have found 1 instance where gas usage can be significantly reduced. In Controller.sol the setStrategy method here can be improved by reverting when setting the strategy for a token to the same strategy that is already active. This can be achieved by adding the following line to the start of that function:

require(strategies[_token] != _strategy, "Strategy already active")

By reverting early you are reducing unnecessary calls and gas usage in the case that a user with STRATEGIST_ROLE accidentally sets the strategy to the same strategy that is already active.

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