Cally contest - hansfriese'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: 55/100

Findings: 2

Award: $84.99

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low Risk Issues

  1. Wrong comment Cally.sol#L169 Error message must be "Reserve strike too big".

Non-critical Issues

  1. It would be good to modify some comments and error messages Cally.sol#L224 Change "Incorrect ETH amount sent" to "Insufficient ETH amount sent" because it will be accepted if user sends more ETH than required

Cally.sol#L361 Change "reset premiums" to "reset balance" or "reset premiums/strike"

Cally.sol#L367 Change "transfer premiums to owner" to "transfer balance to owner" or "transfer premiums/strike to owner"

  1. It's more meaningful to use already declared variable "auctionStartTimestamp" Cally.sol#L233 Use "auctionStartTimestamp + AUCTION_DURATION" instead of "vault.currentExpiration + AUCTION_DURATION"

  2. NatSpec incomplete Cally.sol#L124 @return Cally.sol#L158 @return Cally.sol#L207 @return Cally.sol#L360 @return Cally.sol#L387 @return Cally.sol#L431 @param Cally.sol#L455 @param, @return

  1. use != 0 instead of > 0 Cally.sol#L170 Cally.sol#L283

  2. use ++i instead of i++, i+=1 CallyNft.sol#L244

  3. use >=(<=) instead of >(<) if possible Cally.sol#L422

  4. check require() at the beginning of function Cally.sol#L208 You can declare the vault after check 2 requires. So move #L208 to #L215.

  5. no need to initialize variables with default values Cally.sol#L94 Cally.sol#L95 Cally.sol#L282 CallyNft.sol#L244

  6. use "if(!flag)" instead of "if(flag == false)" Cally.sol#L217 Cally.sol#L220 Cally.sol#L328

  7. usage of unchecked can reduce the gas cost Cally.sol#L188 Cally.sol#L245 Cally.sol#L333

  8. don't need to declare as memory to be used only once Cally.sol#L395-L396 You can write "return premiumOptions[_vaults[vaultId].premiumIndex];" instead of 2 lines.

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