Skip to content

Code4rena

Float Capital contest

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

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

Disclosed reports

Newest first. Only what Float Capital contest chose to make public.

Business logic

latestMarket used where marketIndex should have been used

The functions initializeMarket and _seedMarketInitially used the variable latestMarket instead of the marketIndex parameter, so if called separately from createNewSyntheticMarket, the latest market would be initialised multiple times and previous markets would not be initialised properly. An attacker with admin access could cause incorrect market initialisation, but the functions are admin-only.

Float Capital contest

Medium
Business logic

2 variables not indexed by marketIndex

Two mapping variables in the Staker contract are not indexed by marketIndex, so if two markets share the same batched_stakerNextTokenShiftIndex value, their stored snapshot indices can overwrite each other. This can cause incorrect float issuance calculations, allocating too much or too little float.

Float Capital contest

High
Business logic

Prevent markets getting stuck when prices don’t move

The smart contract only advances its market update index when the asset price changes, so if the price stays constant, pending settlements never execute and the market becomes stuck. An attacker could not directly exploit this, but it poses an availability risk if the oracle returns a constant price.

Float Capital contest

Medium
Business logic

Wrong aave usage of claimRewards

The Aave yield manager contract incorrectly passed the payment token instead of the aToken when claiming rewards, so the rewards would be unclaimable. An attacker could not directly exploit this, but it would cause a loss of rewards for users.

Float Capital contest

Medium
Business logic

Incorrect balance computed in getUsersConfirmedButNotSettledSynthBalance()

The function getUsersConfirmedButNotSettledSynthBalance() calculates a user's unsettled balance using the current market update index instead of the index at the time of the user's last action. This can show an incorrect balance to the user, potentially leading them to make poor financial decisions.

Float Capital contest

Medium
Business logic

Users could shift tokens on Staker with more than he has staked

The Staker contract's shiftTokens function only checked the amount to shift against the user's staked balance, but did not account for multiple shifts before a price update. An attacker could call shiftTokens repeatedly to shift more tokens than they had staked, potentially manipulating the system for personal gain.

Float Capital contest

High
Business logic

copy paste error in _batchConfirmOutstandingPendingActions

A copy-paste error in the smart contract caused the wrong state variable to be reset after processing, so a pending amount was never cleared and kept increasing. This could lead to far too many synthetic tokens being shifted from SHORT to LONG, corrupting internal accounting.

Float Capital contest

High