Holograph contest - skyle's results

Omnichain protocol for deploying, minting, & bridging NFTs between blockchains.

General Information

Platform: Code4rena

Start Date: 18/10/2022

Pot Size: $75,000 USDC

Total HM: 27

Participants: 144

Period: 7 days

Judge: gzeon

Total Solo HM: 13

Id: 170

League: ETH

Holograph

Findings Distribution

Researcher Performance

Rank: 133/144

Findings: 1

Award: $0.00

Gas:
grade-c

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

G‑01 <array>.length should not be looked up in every loop of a for-loop contracts/enforcer/PA1D.sol Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {

G‑02 ++i/i++ should be unchecked{++i}/unchecked{i++} when it is not possible for them to overflow, as is the case when used in for- and while-loops contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {

G‑03 ++i costs less gas than i++, especially when it’s used in for-loops (--i/i-- too) contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {

[G-4] IT COSTS MORE GAS TO INITIALIZE VARIABLES WITH THEIR DEFAULT VALUE THAN LETTING THE DEFAULT VALUE BE APPLIED. contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {

contracts/HolographOperator.sol Ln781 for (uint256 i = 0; i < length; i++) {

fix:

  • for (uint256 i = 0; i < length; i++) {
  • for (uint256 i; i < length; i++) {
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