Cally contest - delfin454000'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: 54/100

Findings: 2

Award: $84.99

🌟 Selected for report: 0

🚀 Solo Findings: 0

Issue: Require message is to long Explanation: The message below can be shortened to 32 characters or fewer (as shown) to save gas

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/lib/openzeppelin-contracts/contracts/access/Ownable.sol#L63

        require(newOwner != address(0), "Ownable: new owner is the zero address");

Change message to Ownable: new owner is 0 address

Issue: Should use != 0 instead of > 0 in a require statement if variable is an unsigned integer (uint) Explanation: != 0 should be used where possible since > 0 costs more gas

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L170

        require(durationDays > 0, "durationDays too small");

Change durationDays > 0 to durationDays != 0

Issue: Variables should not be initialized to their default values Explanation: Initializing uint variables to their default value of 0 is unnecessary and costs gas

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L94

    uint256 public feeRate = 0;

Recommendation:

    uint256 public feeRate;

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L95

    uint256 public protocolUnclaimedFees = 0;

Recommendation:

    uint256 public protocolUnclaimedFees;

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/src/Cally.sol#L282

        uint256 fee = 0;

Recommendation:

        uint256 fee;

https://github.com/code-423n4/2022-05-cally/blob/1849f9ee12434038aa80753266ce6a2f2b082c59/contracts/lib/openzeppelin-contracts/contracts/utils/Strings.sol#L45

        uint256 length = 0;

Recommendation:

        uint256 length;
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