Platform: Code4rena
Start Date: 20/09/2022
Pot Size: $100,000 USDC
Total HM: 4
Participants: 109
Period: 7 days
Judge: GalloDaSballo
Id: 163
League: ETH
Rank: 65/109
Findings: 1
Award: $55.20
š Selected for report: 0
š Solo Findings: 0
š Selected for report: IllIllI
Also found by: 0x1f8b, 0x4non, 0x52, 0x5rings, 0xNazgul, 0xRobocop, 0xSmartContract, 0xdeadbeef, 0xsanson, 8olidity, Amithuddar, Aymen0909, B2, B353N, CertoraInc, Ch_301, Chom, CodingNameKiki, Deivitto, ElKu, Funen, JC, JohnnyTime, Kresh, Lambda, Noah3o6, RaymondFam, ReyAdmirado, RockingMiles, Rolezn, Sm4rty, SuldaanBeegsi, Tadashi, TomJ, Tomio, V_B, Waze, __141345__, a12jmx, ak1, arcoun, asutorufos, aviggiano, berndartmueller, bharg4v, bin2chen, brgltd, bulej93, c3phas, catchup, cccz, ch0bu, cryptonue, cryptphi, csanuragjain, delfin454000, devtooligan, djxploit, durianSausage, eighty, erictee, exd0tpy, fatherOfBlocks, giovannidisiena, hansfriese, ignacio, joestakey, ladboy233, lukris02, m9800, malinariy, martin, minhtrng, obront, oyc_109, pedr02b2, pedroais, pfapostol, philogy, prasantgupta52, rbserver, ronnyx2017, rotcivegaf, rvierdiiev, sach1r0, shung, simon135, throttle, tnevler, tonisives, wagmi, yixxas, zkhorse, zzykxx, zzzitron
55.1985 USDC - $55.20
L-N | Issue | Instances |
---|---|---|
[Lā01] | Missing zero address checks | 9 |
Total: 9 instances over 1 issues
N-N | Issue | Instances |
---|---|---|
[Nā01] | Use ++<VAR> and --<VAR> in all cases | 5 |
[Nā02] | Old mintStart timestamp | 11 |
Total: 16 instances over 2 issues
File: /src/utils/GobblerReserve.sol /*_artGobblers parameter*/ 23 constructor(ArtGobblers _artGobblers, address _owner) Owned(_owner) { /*_owner parameter*/ 23 constructor(ArtGobblers _artGobblers, address _owner) Owned(_owner) {
File: /src/Pages.sol 160 Goo _goo, 161 address _community, 162 ArtGobblers _artGobblers,
File: /src/utils/token/PagesERC721.sol 37 ArtGobblers _artGobblers,
File: /src/ArtGobblers.sol 292 Goo _goo, 293 Pages _pages, 294 address _team, 295 address _community, 296 RandProvider _randProvider,
++<VAR>
and --<VAR>
in all casesAlign the code to use ++<VAR>
and --<VAR>
instead of <VAR>++
and <VAR>--
File: /src/utils/GobblerReserve.sol 37 for (uint256 i = 0; i < ids.length; i++) {
File: /src/Pages.sol 251 for (uint256 i = 0; i < numPages; i++) _mint(community, ++lastMintedPageId);
File: /src/utils/token/PagesERC721.sol 115 _balanceOf[from]--; 117 _balanceOf[to]++; 181 _balanceOf[to]++;
mintStart
timestampThe timestamp 1656369768
it's the date Mon Jun 27 2022 22:42:48 GMT+0000
, was 3 months ago approx(my current timestamp it's 1664230384
)
I recommend pass the mintStart
as parameter of the constructor and make sure it will be greater than the current timestamp
Also can set inside the DeployRinkeby
contract like, uint256 public immutable mintStart = block.timestamp + <DELTA_TO_START>;
File: /script/deploy/DeployRinkeby.s.sol 11 uint256 public immutable mintStart = 1656369768;
#0 - GalloDaSballo
2022-10-06T19:36:47Z
1L from 0 check
Rest doesn't look pertinent
++ is a gas optimization Time of start can be in the past if the mint can start immediately
#1 - GalloDaSballo
2022-10-06T19:36:49Z
1L