zkSync v2 contest - pashov's results

Rely on math, not validators.

General Information

Platform: Code4rena

Start Date: 28/10/2022

Pot Size: $165,500 USDC

Total HM: 2

Participants: 24

Period: 12 days

Judge: GalloDaSballo

Total Solo HM: 1

Id: 177

League: ETH

zkSync

Findings Distribution

Researcher Performance

Rank: 16/24

Findings: 1

Award: $250.77

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: HE1M

Also found by: 0xSmartContract, Rolezn, Tomo, brgltd, cccz, chaduke, ctf_sec, datapunk, jayjonah8, ladboy233, pashov, rbserver

Labels

bug
QA (Quality Assurance)
grade-b
Q-11

Awards

250.7706 USDC - $250.77

External Links

L-01 Missing non-zero address checks in constructors

Almost all constructors in the code are missing non-zero value checks for their address arguments. Add such checks to all constructors.

L-02 Use latest Solidity version

Code primarily uses version ^0.8.0 so will work with solc 0.8.0. Always use latest Solidity version to get latest features and bugfixes.

L-03 Use concrete Solidity compiler version instead of a floating pragma

Code uses ^0.8.0 version. Using a floating pragma is discouraged and the best practice is considered to be to use a concrete Solidity version

********NC-01 Code has open TODOs

The code has open TODOs in multiple places. Fix all of them before deployment

NC-02 Non-descriptive or missing error messages

There are error messages in the code that are just "l" or "t" in the code. Also lots of require statements are just missing any error message. Add proper error messages in all require statements.

NC-03 Code has unused private constants

The constant VALUE_SIMULATOR_SYSTEM_CONTRACT_ADDRESS is defined in two places but is private and never read. Remove it.

NC-04 Misleading NatSpec

The doc in LERC20Bridge::finalizeDeposit says the following for the _l1Token param: The address of the token that was locked on the L1. Always should be equal to zero (conventional value) Second part is wrong (copy-pasted from the ETH bridge contract). Remove the should be equal to zero part

NC-5 NatSpec is missing doc for some function params

The NatSpec docs for L2ETHBridge::withdraw and DiamondInit::initialize and DiamondCut::executeDiamondCutProposal are missing docs for function parameters. Add the missing docs.

NC-6 Contract and filename are different

In Mailbox.sol we have a contract named MailboxFacet - use the same name in both places. ****************************************************************************************

#0 - GalloDaSballo

2022-11-24T01:39:02Z

L-01 Missing non-zero address checks in constructors

L

L-02 Use latest Solidity version

NC

L-03 Use concrete Solidity compiler version instead of a floating pragma

NC

NC-01 Code has open TODOs

NC

NC-02 Non-descriptive or missing error messages

NC

NC-03 Code has unused private constants

R

NC-04 Misleading NatSpec

NC

## NC-5 NatSpec is missing doc for some function params NC

NC-6 Contract and filename are different

NC

1L 1R 7NC

#1 - c4-judge

2022-12-03T19:09:13Z

GalloDaSballo marked the issue as grade-b

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter