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: 74/100
Findings: 1
Award: $54.89
🌟 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.8914 USDC - $54.89
Line 211,304,320,353: Create a modifier to check vault type as best practice
Current code:
require(vaultId % 2 != 0, "Not vault type");
Suggestion:
modifier checkVault() public { require(vaultId % 2 != 0, "Not vault type"); _; }
Line 263,307,323,354(link to line/s): Create a modifier to check owner of vault/option as best practice
Current code: require(ownerOf(vaultId) != address(0), "Vault does not exist");
Suggestion:
modifier checkOwner(ownerId) public { require(ownerOf(ownerId) != address(0), "Vault/Option does not exist"); _; }