Skip to content

Code4rena

Streaming Protocol contest

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

disclosed reports
15
most reported class
Business logic
bug classes found
4
first disclosure
2022
Find Streaming Protocol contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Streaming Protocol contest chose to make public.

Business logic

Reward token not correctly recovered

The recoverTokens function incorrectly calculates excess reward tokens by subtracting rewardTokenAmount, which never decreases after claims, from the contract balance. This prevents recovery of accidentally sent reward tokens because the excess underflows or is zero.

Streaming Protocol contest

High
Race condition

LockeERC20 is vulnerable to frontrun attack

The ERC20 approve function allows a spender to front-run an allowance change and take both the old and new amounts. An attacker could steal tokens if they can front-run the victim's approve transaction.

Streaming Protocol contest

Medium
Business logic

recoverTokens doesn’t work when isSale is true

The recoverTokens function incorrectly calculates excess deposit tokens when isSale is true and creatorClaimSoldTokens has been called, because redeemedDepositTokens remains zero and depositTokenAmount is unchanged. This causes recoverTokens to revert or send fewer tokens than intended, potentially locking deposit tokens in the contract.

Streaming Protocol contest

High
Business logic

Creating rewardTokens without streaming depositTokens

The stake and withdraw functions allow an attacker to generate reward tokens without streaming deposit tokens by manipulating the token calculation to subtract zero. An attacker can repeat this every block and from multiple addresses to increase their share of rewards, causing loss of funds for honest stakers.

Streaming Protocol contest

High
Business logic

ts.tokens sometimes calculated incorrectly

The staking contract fails to update the last interaction timestamp when a user stakes after having withdrawn all tokens, because the update condition requires a non-zero token balance. This causes the next withdrawal to calculate the streamed token amount using an outdated timestamp, allowing the user to withdraw more tokens than entitled.

Streaming Protocol contest

High
Business logic

Tokens can be stolen when depositToken == rewardToken

The Streaming contract allows the deposit and reward tokens to be the same, and the recoverTokens function handles each role separately, so when both tokens are identical the creator can recover the same excess twice. This lets the stream creator steal tokens that users should be able to withdraw or claim as rewards.

Streaming Protocol contest

High
Business logic

Any arbitraryCall gathered airdrop can be stolen with recoverTokens

The arbitraryCall function allows the contract to hold airdropped tokens without recording them, and recoverTokens can withdraw any token not tracked as reward, deposit, or incentive. An attacker can back-run arbitraryCall transactions and call recoverTokens to steal the airdrop.

Streaming Protocol contest

Medium
Access control

Possible incentive theft through the arbitraryCall() function

The arbitraryCall function could be used to pre-approve a token allowance for a malicious recipient before any incentive was created. Once a user provided that token as an incentive, the malicious recipient could transfer the tokens out.

Streaming Protocol contest

High
Business logic

Storage variable unstreamed can be artificially inflated

The storage variable `unstreamed` is incremented on stake but not decremented on withdraw, allowing a malicious user to artificially inflate it by staking and immediately withdrawing. This inflated value could deter other users from staking, benefiting the attacker by reducing competition for rewards.

Streaming Protocol contest

Medium
Business logic

arbitraryCall() can get blocked by an attacker

The arbitraryCall() function, used by governance to claim airdrops, is blocked if the token address has been used as an incentive, because a require statement reverts when incentives[who] is non-zero. An attacker can send a small incentive to that token address, preventing the airdrop claim until the stream ends and the incentive is cleared.

Streaming Protocol contest

Medium
Business logic

This protocol doesn’t support all fee on transfer tokens

The protocol does not fully support fee-on-transfer tokens that deduct fees from the sender's remaining balance rather than the transferred amount. With such tokens, user funds can be lost after transfers because the recipient's balance becomes less than expected.

Streaming Protocol contest

Medium
Access control

Business logic bug in __abdicate() function - 2 Bugs

The abdicate function that is meant to renounce governance only clears the main governor address, leaving the emergency governor and any pending governor in place. A pending governor could later accept the role and take control of the protocol, potentially capturing its fees.

Streaming Protocol contest

High