FairSide contest - hyh's results

Decentralized Cost Sharing Network.

General Information

Platform: Code4rena

Start Date: 09/11/2021

Pot Size: $30,000 ETH

Total HM: 6

Participants: 17

Period: 3 days

Judge: pauliax

Total Solo HM: 3

Id: 50

League: ETH

FairSide

Findings Distribution

Researcher Performance

Rank: 5/17

Findings: 3

Award: $908.97

🌟 Selected for report: 1

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: leastwood

Also found by: WatchPug, cmichel, hickuphh3, hyh, rfa

Labels

bug
duplicate
3 (High Risk)

Awards

0.1289 ETH - $610.12

External Links

Handle

hyh

Vulnerability details

Impact

In current implementation all vesting beneficiaries can increase their vested amounts unlimitedly by calling updateVestedTokens(my_fsd_vesting_address, any_amount_to_be_added_to_vesting).

Beneficiary can then surpass vesting schedule by calling claimVestedTokens https://github.com/code-423n4/2021-11-fairside/blob/main/contracts/token/FSDVesting.sol#L124

It will not imply unlimited mint as only initial amount was minted to vestingAddress during _createVesting: https://github.com/code-423n4/2021-11-fairside/blob/main/contracts/token/FSDVesting.sol#L134 https://github.com/code-423n4/2021-11-fairside/blob/main/contracts/token/FSD.sol#L606

However, vesting schedule can be fully surpassed as when 'block.timestamp >= start.add(CLIFF)' condition be met the beneficiary can withdraw all FSD tokens at once, having added 19 * initial_amount via updateVestedTokens before, so that it now has amount = 20 * minted_amount and 5% available at CLIFF is equal to the whole minted FSD stake.

Proof of Concept

FSDVesting.updateVestedTokens has no control modifiers: https://github.com/code-423n4/2021-11-fairside/blob/main/contracts/token/FSDVesting.sol#L147

Control modifier should be added to updateVestedTokens function, either onlyFSD or onlyFactory. The latter case requires additional proxy function to be added to FSDVestingFactory as now FSDVesting.updateVestedTokens is called by FSD contract directly.

#0 - YunChe404

2021-11-14T11:31:51Z

#32

#1 - pauliax

2021-11-17T12:08:04Z

A duplicate of #101

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