- High: 0
- Medium: 2
- Low: 0
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.
The function may not work correctly on all EVM-compatible chains.
Consider storing the account address directly to ensure compatibility across different EVM chains.
EIP-7579 clearly states that smart accounts MUST implement ERC-165. This includes returning false for any interface function that reverts instead of implementing the functionality. However, Nexus.sol
does not implement ERC-165, making it non-compliant with EIP-7579.
The lack of ERC-165 implementation in Nexus.sol
results in non-compliance with EIP-7579. This non-compliance can lead to interoperability issues with other smart contracts & modules expecting ERC-165 support.
Implement ERC-165 in Nexus.sol
as recommended in the standard. This involves adding the supportsInterface
function to check for supported interfaces & ensuring it returns false
for unsupported interfaces.