FairSide contest - gpersoon's results

FairSide Network

General Information

Platform: Code4rena

Start Date: 20/05/2021

Pot Size: $55,000 USDC

Total HM: 19

Participants: 8

Period: 7 days

Judge: cemozer

Total Solo HM: 11

Id: 11

League: ETH

FairSide

Findings Distribution

Researcher Performance

Rank: 6/8

Findings: 4

Award: $1,703.76

🌟 Selected for report: 2

🚀 Solo Findings: 1

Findings Information

🌟 Selected for report: 0xRajeev

Also found by: gpersoon, pauliax, shw

Labels

bug
duplicate
2 (Med Risk)

Awards

262.6448 USDC - $262.64

External Links

Handle

gpersoon

Vulnerability details

Impact

The function addRegistrationTributeGovernance makes a call to _addTribute, the same as addRegistrationTribute is doing However a function _addGovernanceTribute also exists and this function is never called.

It seem more logical that addRegistrationTributeGovernance should call _addGovernanceTribute

Proof of Concept

https://github.com/code-423n4/2021-05-fairside/blob/main/contracts/token/FSD.sol#L125 function addRegistrationTribute(uint256 registrationTribute) external { ... _addTribute(registrationTribute); } // https://github.com/code-423n4/2021-05-fairside/blob/main/contracts/token/FSD.sol#L133 function addRegistrationTributeGovernance(uint256 registrationTribute) ... _addTribute(registrationTribute); }

// https://github.com/code-423n4/2021-05-fairside/blob/main/contracts/dependencies/TributeAccrual.sol#L50 function _addGovernanceTribute(uint256 tribute) internal {

Tools Used

Editor

Check if addRegistrationTributeGovernance should indeed call _addGovernanceTribute If so, update the code accordingly.

#0 - fairside-core

2021-05-30T13:27:08Z

Duplicate of #20

Findings Information

🌟 Selected for report: gpersoon

Labels

bug
2 (Med Risk)
sponsor confirmed
disagree with severity
resolved

Awards

1441.1236 USDC - $1,441.12

External Links

Handle

gpersoon

Vulnerability details

Impact

In the function purchaseMembership of FSDNetwork.sol, when the membership is extended then membership[msg.sender].creation is increased, however membership[msg.sender].gracePeriod is not increased. This might lead to a gracePeriod than is less then expected. It seems logical to also increase the gracePeriod

Proof of Concept

FSDNetwork.sol // https://github.com/code-423n4/2021-05-fairside/blob/main/contracts/network/FSDNetwork.sol#L171 function purchaseMembership(uint256 costShareBenefit) external { ... if (membership[msg.sender].creation == 0) { ... membership[msg.sender].creation = block.timestamp; membership[msg.sender].gracePeriod = membership[msg.sender].creation + MEMBERSHIP_DURATION + 60 days; } else { .... membership[msg.sender].creation += durationIncrease; }

Tools Used

Editor

Check if gracePeriod has to be increased also. When that is the case add the logic to do that.

#0 - fairside-core

2021-05-30T15:27:17Z

This should be bumped to a medium severity finding as it actually does not affect the membership duration at all if the gracePeriod is not updated.

#1 - fairside-core

2021-06-01T15:02:22Z

Fixed in PR#21.

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