The excess deposit token calculation did not exclude the flashloan fee amount, allowing the stream creator to withdraw that fee. This could cause the protocol governance's claimFees to fail or force other users to lose part of their deposits.
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.
The arbitraryCall function allows the protocol governor to call any contract with any data, and because the incentive token address is not blocked after an incentive is claimed, a malicious or compromised governor could use transferFrom to steal users' tokens up to their allowance.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
A calculation in the Locke contract overflows when a user's staked amount is large but below the maximum allowed value, causing the exit and withdraw functions to revert. This permanently locks the user's funds.
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.
SP
Streaming Protocol contest
High
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.