Cally contest - DavidGialdi's results

Earn yield on your NFTs or tokens via covered call vaults.

General Information

Platform: Code4rena

Start Date: 10/05/2022

Pot Size: $50,000 USDC

Total HM: 13

Participants: 100

Period: 5 days

Judge: HardlyDifficult

Total Solo HM: 1

Id: 122

League: ETH

Cally

Findings Distribution

Researcher Performance

Rank: 92/100

Findings: 1

Award: $30.09

🌟 Selected for report: 0

🚀 Solo Findings: 0

[G001]: Cache Array Length Outside of Loop

Instead of calculate the length in each iteration you can save the length in the variable to save gas.
for example you did it in: lline 244 : for (uint256 i = 0; i < data.length; i++) I recommend to do: **_length = data.length for (uint256 i = 0; i < _length; i++) **

Use ++ i instead of i++

++ i is one less opcode than i++ therefore take less gas. I recommend to replace all of them especially those in the loop.

Cancele the atuo check

from version 8+ the compilers add auto-tests to check over flow and underflow every time a mathematical operation is performed.

I would therefore recommend changing the loops

for (uint256 i;i < len;) { unchecked{++i;} } but it will make the loops less readable.

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