Connext Amarok contest - asutorufos's results

The interoperability protocol of L2 Ethereum.

General Information

Platform: Code4rena

Start Date: 08/06/2022

Pot Size: $115,000 USDC

Total HM: 26

Participants: 72

Period: 11 days

Judge: leastwood

Total Solo HM: 14

Id: 132

League: ETH

Connext

Findings Distribution

Researcher Performance

Rank: 44/72

Findings: 2

Award: $226.77

🌟 Selected for report: 0

🚀 Solo Findings: 0

N-1 CRITICAL CHANGES SHOULD USE TWO-STEP PROCEDURE Critical procedure should have two step processes. ConnextPriceOracle.sol L#168 N-2 Functions Mutating Storage Should Emit Events Functions that mutate storage should emit an events to easily monitor that function. StableSwap.sol L#448 StableSwap.sol L#456 PortalFacet.sol L#57 PortalFacet.sol L#65 NomadFacet.sol L#25

L-1 Unspecific Compiler Version Pragma Avoid floating pragmas for non-library contracts. DiamondInit.sol L#2

L-2 Missing zero-address check in constructors and the setter functions Missing checks for zero-addresses may lead to infunctional protocol, if the variable addresses are updated incorrectly. [SponsorVault.sol L#128]https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/SponsorVault.sol#:~:text=)%20Ownable()%20%7B-,_setConnext(_connext)%3B,-%7D [Executor.sol L#48]https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/Executor.sol#:~:text=address%20_connext)%20%7B-,connext%20%3D%20_connext%3B,-%7D Consider adding zero address checks like: require(connext != address(0));

#0 - jakekidd

2022-07-01T22:37:59Z

L-2 is invalid, rest are good

G-1 Don't Initialize Variables with Default Value Explicitly initializing a variable with it's default value costs unnecesary gas. BridgeFacet.sol L#68 StableSwapFacet.sol L#415 VersionFacet.sol L#16 StableSwap.sol L#81 ConnextPriceOracle.sol L#176

G-2 Caching Array Length outside of loops saves gave per iteration It saves reading it on each iteration, as long as the array's length is not changed during the loop. ConnextPriceOracle.sol L#176 StableSwap.sol L#81 StableSwapFacet.sol L#415

G-3 Using != 0 instead of > 0 for Unsigned Integers Comparisons It's cheaper using != 0 when dealing with unsigned integers types` [StableSwap.sol L#82]https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/StableSwap.sol#L8:~:text=i%2B%2B)%20%7B-,if%20(i%20%3E%200)%20%7B,-//%20Check%20if%20index

ConnextPrice Oracle L#150

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter