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: 54/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.8914 USDC - $54.89
Typos
// Core SVG utilitiy library which helps us construct
Change utilitiy
to utility
// vaultId's should always be odd
Change vaultId's
to a vaultId
or vaultIds
// Inspired by OraclizeAPI's implementation - MIT licence
Change licence
to License
🌟 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.0974 USDC - $30.10
Issue: Require
message is to long
Explanation: The message below can be shortened to 32 characters or fewer (as shown) to save gas
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
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
uint256 public feeRate = 0;
Recommendation:
uint256 public feeRate;
uint256 public protocolUnclaimedFees = 0;
Recommendation:
uint256 public protocolUnclaimedFees;
uint256 fee = 0;
Recommendation:
uint256 fee;
uint256 length = 0;
Recommendation:
uint256 length;