Holograph contest - 0x5rings'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: 122/144

Findings: 2

Award: $0.00

QA:
grade-c
Gas:
grade-c

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/enforcer/PA1D.sol#L396-L397

Vulnerability details

Impact

Excessive payout list of addresses _payoutEth would lead to a revert. Rendering users unable to receive eth

Code: https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/enforcer/PA1D.sol#L396-L397

Description

use of .transfer() may revert if the recipient’s fallback function consumes more than 2300 gas. This may lead to a revert leading to recipients unable to recieve their payout.

The .transfer() function intends to transfer an ETH amount with a fixed amount of 2300 gas. This function is not equipped to handle changes in the underlying .transfer() functions which may supply different amounts of gas in the future. Additionally, if the recipient implements a fallback function containing some sort of logic, this may inevitably revert, meaning the vault and owner of the contract will never be able to call certain sensitive functions.

Consider using .call() instead with the checks-effects-interactions pattern implemented correctly. Careful consideration needs to be made to prevent reentrancy.

#0 - gzeoneth

2022-10-28T09:44:35Z

Duplicate of #377

#1 - gzeoneth

2022-11-21T07:13:39Z

As QA report


10e18 is more gas efficient than 10**18

Files Found:

  • File: contracts/HolographOperator.sol - line 256

Mitigation:

Use Scientific Notation for easier readability


Abi.Encode() is less efficient than abi.Encodepacked()

Files Found:

There are 1 instances of this issue.

  • File: contracts/HolographFactory.sol - line 252

Mitigation:

Use Abi.encode packed where necessary


Unused/empty receive()/fallback() function

Files Found:

  • File: contracts/HolographOperator.sol - line 1209

Mitigation:

Either implement, emit or remove the empty callback


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