Platform: Code4rena
Start Date: 08/11/2022
Pot Size: $60,500 USDC
Total HM: 6
Participants: 72
Period: 5 days
Judge: Picodes
Total Solo HM: 2
Id: 178
League: ETH
Rank: 63/72
Findings: 1
Award: $36.34
๐ Selected for report: 0
๐ Solo Findings: 0
๐ Selected for report: RaymondFam
Also found by: 0x1f8b, 0x52, 0xSmartContract, 0xc0ffEE, 0xhacksmithh, 8olidity, Awesome, BClabs, Bnke0x0, Chom, Deivitto, Hashlock, IllIllI, Josiah, KingNFT, Nyx, R2, ReyAdmirado, Rolezn, SamGMK, Sathish9098, SinceJuly, V_B, Vadis, Waze, a12jmx, adriro, ajtra, aphak5010, bearonbike, bin, brgltd, carlitox477, carrotsmuggler, cccz, ch0bu, chaduke, datapunk, delfin454000, erictee, fatherOfBlocks, fs0c, horsefacts, jayphbee, ktg, ladboy233, pashov, perseverancesuccess, rbserver, ret2basic, tnevler, zaskoh
36.3434 USDC - $36.34
Usually, lines in source code are limited to 80 characters. Todayโs screens are much larger so itโs reasonable to stretch this in some cases. Since the files will most likely reside in GitHub, and GitHub starts using a scroll bar in all cases when the length is over 164 characters, the lines below should be split when they reach that length There are 2 instances of this issue:
Line 35: bytes32 zoneHash; // An arbitrary 32-byte value that will be supplied to the zone when fulfilling restricted orders that the zone can utilize when making a determination on whether to authorize the order Line 37: bytes32 conduitKey; // A bytes32 value that indicates what conduit, if any, should be utilized as a source for token approvals when performing transfers
Consider sticking to the proper spelling of words otherwise, it will decrease readability
There is 1 instance of this issue consider making the following changes:
Line 244: * number of items for offer and consideration along with as set of Line 245 * fulfillments allocating offer components to consideration
Change "as set of" to "a set of"
Line 244: * number of items for offer and consideration along with a set of Line 245 * fulfillments allocating offer components to consideration
block.timestamp
is unreliableUsing block.timestamp
as part of the time checks could be slightly modified by miners/validators to favor them in contracts that contain logic heavily dependent on them.
Consider this problem and warn users that a scenario like this could occur. If the change of timestamps will not affect the protocol in any way, consider documenting the reasoning and writing tests enforcing that these guarantees will be preserved even if the code changes in the future.
Here are 2 instances of this issue:
Line 70: if (block.timestamp < earliestOwnershipRenouncementTime) revert RenouncementTooEarly(); Line 114: earliestOwnershipRenouncementTime = block.timestamp + delay;
Avoid floating pragmas for non-library contracts.
While floating pragmas make sense for libraries to allow them to be included with multiple different versions of applications, it may be a security risk for application implementations.
A known vulnerable compiler version may accidentally be selected or security tools might fall-back to an older compiler version ending up checking a different EVM compilation that is ultimately deployed on the blockchain.
It is recommended to pin to a concrete compiler version.
For example: ๐คฆ Bad:
pragma solidity ^0.8.0;
๐ Good:
pragma solidity 0.8.4;
Here are 13 instances with this issue:
^0.8.0
^0.8.14
For more info:
#0 - Picodes
2022-11-21T19:33:17Z
Typo is valid
#1 - c4-judge
2022-11-21T19:33:20Z
Picodes marked the issue as grade-b
#2 - 0xhiroshi
2022-11-23T17:55:20Z
Addressed in other issues.
#3 - c4-sponsor
2022-11-23T17:55:25Z
0xhiroshi requested judge review