HardhatFoundry
30,000 USDC
View results
Submission Details
Severity: medium
Valid

`computeAccountAddress` may not work on all EVM chains

GitHub
https://github.com/Cyfrin/2024-07-biconomy/blob/9590f25cd63f7ad2c54feb618036984774f3879d/contracts/factory/K1ValidatorFactory.sol#L111

Summary

The computeAccountAddress function calculates the expected address of a Nexus contract using the factory's deterministic deployment algorithm. It derives the deployment address from the EVM create instruction and returns it.

However, some chains, such as ZkSync Era, have different address derivation methods for create and create2, leading to incorrect address calculations by this function.

Impact

The function may not work correctly on all EVM-compatible chains.

Recommendation

Consider storing the account address directly to ensure compatibility across different EVM chains.

Updates

Lead Judging Commences

0xnevi Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-zksync-create-create2-opcode

Valid medium, since there is non-functionality on zkSync (cannot create accounts) since it is stated as follows > Blockchains: > - Ethereum/Any EVM

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.