Platform: Code4rena
Start Date: 12/08/2022
Pot Size: $35,000 USDC
Total HM: 10
Participants: 126
Period: 3 days
Judge: Justin Goro
Total Solo HM: 3
Id: 154
League: ETH
Rank: 100/126
Findings: 1
Award: $29.89
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: oyc_109
Also found by: 0x1f8b, 0x52, 0xDjango, 0xLovesleep, 0xNazgul, 0xNineDec, 0xbepresent, 0xmatt, 0xsolstars, Aymen0909, Bahurum, Bnke0x0, CertoraInc, Chom, CodingNameKiki, DecorativePineapple, Deivitto, Dravee, ElKu, Funen, GalloDaSballo, IllIllI, JC, JohnSmith, Junnon, KIntern_NA, Lambda, LeoS, MiloTruck, Noah3o6, PaludoX0, RedOneN, Respx, ReyAdmirado, Rohan16, RoiEvenHaim, Rolezn, Ruhum, Sm4rty, TomJ, Vexjon, Waze, Yiko, __141345__, a12jmx, ajtra, ak1, apostle0x01, asutorufos, auditor0517, bin2chen, bobirichman, brgltd, bulej93, byndooa, c3phas, cRat1st0s, cryptphi, csanuragjain, d3e4, defsec, delfin454000, djxploit, durianSausage, ellahi, erictee, exd0tpy, fatherOfBlocks, gogo, jonatascm, ladboy233, medikko, mics, natzuu, neumo, p_crypt0, paribus, pfapostol, rbserver, reassor, ret2basic, robee, rokinot, rvierdiiev, sach1r0, saneryee, seyni, sikorico, simon135, sseefried, wagmi, wastewa
29.8923 USDC - $29.89
Consider replacing every require(msg.sender == owner, "Only owner")
by a modifier OnlyOwner
to improve readability.
140: require(msg.sender == owner, "Only owner");
147: require(msg.sender == owner, "Only owner");
154: require(msg.sender == owner, "Only owner");
162: require(msg.sender == owner, "Only owner");
Implementation contracts VotingEscrow.sol
and BlockList.sol
should not have a floating pragma to ensure code has been tested and deployed with the same version.
decimal
does not follow ERC20 standard and is unnecessarily harcoded to 18.In VotingEscrow.sol
, decimal
type is uint256
when it should be uint8
as set in the interface IERC20.sol.
66: uint256 public decimals = 18;
decimal
is also hardcoded to 18 while its value will change in the constructor anyway using decimals().
66: uint256 public decimals = 18;
115: decimals = IERC20(_token).decimals();