Cally contest - Fitraldys'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: 87/100

Findings: 1

Award: $30.09

🌟 Selected for report: 0

🚀 Solo Findings: 0

  1. Use Custom Error instead of Revert String to Save Gas

Custom error from solidity 0.8.4 are cheaper than revert strings, custom error are defined using the error statement can use insideand outside the contract.

source https://blog.soliditylang.org/2021/04/21/custom-errors/

POC : https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L167 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L168 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L169 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L170 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L171 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L211 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L214 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L217 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L220 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L224 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L228 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L263 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L269 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L272 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L307 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L323 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L328 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L329 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L330 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L353 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L353 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L436 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L437 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L438 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L456 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L15 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L16 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L36 https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/CallyNft.sol#L42

i suggest replacing revert error strings with custom error.

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