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: 109/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
It is best practice and also unnecessary to initialize variables in for loops as they get set to 0 by default in:
Contract: ArtGobblers.sol
line 432 line 592
Recommendation:
for (uint256 i; i < cost; ++i) { for (uint256 i; i < numGobblers; ++i) {
Contract: GobblersERC721.sol
line 186
Recommendation:
for (uint256 i; i < amount; ++i) {
Contract: Pages.sol
line 251
Recommendation:
for (uint256 i; i < numPages; i++) _mint(community, ++lastMintedPageId);
Contract: GobblerReserve.sol
line 37
Recommendation:
for (uint256 i; i < ids.length; i++) {
2.
It is best practice to always start a new statement/sentence in capital letters, in comments, unless it's a statement indication. This will also bring more consistency throughout all code under review.
Contract: ArtGobblers.sol
line 477
Recommendation:
/// @return Price of legendary gobbler, in terms of gobblers.
3.
It is best practice to use the safe library from OpenZeppelin to, in this case, make external transactions.
Contract: ArtGobblers.sol
line 748
Recommendation:
: ERC721(nft).safeTransferFrom(msg.sender, address(this), id);
Contract: GobblerReserve.sol
line 38
Recommendation:
artGobblers.safeTransferFrom(address(this), to, ids[i]);
4.
Missing variable value indication in:
Even though uint variables are uint256 by default, it is best practice to always still indicate the value in:
line 763
Recommendation:
uint256(toDaysWadUnsafe(block.timestamp - getUserData[user].lastTimestamp))
5.
Inconsistent spacing in comments:
Contract: SignedWadMath.sol
line 105
Recommendation:
// Evaluate using a (6, 7) - term rational approximation.
6.
Grammer issues in comments in:
Contract: ArtGobblers.sol
line 165 "non ledendary" should either be one word "nonlegendary" or hyphened "non-legendary" line 182 "have" should be "has" line 550 "moduloing" should be "modeling" line 573 "shuffle" should be "shuffles" line 678 "state" should be "states" line 719 "to feed" should be "feeds" line 819 "increase" should be "increased"
Contract: FixedPointMathLib.sol
line 212 "worst case" should be hyphened into "worst-case"
Contract: ERC721.sol
line 220 "which" should be "that"
Contract: DeployBase.s.sol
line 65 "who" should be "that"
Contract: Pages.sol
line 121 & 127 "18 decimal" should be hyphened "18-decimal"
Contract: ChainlinkV1RandProvider.sol
line 61 "by" should be "be"
Contract: LogisticToLinearVRGDA.sol
line 19, 23 & 27 "18 decimal" and "fixed point" should be "18-decimal" and "fixed-point" respectively line 58 the "a" before "number" should be "the"
Contract: Goo.sol
line 99 "to" should be "too"
Contract: LogisticVRGDA.sol
line 17 & 22 there is a counterintuitive "of tokens" here. The latter "of tokens" should be removed. line 19 & 29 "18 decimal" and "fixed point" should be "18-decimal" and "fixed-point" respectively line 24 "36 decimal" and "fixed point" should be "36-decimal" and "fixed-point" respectively line 57 the "for" is unnecessary
Contract: LibString.sol
line 11 "word aligned" should be hyphened "world-aligned"
Contract: VRGDA.sol
line 16 & 20 "18 decimal" and "fixed point" should be "18-decimal" and "fixed-point" respectively line 55 & 56 the "a" before "number" should be "the" line 56 the "for" is unnecessary
Contract: LibGOO.sol
line 15 the second "to" should be "too"
Contract: LogisticVRGDA.sol
line 17 & 22 there is a counterintuitive "of tokens" here. The latter "of tokens" should be removed. line 19 & 29 "18 decimal" and "fixed point" should be "18-decimal" and "fixed-point" respectively line 24 "36 decimal" and "fixed point" should be "36-decimal" and "fixed-point" respectively line 56 & 57 the "a" before "number" should be "the" line 57 the "for" is unnecessary
#0 - GalloDaSballo
2022-10-06T20:10:23Z
NC
NC
L
R
NC
NC
1L 1R 4NC