Closed code423n4 closed 2 years ago
Don't believe any meaningful risk was shown, you'd want to avoid using encodePacked
to avoid hash-clashes, however none were demonstrated
This would be just syntactic sugar, don't think it's valid
The codebase always returns the named variable explicitly, which is done consistently. Hence the named return is used.
Given the specific context, I assume the code was re-written to avoid false positives from Slither (state change before "external calls". I believe the events are emitted properly, and consistently
Disagree per discussion on #67
I don't believe this to be valid, natspec is always optional
I think the judges were correct in marking this report invalid
NatSpec is optional, but if it is added, it's inconsistent to only list some of the params
@GalloDaSballo and the sponsor ended up making the change: https://github.com/ProjectOpenSea/seaport/blob/3b064ba270760eeda58f60d7d8dc7e14bd39bbaf/contracts/interfaces/ConduitControllerInterface.sol#L162
Still disagree but giving a valid NC
The bar for QA reports in this contest is at least 2 valid non-critical findings or at least one valid low risk finding. Per the comments above, this submission is below that bar -- closing as invalid.
Table of Contents:
abi.encodePacked()
should not be used with dynamic types when passing the result to a hash function such askeccak256()
0.8.12
to getstring.concat()
[L-01]
abi.encodePacked()
should not be used with dynamic types when passing the result to a hash function such askeccak256()
Same finding from other contests:
Use
abi.encode()
instead which will pad items to 32 bytes, which will prevent hash collisions (e.g.abi.encodePacked(0x123,0x456)
=>0x123456
=>abi.encodePacked(0x1,0x23456)
, butabi.encode(0x123,0x456)
=>0x0...1230...456
). If there is only one argument toabi.encodePacked()
it can often be cast tobytes()
orbytes32()
instead.[N-01] Use at least Solidity
0.8.12
to getstring.concat()
Use a solidity version of at least 0.8.12 to be able to use
string.concat()
instead ofabi.encodePacked()
:Additionally, consider using
string.concat()
instead ofabi.encodePacked()
here:[N-02] Unused named returns
While not consuming more gas with the Optimizer enabled: using both named returns and a return statement isn't necessary. Removing one of those can improve code clarity:
[N-03] It's better to emit after all processing is done
contracts/conduit/ConduitController.sol (1):
contracts/conduit/ConduitController.sol (2):
contracts/conduit/ConduitController.sol (3 & 4):
[N-04] Avoid floating pragmas: the version should be locked
[N-05] Missing NatSpec comments
The following comments are missing (see
@audit
tags):