Platform: Code4rena
Start Date: 08/09/2023
Pot Size: $70,000 USDC
Total HM: 8
Participants: 84
Period: 6 days
Judge: gzeon
Total Solo HM: 2
Id: 285
League: ETH
Rank: 65/84
Findings: 1
Award: $12.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: castle_chain
Also found by: 0xAadi, 0xHelium, 0xLook, 0xblackskull, 0xfuje, 0xmystery, 0xnev, 0xpiken, 7ashraf, BARW, Bauchibred, Bughunter101, Ch_301, JP_Courses, Kaysoft, Krace, MohammedRizwan, SanketKogekar, Sathish9098, alexzoid, ast3ros, btk, catellatech, degensec, fatherOfBlocks, grearlake, imtybik, jkoppel, jolah1, klau5, lsaudit, m_Rassska, merlin, mrudenko, nobody2018, rokinot, rvierdiiev, sandy
12.7917 USDC - $12.79
src/Escrow.sol
src/Root.sol
src/admins/PauseAdmin.sol
src/admins/DelayedAdmin.sol
src/token/Tranche.sol
src/token/RestrictionManager.sol
src/util/Factory.sol
L30/75 - Root variable is immutable and the constructor does not validate that it is an address other than 0x. This should be validated so as not to enter incorrect states and render the contract unusable.
L94 - abi.encodePacked() should not be used with dynamic types when passing the result to a hash function such as keccak256() Use abi.encode() instead which will pad items to 32 bytes, which will prevent hash collisions (e.g. abi.encodePacked(0x123,0x456) => 0x123456 => abi.encodePacked(0x1,0x23456), but abi.encode(0x123,0x456) => 0x0...1230...456). “Unless there is a compelling reason, abi.encode should be preferred”. If there is only one argument to abi.encodePacked() it can often be cast to bytes() or bytes32() instead. If all arguments are strings and or bytes, bytes.concat() should be used instead.
src/gateway/routers/axelar/Router.sol
src/LiquidityPool.sol
src/InvestmentManager.sol
src/gateway/Gateway.sol
L99 - Root variable is immutable and the constructor does not validate that it is an address other than 0x. This should be validated so as not to enter incorrect states and render the contract unusable.
L285 - The handle function has 81 lines of code and many conditionals, this reduces the understanding of the code. It would be beneficial for the users' understanding of this contract to have auxiliary functions with names that represent them.
src/token/ERC20.sol
src/PoolManager.sol
#0 - c4-pre-sort
2023-09-17T00:50:42Z
raymondfam marked the issue as sufficient quality report
#1 - c4-judge
2023-09-26T17:54:59Z
gzeon-c4 marked the issue as grade-b