code-423n4 / 2023-03-zksync-findings

6 stars 1 forks source link

QA Report #199

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

See the markdown file with the details of this report here.

GalloDaSballo commented 1 year ago

1. CONDUCT address(0) CHECKS FOR THE PROTOCOL CRITICAL ADDRESSES

Am thinking we want to allow transfer to 0 just like ETH does Invalid

2. EXPRESSIONS SHOULD USE IMMUTABLE INSTEAD OF CONSTANTS

Disputed

3. INCONSISTENCY IN THE CONDITIONANL CHECKS BETWEEN block.number and _block PARAMETER PASSED IN

I think the check is fine

if _block > block.number we return 0 If it's smaller or equal we check if it's within 256 blocks

4. require() / revert() STATEMENTS SHOULD HAVE DESCRIPTIVE REASON STRINGS

NC

5. USE openzeppelin safeCast.sol LIBRARY TO PERFORM DOWNCASTING SAFELY

Disputing as address is capped at u160

6. recoveredAddress != address(0) REDUNDANT CHECK IS PERFORMED.

R

7. USE NAMED IMPORTS INSTEAD OF PLAIN `IMPORT ‘FILE.SOL’

NC

8. NON-LIBRARY/INTERFACE FILES SHOULD USE FIXED COMPILER VERSIONS, NOT FLOATING ONES

NC

9. PROPER COMMENTING WILL INCREASE THE READABILITY AND AUDITABILITY OF THE CODE.

NC

1R 4 NC

c4-judge commented 1 year ago

GalloDaSballo marked the issue as grade-c