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
Rank: 55/100
Findings: 2
Award: $84.99
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: hubble
Also found by: 0x1337, 0x1f8b, 0x4non, 0xDjango, 0xf15ers, 0xsanson, 242, Aits, AlleyCat, Bludya, BondiPestControl, BouSalman, BowTiedWardens, CertoraInc, Cityscape, Czar102, FSchmoede, Funen, Hawkeye, IllIllI, JDeryl, Kenshin, Kumpa, MaratCerby, MiloTruck, Picodes, Ruhum, TrungOre, VAD37, WatchPug, Waze, antonttc, bobirichman, catchup, cccz, cryptphi, csanuragjain, delfin454000, dipp, dirk_y, djxploit, eccentricexit, ellahi, fatherOfBlocks, hake, hansfriese, hickuphh3, horsefacts, hyh, jah, joestakey, mics, minhquanym, pedroais, pmerkleplant, radoslav11, reassor, rfa, robee, seanamani, shenwilly, shung, sikorico, sorrynotsorry, sseefried, z3s
54.8976 USDC - $54.90
Low Risk Issues
Non-critical Issues
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"
It's more meaningful to use already declared variable "auctionStartTimestamp" Cally.sol#L233 Use "auctionStartTimestamp + AUCTION_DURATION" instead of "vault.currentExpiration + AUCTION_DURATION"
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
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x4non, 0xDjango, 0xNazgul, 0xf15ers, 0xkatana, 0xsanson, Bludya, BowTiedWardens, CertoraInc, Cityscape, DavidGialdi, FSchmoede, Fitraldys, Funen, Hawkeye, Kenshin, MadWookie, MaratCerby, MiloTruck, Picodes, RagePit, Tadashi, TerrierLover, TomFrenchBlockchain, VAD37, WatchPug, Waze, _Adam, antonttc, bobirichman, catchup, defsec, delfin454000, djxploit, ellahi, fatherOfBlocks, gzeon, hake, hansfriese, hickuphh3, horsefacts, ignacio, joestakey, jonatascm, mics, minhquanym, oyc_109, pmerkleplant, rfa, robee, rotcivegaf, samruna, shung, sikorico, simon135, z3s
30.091 USDC - $30.09
use != 0 instead of > 0 Cally.sol#L170 Cally.sol#L283
use ++i instead of i++, i+=1 CallyNft.sol#L244
use >=(<=) instead of >(<) if possible Cally.sol#L422
check require() at the beginning of function Cally.sol#L208 You can declare the vault after check 2 requires. So move #L208 to #L215.
no need to initialize variables with default values Cally.sol#L94 Cally.sol#L95 Cally.sol#L282 CallyNft.sol#L244
use "if(!flag)" instead of "if(flag == false)" Cally.sol#L217 Cally.sol#L220 Cally.sol#L328
usage of unchecked can reduce the gas cost Cally.sol#L188 Cally.sol#L245 Cally.sol#L333
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.