Cally contest - Tadashi'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: 91/100

Findings: 1

Award: $30.09

🌟 Selected for report: 0

🚀 Solo Findings: 0

Use static arrays instead of a dynamic array

Details: The dynamic arrays in L89-L92 of Cally.sol can be replaced by static arrays, that is,

// prettier-ignore
uint256[17] public premiumOptions = [0.01 ether, 0.025 ether, 0.05 ether, 0.075 ether, 0.1 ether, 0.25 ether, 0.5 ether, 0.75 ether, 1.0 ether, 2.5 ether, 5.0 ether, 7.5 ether, 10 ether, 25 ether, 50 ether, 75 ether, 100 ether];
// prettier-ignore
uint256[19] public strikeOptions = [1 ether, 2 ether, 3 ether, 5 ether, 8 ether, 13 ether, 21 ether, 34 ether, 55 ether, 89 ether, 144 ether, 233 ether, 377 ether, 610 ether, 987 ether, 1597 ether, 2584 ether, 4181 ether, 6765 ether];

⛽ Gas economy:

  • Deployment cost: 5431682 → 5377353
  • Deployment size: 23522 → 23466

Return zero in balanceOf function

Details: L37 of CallyNFT.sol can be replaced by

return 0;

⛽ Gas economy:

  • Deployment cost: 5431682 → 5431482
  • Deployment size: 23522 → 23521
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