Hunt prep
Before you test zkSync Era
What 42 disclosed reports say about zkSync Era: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 24 | 0 | – | – | $0 |
| Smart contracts lesson | 6 | 0 | – | – | $0 |
| Access control lesson | 5 | 0 | – | – | $0 |
| Crypto lesson | 4 | 0 | – | – | $0 |
| DoS lesson | 2 | 0 | – | – | $0 |
| Memory corruption lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Freezed Chain will never be unfreeze since StateTransitionManager::unfreezeChain is calling freezeDiamond instead of unfreezeDiamond
The unfreezeChain function should call unfreezeDiamond instead of freezeDiamond.
Disclosed
-
L2SharedBridge l1LegacyBridge is not set
The initialize function should assign l1LegacyBridge = _l1LegecyBridge in the ERA chain branch; the report does not state that this was fixed.
Disclosed
-
State transition manager is unable to force upgrade a deployed ST, which invalidates the designed safeguard for ‘urgent high risk situation’
Add a method in StateTransitionManager.sol that can call executeUpgrade() or upgradeChainFromVersion() on a local chain.
Disclosed
-
paymaster will refund spentOnPubdata to user
The fix should compute the pubdata cost before the post-transaction call and subtract it from the maximum refundable gas passed to the paymaster.
Disclosed
-
User might be able to double withdraw during migration
The report recommends adding a grace period during and after an upgrade where the legacy withdrawal status is always checked.
Disclosed
-
Discrepancy in ECRECOVER Precompile when Using Delegatecall
The delegateCall helper should detect the ECRECOVER precompile address and route that call through a raw static call instead of a raw delegate call.
Disclosed
-
Discrepancy in Default Account Behavior
The fallback function should be modified to ignore delegatecalls, for example by adding an `ignoreInDelegateCall` modifier.
Disclosed
-
Synchronization Issue Between L1 and L2 Upgrades
The L1 batch execution should check the result of the L2 upgrade transaction and reset the protocol version to the previous one if the upgrade failed, though a combined L1 and L2 upgrade complicates a simple rollback.
Disclosed
-
Nonce ordering of EOA can be updated to “arbitrary” through an L1 tx
The check should be done on the L1 side to prevent EOAs from calling updateNonceOrdering.
Disclosed
-
Unit difference between transaction encoding and bootloader memory constant
The constants should be multiplied by 32 when used in the calculation, or redefined to be in bytes from the start.
Disclosed
-
Operator can steal all gas provided by ANY user for L1→L2 transactions
The code should use safeAdd instead of add to prevent overflow.
Disclosed
-
Deployment Nonce Does not Increment For a Reverted Child Contract
A potential fix is to call the contract construction function externally inside a try/catch so a revert does not roll back the nonce, though the report notes other code would need review.
Disclosed
-
Mul/div relation should not be enforced when divisor is zero
The mul/div relation should not be enforced when the divisor is zero.
Disclosed
-
Timestamp Constraints Leading to Number of Blocks Creation Limitations
The recommended mitigation is to apply stricter timestamp constraints on L2 similar to those enforced on L1, preventing batches with timestamps set far in the future.
Disclosed
-
Nonce Behavior Discrepancy Between zkSync Era and EIP-161
The deployment nonce of a contract should be incremented by one before invoking its constructor, and this difference should be documented.
Disclosed