This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
0xDetermination - Protocol will be bricked on zkSync due to computePoolAddress()
calculation
#35
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
Sponsor Disputed
The sponsor disputed this issue's validity
Won't Fix
The sponsor confirmed this issue will not be fixed
0xDetermination
medium
Protocol will be bricked on zkSync due to
computePoolAddress()
calculationSummary
computePoolAddress()
bricks the protocol on zkSync.Vulnerability Detail
computePoolAddress()
works for all EVM-compatible L2s, but zkSync is not really EVM-compatible. It uses a different method to calculate contract addresses (https://docs.zksync.io/build/developer-reference/differences-with-ethereum.html#create-create2).Impact
Protocol won't function on zkSync.
Code Snippet
https://github.com/sherlock-audit/2024-02-leverage-contracts/blob/main/wagmi-leverage/contracts/abstract/ApproveSwapAndPay.sol#L251
Tool used
Manual Review
Recommendation
Refactor
computePoolAddress()
to be compatible with zkSync or create a different contract for zkSync.The text was updated successfully, but these errors were encountered: