Fractional v2 contest - Tomio'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: 77/141

Findings: 2

Award: $99.43

🌟 Selected for report: 0

🚀 Solo Findings: 0

Title: Use safeTransfer/safeTransferFrom consistently instead of transfer/transferFrom

Impact: It is good to add a require() statement that checks the return value of token transfers or to use something like OpenZeppelin’s safeTransfer/safeTransferFrom unless one is sure the given token reverts in case of a failure. Failure to do so will cause silent failures of transfers and affect token accounting in contract.

Proof of Concept: BaseVault.sol#L65

Recommended Mitigation Steps Consider using safeTransfer/safeTransferFrom or require() consistently.

Reference: here


Title: Consider make constant as private to save gas

Proof of Concept: FERC1155.sol#L15-L17 Buyout.sol#L35-L37

Recommended Mitigation Steps: I suggest changing the visibility from public to internal or private


Title: Using unchecked and prefix increment is more effective for gas saving:

Proof of Concept: Vault.sol#L78 Vault.sol#L104

Recommended Mitigation Steps: Change to:

for (uint256 i = 0; i < length;) { // ... unchecked { ++i; } }

Title: Set as immutable can save gas

Proof of Concept: BaseVault.sol#L19

Recommended Mitigation Steps: can be set as immutable, which already set once in the constructor


Title: abi.encode() is less efficient than abi.encodePacked()

Proof of Concept: Minter.sol#L26


Title: empty constructor

Proof of Concept: MerkleBase.sol#L8

Recommended Mitigation Steps: Remove if unused for gas saving


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