proveBatches()
will revert on EVM mainnet
#543
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
low quality report
This report is of especially low quality
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-zksync/blob/1fb4649b612fac7b4ee613df6f6b7d921ddd6b0d/code/contracts/ethereum/contracts/zksync/facets/Executor.sol#L351
Vulnerability details
Impact
Function
proveBatches()
won't correctly work on EVM mainnet, due to assertion at line 351.This would prevent functioning upon deployment of system causing the need of redeployment, thus it should qualify as an issue with Medium severity since its a sort of DoS.
Code4rena Severity Categorization
In the current scenario,
proveBatches()
will revert on EVM mainnet. The protocol will be broken down, sinceproveBatches()
won't be functioning on the EVM mainnet.Proof of Concept
On Ethereum Mainnet, the
black.chainid
returns 1.This implies, that below line of code will revert, making the whole
proveBatches()
not working as intendant.File: ethereum/contracts/zksync/facets/Executor.sol
Whenever contract will be deployed on Ethereum Mainnet -
proveBatches()
will revert.Tools Used
Manual code review
Recommended Mitigation Steps
Get rid of any code which was created for testing/development environment, before deploying contract to the EVM Mainnet.
Line
assert(block.chainid != 1);
should be removed.Assessed type
DoS
The text was updated successfully, but these errors were encountered: