Skip to content

Code4rena

FairSide contest

Every publicly disclosed report for FairSide contest and what kind of bugs they were.

disclosed reports
26
most reported class
Business logic
bug classes found
3
first disclosure
2021
Find FairSide contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what FairSide contest chose to make public.

Business logic

FSDVesting : Claiming tributes should call FSD token’s corresponding functions

The FSDVesting contract's claimTribute and claimGovernanceTribute functions fail to call the corresponding claim functions on the FSD token contract. As a result, when a beneficiary claims a tribute, the reward is transferred from their vested tokens without replenishing the FSD token contract's accounting, potentially causing loss to the beneficiary.

FairSide contest

High
Access control

Anyone Can Arbitrarily Call FSDVesting.updateVestedTokens()

The updateVestedTokens() function in FSDVesting.sol lacks a check that the caller is the trusted FSD.sol contract, and the _user argument is user-controlled, so anyone can call it to arbitrarily increase a user's vested token amount. This allows an attacker to either withdraw more tokens early or block legitimate withdrawals by causing safeTransfer() to fail due to insufficient balance.

FairSide contest

High
Business logic

user.creation is updated incorrectly when the user tries to extend membership

When a user extends their membership, the contract incorrectly updates the user's creation timestamp by adding the duration increase, which pushes the membership start date far into the future. This makes the user unable to use any membership features for an extended period.

FairSide contest

Medium
Business logic

ERC20ConvictionScore._writeCheckpoint` does not write to storage on same block

The smart contract function that writes conviction score checkpoints uses a memory copy instead of a storage pointer, so when a checkpoint is updated in the same block, the new value is not saved. This means users who update their conviction score multiple times in one block only have their first score persisted, and it can be exploited to inflate conviction scores or cause loss of conviction NFTs.

FairSide contest

High
Business logic

ERC20ConvictionScore allows transfers to special TOTAL_GOVERNANCE_SCORE address

The ERC20ConvictionScore contract allows any user to transfer tokens to the special address used to track the total governance credit score, which then accumulates a credit score based on its balance. An attacker could inflate this total score, raising the quorum threshold and preventing proposals from passing.

FairSide contest

Medium
Smart contracts

The variable fShareRatio is vulnerable to manipulation by flash minting and burning

The fShareRatio variable in the purchaseMembership function can be manipulated by flash minting and burning FSD tokens, potentially allowing a user to purchase membership when the ratio is below 100% or to earn more staking rewards. However, a 3.5% tribute fee makes such manipulation unprofitable, and the project confirmed the example is not possible.

FairSide contest

Medium
Business logic

Call to swapExactTokensForETH in liquidateDai() will always fail

The liquidateDai() function calls Uniswap's swapExactTokensForETH without first approving the UniswapV2 router to spend the Dai tokens. As a result, the swap always fails and the function reverts, preventing the intended liquidation and updateCostShareRequest() from completing.

FairSide contest

Medium
Business logic

Conviction scoring fails to initialize and bootstrap

New users' conviction scores never initialise because the checkpoint count is zero and the balance is zero, so the update function exits early. This prevents the protocol's core conviction scoring feature from bootstrapping for any new user.

FairSide contest

High
Business logic

ERC20ConvictionScore._updateConvictionScore uses stale credit score for governanceDelta

The conviction score update logic used a stale snapshot from the previous block when a user lost governance status, allowing the total governance score to be inflated. An attacker could increase their score and then transfer their balance in the same block, leaving the total governance score artificially high and potentially breaking the voting mechanism.

FairSide contest

High
Smart contracts

Eth may get stuck in contract

The contract uses `transfer()` to send Ether, which forwards a fixed 2300 gas. After the Istanbul hardfork increased the gas cost of SLOAD, this fixed amount may be insufficient if the recipient is a contract, causing Ether to become stuck.

FairSide contest

Medium
Business logic

Conviction totals not updated during tokenization

The tokenizeConviction function ignores the return values from _updateConvictionScore, so the network-wide conviction and governance totals are not updated. This leads to incorrect tribute calculations because the totals are used as denominators.

FairSide contest

Medium
Smart contracts

Should check return data from Chainlink aggregators

The contract read the ETH price from a Chainlink aggregator without checking the round ID or timestamp, so it could act on a stale or incomplete price. An attacker or unlucky timing could then cause the contract to use an outdated ether price, putting funds at risk.

FairSide contest

Medium
Access control

ERC20ConvictionScore.acquireConviction implements wrong governance checks

The acquireConviction function in ERC20ConvictionScore omitted the balance check required to become a governor, allowing a user to gain governance rights without meeting the minimum balance. Additionally, the wasGovernance flag could be outdated, letting a user bypass governance parameter changes by front-running them with an NFT creation.

FairSide contest

Medium
Business logic

gracePeriod not increased after membership extension

When a membership was extended, the contract increased the creation timestamp but left the grace period unchanged, so the grace period could end earlier than intended relative to the new membership duration. The project confirmed this could affect membership duration and fixed it.

FairSide contest

Medium
Audit finding

Bug inside ABDKMathQuad library

The ABDKMathQuad library used by FairSideFormula has edge cases where conversions between UInt and Bytes16 produce small differences, and other operations may also misbehave. An attacker could potentially exploit these inaccuracies, though the report does not demonstrate a concrete exploit.

FairSide contest

Medium
Business logic

Withdrawable.withdraw does not decrease pendingWithdrawals

The withdraw function does not decrease the pendingWithdrawals storage variable, so it overstates outstanding withdrawals. This causes getReserveBalance to under-report the actual reserve balance, leading to incorrect mint amounts in the FSD.mint calculation.

FairSide contest

High
Business logic

Incorrect implementation of arctan in the contract FairSideFormula

The arctan approximation in the FairSideFormula contract omitted absolute value operations, producing incorrect results for negative inputs. This could cause the calculateDeltaOfFSD function to mint or burn an incorrect number of FSD tokens.

FairSide contest

High