Fractional v2 contest - hubble'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: 92/141

Findings: 2

Award: $76.58

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

14.6423 USDC - $14.64

Labels

bug
duplicate
2 (Med Risk)

External Links

Lines of code

https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/modules/Migration.sol#L210 https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/modules/Buyout.sol#L57

Vulnerability details

As part of the migration of a vault, the commit function is called to kickoff the buyout process for the migration. Its possible that any EOA address can initiate a start function on the Buyout module with a very low amount of msg.value and prevent the above migration-commit to revert, by front-running it.

Impact

Impact the migration process. Denial of service attack can be done repeatedly, so that migration is postponed indefinitely.

Proof of Concept

Contract : Migration.sol, function commit() Contract : Buyout.sol, function start()

Alternate design with either permissioned call to start function or queueing the requests for the start function call.

#0 - mehtaculous

2022-07-18T16:42:27Z

Duplicate of #87

#1 - HardlyDifficult

2022-08-02T21:54:42Z

Lines of code

https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/modules/protoforms/BaseVault.sol#L65 https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/references/TransferReference.sol#L22

Vulnerability details

The return values of the tranfer/transferFrom call is not checked. There is a possibility that with some ERC20 implementation, failures are not handled properly.

Impact

Not checking the return values, will assume that transfer was successfull, and may impact accounting further in the contract.

Proof of Concept

Contract : BaseVault.sol Function : batchDepositERC20(), Line#65 2. Contract : TransferReference.sol Function : ERC20Transfer(), Line#22

Use the safe transfer versions of these commands from Openzeppelin.

#0 - stevennevins

2022-07-20T21:07:45Z

Duplicate of #312

#1 - HardlyDifficult

2022-07-26T17:42:58Z

Agree with the sponsor that this is a non-critical best practice. Transfers may fail but no events are emitted, balance doesn't change, and no other negative consequences were identified.

Lowering risk and making this a QA report for the warden.

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