Holograph contest - emrekocak'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: 126/144

Findings: 1

Award: $0.00

Gas:
grade-c

🌟 Selected for report: 0

🚀 Solo Findings: 0

BYTES CONSTANT ARE CHEAPER THAN STRING CONSTANTS

If the string can fit into 32 bytes, then bytes32 is cheaper than string. string is a dynamically sized-type, which has current limitations in Solidity compared to a statically sized variable. This means extra gas is spent upon deployment and the constant is read every time.

Instances include: enforcer/PA1D.sol:43 enforcer/PA1D.sol:44 enforcer/PA1D.sol:45

Use assembly to check for address(0)

Saves 6 gas per instance if using assembly to check for address(0)
e.g.

assembly {  if iszero(_addr) {   mstore(0x00, "zero address")   revert(0x00, 0x20)  } }

Instances include: HolographOperator.sol:234 enforcer/HolographERC20.sol:521
enforcer/HolographERC20.sol:522
enforcer/HolographERC20.sol:528
enforcer/HolographERC20.sol:585
enforcer/HolographERC20.sol:596
enforcer/HolographERC20.sol:597
enforcer/HolographERC721.sol:320 enforcer/HolographERC721.sol:540 enforcer/HolographERC721.sol:590 enforcer/HolographERC721.sol:717 enforcer/HolographERC721.sol:771

Write direct outcome, instead of performing mathematical operations

Instances include: HolographOperator.sol:157 module/LayerZeroModule.sol:175 module/LayerZeroModule.sol:194

Splitting require() statements that use && saves gas

Saves 16 gas per instance. If you're using the Optimizer at 200, instead of using the && operator in a single require statement to check multiple conditions, multiple require statements with 1 condition per require statement should be used to save gas: HolographOperator.sol:758

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