Platform: Code4rena
Start Date: 02/10/2023
Pot Size: $1,100,000 USDC
Total HM: 28
Participants: 64
Period: 21 days
Judge: GalloDaSballo
Total Solo HM: 13
Id: 292
League: ETH
Rank: 41/64
Findings: 1
Award: $656.33
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: zero-idea
Also found by: 0x1337, 0xTheC0der, 0xstochasticparrot, Audittens, HE1M, Jeiwan, erebus, gumgumzum, leviticus1129, lsaudit, quarkslab, rvierdiiev
656.3255 USDC - $656.33
CURRENT_MAX_PRECOMPILE_ADDRESS
is meant to return the current maximum deployed precompile address. The NatSpec states that there is currently only two precompiles deployed ecrecover and sha256. Looking at CURRENT_MAX_PRECOMPILE_ADDRESS
it's returning the address of SHA256_SYSTEM_CONTRACT
converted to uint256
which is 2.
Taking a look at keccak256
it's clear that this is a precompile. Doing some additional exploring into the era-test-node address_map.json
we can see that keccak256 is again stated as a precompile and give us its address. Following that address via zksync block explorer we can see that keccak256 is deployed to mainnet. Meaning that CURRENT_MAX_PRECOMPILE_ADDRESS
is not correctly updated for to account for Keccak256 precompile.
Manual review
Consider updated CURRENT_MAX_PRECOMPILE_ADDRESS
to a value that properly reflect the correct current maximum deployed precompile address.
Other
#0 - c4-pre-sort
2023-10-31T07:11:05Z
bytes032 marked the issue as low quality report
#1 - miladpiri
2023-11-08T15:05:36Z
Duplicate.
#2 - c4-judge
2023-11-26T18:18:49Z
GalloDaSballo marked the issue as duplicate of #888
#3 - c4-judge
2023-11-28T15:58:45Z
GalloDaSballo marked the issue as satisfactory