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: 61/126
Findings: 2
Award: $45.04
🌟 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
30.066 USDC - $30.07
File : VotingEscrow.sol VotingEscrow.sol#L120 VotingEscrow.sol#L121 VotingEscrow.sol#L141 VotingEscrow.sol#L148 VotingEscrow.sol#L155
The constructor takes as input the owner’s address. As a result, in case of wrong declared address, there is a risk that the ownership is lost at the contract creation. If possible, consider using msg.sender to declare the owner.
File : VotingEscrow.sol VotingEscrow.sol#L101
File : VotingEscrow.sol VotingEscrow.sol#L116 VotingEscrow.sol#L298 VotingEscrow.sol#L309
The current owner calls transferOwnership() and decide to transfer the ownership directly to any desired address. As a result, there is a risk that the ownership is transferred to an invalid address causing the contract to be without owner.
File : VotingEscrow.sol VotingEscrow.sol#L139
Use a solidity version of at least 0.8.4 to get custom errors, which are cheaper at deployment than revert()/require() strings Use a solidity version of at least 0.8.10 to have external calls skip contract existence checks if the external call has a return value
File : VotingEscrow.sol VotingEscrow.sol#L48 VotingEscrow.sol#L51 VotingEscrow.sol#L675
File : VotingEscrow.sol VotingEscrow.sol#L57 VotingEscrow.sol#L58
🌟 Selected for report: IllIllI
Also found by: 0x040, 0x1f8b, 0xDjango, 0xHarry, 0xLovesleep, 0xNazgul, 0xNineDec, 0xSmartContract, 0xackermann, 0xbepresent, 2997ms, Amithuddar, Aymen0909, Bnke0x0, CRYP70, CertoraInc, Chom, CodingNameKiki, Deivitto, Dravee, ElKu, Fitraldys, Funen, GalloDaSballo, JC, JohnSmith, Junnon, LeoS, Metatron, MiloTruck, Noah3o6, NoamYakov, PaludoX0, RedOneN, Respx, ReyAdmirado, Rohan16, Rolezn, Ruhum, Sm4rty, SooYa, SpaceCake, TomJ, Tomio, Waze, Yiko, __141345__, a12jmx, ajtra, ak1, apostle0x01, asutorufos, bobirichman, brgltd, bulej93, c3phas, cRat1st0s, carlitox477, chrisdior4, csanuragjain, d3e4, defsec, delfin454000, djxploit, durianSausage, ellahi, erictee, fatherOfBlocks, gerdusx, gogo, ignacio, jag, ladboy233, m_Rassska, medikko, mics, natzuu, newfork01, oyc_109, paribus, pfapostol, rbserver, reassor, ret2basic, robee, rokinot, rvierdiiev, sach1r0, saian, sashik_eth, sikorico, simon135
14.9678 USDC - $14.97
EVM operates on a 32bytes basis. If an element is smaller than 32bytes, the EVM has to perform an operation in order to get the desired size. As a result, defining elements smaller than 32bytes might result in higher gas cost. It is better to work with 256 bits and downcast where needed.
File : VotingEscrow.sol VotingEscrow.sol#L70 VotingEscrow.sol#L71 VotingEscrow.sol#L76 VotingEscrow.sol#L78
File : VotingEscrow.sol VotingEscrow.sol#L116 VotingEscrow.sol#L127 VotingEscrow.sol#L412 VotingEscrow.sol#L413 VotingEscrow.sol#L414 VotingEscrow.sol#L415 VotingEscrow.sol#L416 VotingEscrow.sol#L425 VotingEscrow.sol#L448:L470 VotingEscrow.sol#L502:L504 VotingEscrow.sol#L511 VotingEscrow.sol#L529:L531 VotingEscrow.sol#L563:L565 VotingEscrow.sol#L587:L589
File : VotingEscrow.sol Check : require(msg.sender == owner, « Only owner ») is observed 4 times VotingEscrow.sol#L140 VotingEscrow.sol#L147 VotingEscrow.sol#L154 VotingEscrow.sol#L162 VotingEscrow.sol#L171
File : VotingEscrow.sol VotingEscrow.sol: 46 VotingEscrow.sol: 47 VotingEscrow.sol: 48
File : VotingEscrow.sol VotingEscrow.sol#L229 VotingEscrow.sol#L230 VotingEscrow.sol#L298 VotingEscrow.sol#L309 VotingEscrow.sol#L313 VotingEscrow.sol#L717 VotingEscrow.sol#L834
File : VotingEscrow.sol VotingEscrow.sol#L242 -> _oldLocked.end - block.timestamp cannot underflow giver condition at line 236 VotingEscrow.sol#L250 -> _newLocked.end - block.timestamp cannot underflow giver condition at line 244
File : VotingEscrow.sol VotingEscrow.sol#L309 VotingEscrow.sol#L717 VotingEscrow.sol#L834
File : VotingEscrow.sol VotingEscrow.sol#L309 VotingEscrow.sol#L717 VotingEscrow.sol#L834
Use a solidity version of at least 0.8.4 to get custom errors, which are cheaper at deployment than revert()/require() strings Use a solidity version of at least 0.8.10 to have external calls skip contract existence checks if the external call has a return value