Fractional v2 contest - benbaessler's results

A collective ownership platform for NFTs on Ethereum.

General Information

Platform: Code4rena

Start Date: 07/07/2022

Pot Size: $75,000 USDC

Total HM: 32

Participants: 141

Period: 7 days

Judge: HardlyDifficult

Total Solo HM: 4

Id: 144

League: ETH

Fractional

Findings Distribution

Researcher Performance

Rank: 83/141

Findings: 2

Award: $99.41

🌟 Selected for report: 0

🚀 Solo Findings: 0

1) Natspec is incomplete

Add @return statement

FERC1155.sol Line 350

FERC1155.sol Line 324

FERC1155.sol Line 241

BaseVault.sol Line 34

2) Missing event for critical parameter change

FERC1155.sol Line 198

3) Add Event to propose()

Migration.sol Line 98

4) Refactor duplicate if / revert() checks to a modifier

For Vault.sol, replace if statement with modifier.

Vault.sol Line 76

Vault.sol Line 87

Vault.sol Line 94

Vault.sol Line 102

5) Replace transferFrom with safeTransferFrom

Possibly integrate SafeERC20.

BaseVault.sol Line 65

1) State variables only set in the constructor should be declared immutable

Avoids a Gsset (20000 gas) in the constructor, and replaces each Gwarmacces (100 gas) with a PUSH32 (3 gas).

There are 7 instances of this issue:

Buyout.sol Line 29

Buyout.sol Line 31

Buyout.sol Line 33

Migration.sol Line 37

Migration.sol Line 39

Minter.sol Line 14

BaseVault.sol Line 19

2) Array.length should not be used in a for-loop

storage arrays incur a Gwarmaccess (100 gas)

memory arrays use MLOAD (3 gas)

calldata arrays use CALLDATALOAD (3 gas)

Caching the length changes each of these to a DUP<N> (3 gas), and gets rid of the extra DUP<N> needed to store the stack offset.

There are 5 instances of this issue:

BaseVault.sol Line 64

BaseVault.sol Line 83

BaseVault.sol Line 107

BaseVault.sol Line 130

BaseVault.sol Line 132

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